Re: Struggling with a simple configuration file.
Thank you both - Ben and Patrick - for your helpful replies. Leonard On 10/9/09 7:26 AM, "Benjamin Reed" wrote: > right at the beginning of > http://hadoop.apache.org/zookeeper/docs/r3.2.1/zookeeperStarted.html it > shows you the minimum standalone configuration. > > that doesn't explain the 0 id. i'd like to try an reproduce it. do you > have an empty data directory with a single file, myid, set to 1? > > ben > > Leonard Cuff wrote: >> I¹ve been developing for ZooKeeper for a couple months now, recently running >> in a test configuration with 3 ZooKeeper servers. I¹m running 3.2.1 with no >> problems. Recently I tried to move to a single server configuration for the >> development team environment, but couldn¹t get the configuration to work. I >> get the error java.lang.RuntimeException: My id 0 not in the peer list >> >> This would seem to imply that the myid file is set to zero. But ...it¹s set >> to 1. >> >> What¹s puzzling to me is my original configuration of servers was this: >> >> server.1=ind104.an.dev.fastclick.net:2182:2183 <--- The machine I¹m trying >> to run standalone on. >> server.2=build101.an.dev.fastclick.net:2182:2183 >> server.3=cmedia101.an.dev.fastclick.net:2182:2183 >> >> I just removed the last two lines, and ran zkServer.sh start. It fails with >> the described log message. (Full log given below). >> When I put the server.2 and server.3 lines back in, it works fine, and is >> following the build101 machine. >> >> I decided to try changing the server.1 to server.0, also changed the myid >> file contents from 1 to zero. I get a very different error scenario: A >> continuously-occurring Null Pointer exception: >> >> 2009-10-09 04:22:36,284 - WARN [QuorumPeer:/0.0.0.0:2181:quorump...@490] - >> Unexpected exception >> java.lang.NullPointerException >> at >> org.apache.zookeeper.server.quorum.FastLeaderElection.totalOrderPredicate(Fa >> stLeaderElection.java:466) >> at >> org.apache.zookeeper.server.quorum.FastLeaderElection.lookForLeader(FastLead >> erElection.java:635) >> at >> org.apache.zookeeper.server.quorum.QuorumPeer.run(QuorumPeer.java:488) >> >> I¹m at a loss to know where I¹ve gone astray. >> >> Thanks in advance for any and all help. >> >> Leonard >> >> --- the first log >> >> 2009-10-09 04:08:58,769 - INFO [main:quorumpeercon...@80] - Reading >> configuration from: >> /vcm/home/sandbox/ticket_161758-1/vcm/component/zookeeper/conf/zoo.cfg.dev >> 2009-10-09 04:08:58,795 - INFO [main:quorumpeerm...@118] - Starting quorum >> peer >> 2009-10-09 04:08:58,845 - FATAL [main:quorumpeerm...@86] - Unexpected >> exception, exiting abnormally >> java.lang.RuntimeException: My id 0 not in the peer list >> at >> org.apache.zookeeper.server.quorum.QuorumPeer.startLeaderElection(QuorumPeer >> .java:333) >> at >> org.apache.zookeeper.server.quorum.QuorumPeer.start(QuorumPeer.java:314) >> at >> org.apache.zookeeper.server.quorum.QuorumPeerMain.runFromConfig(QuorumPeerMa >> in.java:137) >> at >> org.apache.zookeeper.server.quorum.QuorumPeerMain.initializeAndRun(QuorumPee >> rMain.java:102) >> at >> org.apache.zookeeper.server.quorum.QuorumPeerMain.main(QuorumPeerMain.java:7 >> 5) >> >> -- the second log >> >> 2009-10-09 04:22:36,284 - WARN [QuorumPeer:/0.0.0.0:2181:quorump...@490] - >> Unexpected exception >> java.lang.NullPointerException >> at >> org.apache.zookeeper.server.quorum.FastLeaderElection.totalOrderPredicate(Fa >> stLeaderElection.java:466) >> at >> org.apache.zookeeper.server.quorum.FastLeaderElection.lookForLeader(FastLead >> erElection.java:635) >> at >> org.apache.zookeeper.server.quorum.QuorumPeer.run(QuorumPeer.java:488) >> 2009-10-09 04:22:36,285 - INFO [QuorumPeer:/0.0.0.0:2181:quorump...@487] - >> LOOKING >> 2009-10-09 04:22:36,285 - INFO >> [QuorumPeer:/0.0.0.0:2181:fastleaderelect...@579] - New election: 12 >> 2009-10-09 04:22:36,285 - INFO >> [QuorumPeer:/0.0.0.0:2181:fastleaderelect...@618] - Notification: 0, 12, >> 43050, 0, LOOKING, LOOKING, 0 >> 2009-10-09 04:22:36,285 - WARN [QuorumPeer:/0.0.0.0:2181:quorump...@490] - >> Unexpected exception >> java.lang.NullPointerException >> at >> org.apache.zookeeper.server.quorum.FastLeaderElection.totalOrderPredicate(Fa >> stLeaderElection.java:466) >> at >> org.apache.zookeeper.server.quorum.FastLeaderElection.lookForLeader(FastLead >> erElection.java:635) >> at >> org.apache.zookeeper.server.quorum.QuorumPeer.run(QuorumPeer.java:488) >> 2009-10-09 04:22:36,286 - INFO [QuorumPeer:/0.0.0.0:2181:quorump...@487] - >> LOOKING >> 2009-10-09 04:22:36,286 - INFO >> [QuorumPeer:/0.0.0.0:2181:fastleaderelect...@579] - New election: 12 >> 2009-10-09 04:22:36,286 - INFO >> [QuorumPeer:/0.0.0.0:2181:fastleaderelect...@618] - Notification: 0, 12, >> 43051, 0, LOOKING, LOOKING, 0 >> 2009-10-09 04:22:36,286 - WARN [QuorumPeer:/0.0.0.0:2181:quorump...@490] - >> Unexpected exception >> java.lang.NullPo
Re: Struggling with a simple configuration file.
right at the beginning of http://hadoop.apache.org/zookeeper/docs/r3.2.1/zookeeperStarted.html it shows you the minimum standalone configuration. that doesn't explain the 0 id. i'd like to try an reproduce it. do you have an empty data directory with a single file, myid, set to 1? ben Leonard Cuff wrote: I¹ve been developing for ZooKeeper for a couple months now, recently running in a test configuration with 3 ZooKeeper servers. I¹m running 3.2.1 with no problems. Recently I tried to move to a single server configuration for the development team environment, but couldn¹t get the configuration to work. I get the error java.lang.RuntimeException: My id 0 not in the peer list This would seem to imply that the myid file is set to zero. But ...it¹s set to 1. What¹s puzzling to me is my original configuration of servers was this: server.1=ind104.an.dev.fastclick.net:2182:2183 <--- The machine I¹m trying to run standalone on. server.2=build101.an.dev.fastclick.net:2182:2183 server.3=cmedia101.an.dev.fastclick.net:2182:2183 I just removed the last two lines, and ran zkServer.sh start. It fails with the described log message. (Full log given below). When I put the server.2 and server.3 lines back in, it works fine, and is following the build101 machine. I decided to try changing the server.1 to server.0, also changed the myid file contents from 1 to zero. I get a very different error scenario: A continuously-occurring Null Pointer exception: 2009-10-09 04:22:36,284 - WARN [QuorumPeer:/0.0.0.0:2181:quorump...@490] - Unexpected exception java.lang.NullPointerException at org.apache.zookeeper.server.quorum.FastLeaderElection.totalOrderPredicate(Fa stLeaderElection.java:466) at org.apache.zookeeper.server.quorum.FastLeaderElection.lookForLeader(FastLead erElection.java:635) at org.apache.zookeeper.server.quorum.QuorumPeer.run(QuorumPeer.java:488) I¹m at a loss to know where I¹ve gone astray. Thanks in advance for any and all help. Leonard --- the first log 2009-10-09 04:08:58,769 - INFO [main:quorumpeercon...@80] - Reading configuration from: /vcm/home/sandbox/ticket_161758-1/vcm/component/zookeeper/conf/zoo.cfg.dev 2009-10-09 04:08:58,795 - INFO [main:quorumpeerm...@118] - Starting quorum peer 2009-10-09 04:08:58,845 - FATAL [main:quorumpeerm...@86] - Unexpected exception, exiting abnormally java.lang.RuntimeException: My id 0 not in the peer list at org.apache.zookeeper.server.quorum.QuorumPeer.startLeaderElection(QuorumPeer .java:333) at org.apache.zookeeper.server.quorum.QuorumPeer.start(QuorumPeer.java:314) at org.apache.zookeeper.server.quorum.QuorumPeerMain.runFromConfig(QuorumPeerMa in.java:137) at org.apache.zookeeper.server.quorum.QuorumPeerMain.initializeAndRun(QuorumPee rMain.java:102) at org.apache.zookeeper.server.quorum.QuorumPeerMain.main(QuorumPeerMain.java:7 5) -- the second log 2009-10-09 04:22:36,284 - WARN [QuorumPeer:/0.0.0.0:2181:quorump...@490] - Unexpected exception java.lang.NullPointerException at org.apache.zookeeper.server.quorum.FastLeaderElection.totalOrderPredicate(Fa stLeaderElection.java:466) at org.apache.zookeeper.server.quorum.FastLeaderElection.lookForLeader(FastLead erElection.java:635) at org.apache.zookeeper.server.quorum.QuorumPeer.run(QuorumPeer.java:488) 2009-10-09 04:22:36,285 - INFO [QuorumPeer:/0.0.0.0:2181:quorump...@487] - LOOKING 2009-10-09 04:22:36,285 - INFO [QuorumPeer:/0.0.0.0:2181:fastleaderelect...@579] - New election: 12 2009-10-09 04:22:36,285 - INFO [QuorumPeer:/0.0.0.0:2181:fastleaderelect...@618] - Notification: 0, 12, 43050, 0, LOOKING, LOOKING, 0 2009-10-09 04:22:36,285 - WARN [QuorumPeer:/0.0.0.0:2181:quorump...@490] - Unexpected exception java.lang.NullPointerException at org.apache.zookeeper.server.quorum.FastLeaderElection.totalOrderPredicate(Fa stLeaderElection.java:466) at org.apache.zookeeper.server.quorum.FastLeaderElection.lookForLeader(FastLead erElection.java:635) at org.apache.zookeeper.server.quorum.QuorumPeer.run(QuorumPeer.java:488) 2009-10-09 04:22:36,286 - INFO [QuorumPeer:/0.0.0.0:2181:quorump...@487] - LOOKING 2009-10-09 04:22:36,286 - INFO [QuorumPeer:/0.0.0.0:2181:fastleaderelect...@579] - New election: 12 2009-10-09 04:22:36,286 - INFO [QuorumPeer:/0.0.0.0:2181:fastleaderelect...@618] - Notification: 0, 12, 43051, 0, LOOKING, LOOKING, 0 2009-10-09 04:22:36,286 - WARN [QuorumPeer:/0.0.0.0:2181:quorump...@490] - Unexpected exception java.lang.NullPointerException at org.apache.zookeeper.server.quorum.FastLeaderElection.totalOrderPredicate(Fa stLeaderElection.java:466) at org.apache.zookeeper.server.quorum.FastLeaderElection.lookForLeader(FastLead erElection.java:635) at org.apache.zookeeper.server.quorum.QuorumPeer.run(QuorumPeer.java:488) 2009-10-09 04:22:36,286 - INFO [QuorumPeer:/0.0.0.0:2181:quorump...@487] - LOOKING 2009-10-09 04:22:36,287 - INFO [Qu