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
[QuorumPeer:/0.0.0.0:2181:fastleaderelect...@579] - New election: 12
2009-10-09 04:22:36,287 - INFO
[QuorumPeer:/0.0.0.0:2181:fastleaderelect...@618] - Notification: 0, 12,
43052, 0, LOOKING, LOOKING, 0
2009-10-09 04:22:36,287 - 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,287 - INFO  [QuorumPeer:/0.0.0.0:2181:quorump...@487] -
LOOKING
2009-10-09 04:22:36,287 - INFO
[QuorumPeer:/0.0.0.0:2181:fastleaderelect...@579] - New election: 12
2009-10-09 04:22:36,287 - INFO
[QuorumPeer:/0.0.0.0:2181:fastleaderelect...@618] - Notification: 0, 12,
43053, 0, LOOKING, LOOKING, 0
2009-10-09 04:22:36,288 - WARN  [QuorumPeer:/0.0.0.0:2181:quorump...@490] -
Unexpected exception
ja
-- 

Leonard Cuff
lc...@valueclick.com

³This email and any files included with it may contain privileged,
proprietary and/or confidential information that is for the sole use of the
intended recipient(s).  Any disclosure, copying, distribution, posting, or
use of the information contained in or attached to this email is prohibited
unless permitted by the sender.  If you have received this email in error,
please immediately notify the sender via return e-mail, telephone, or fax
and destroy this original transmission and its included files without
reading or saving it in any manner. Thank you.²






This email and any files included with it may contain privileged,
proprietary and/or confidential information that is for the sole use
of the intended recipient(s).  Any disclosure, copying, distribution,
posting, or use of the information contained in or attached to this
email is prohibited unless permitted by the sender.  If you have
received this email in error, please immediately notify the sender
via return email, telephone, or fax and destroy this original transmission
and its included files without reading or saving it in any manner.
Thank you.

Reply via email to