I am trying to install zookeeper and HBase in distributed mode but when I start my last node of zookeeper quorum I am getting excepton:
2013-09-05 12:02:09,230 - ERROR [main:QuorumPeer@171] - Setting LearnerType to PARTICIPANT but 4 not in QuorumPeers.
2013-09-05 12:02:09,246 - INFO [main:QuorumPeer@444] - acceptedEpoch not found! Creating with a reasonable default of 0. This should only happen when you are upgrading your installation
2013-09-05 12:02:09,250 - ERROR [main:QuorumPeerMain@89] - Unexpected exception, exiting abnormally
java.lang.RuntimeException: My id 4 not in the peer list
at org.apache.zookeeper.server.quorum.QuorumPeer.startLeaderElection(QuorumPeer.java:479)
at org.apache.zookeeper.server.quorum.QuorumPeer.start(QuorumPeer.java:411)
at org.apache.zookeeper.server.quorum.QuorumPeerMain.runFromConfig(QuorumPeerMain.java:151)
at org.apache.zookeeper.server.quorum.QuorumPeerMain.initializeAndRun(QuorumPeerMain.java:111)
at org.apache.zookeeper.server.quorum.QuorumPeerMain.main(QuorumPeerMain.java:78)
I have zookeeper quorum set to 3 - containing master + 2data nodes from hadoop. zoo.cfg list all those machines. And they have myid set to 1 for master, 3 for first data mode and 4 for second data node. Master and first data node runs just fine.
To start the ZooKeeper server on a Linux system, use the Zookeeper/zookeeper/bin/zkServer.sh restart command from your Watson Explorer installation directory. On Microsoft Windows systems, use the Zookeeper\zookeeper\bin\zkServer.
To find the process ID for ZooKeeper, type ps -eo pid,command | grep "QuorumPeer" | grep -v grep | awk '{print $1}' at the command line.
Each ZooKeeper server has a unique id. This id is used in two places: the myid file and the configuration file. The myid file identifies the server that corresponds to the given data directory. The configuration file lists the contact information for each server identified by its server id.
if you are facing this problem in case of Kafka installation then go to zookeeper.properties file and check what is value of myid
i.e.
server.<<myid>> = hostname:2181
and same value of myid
must be in myid
file present in datadir
of zoookeer,
which in my case is:
/tmp/zookeeper/myid
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With