Hello all, I fixed this problem. In case anyone else sees this in the future, it was caused by incorrect myid files
On Fri, Oct 24, 2014 at 4:19 PM, Ben Hsu <[email protected]> wrote: > > Hello > > I am getting started with zookeeper and I want to start up a cluster of 3 > zookeeper nodes to play with. > > I am getting Connection Refused errors in my log file, and when I connect > using zkCli.sh I get an error and I get disconnected (both errors are > below). > > If I comment out two of the three nodes and start zookeeper in single node > mode it works, and I am able to connect to it. > > Zookeeper is running and is listening on 2181, but I don't see anything > listening on 2888. > > Has anyone seen this before? It seems to be a common rookie mistake :) > > 2014-10-24 19:35:27,826 [myid:1] - INFO > [WorkerReceiver[myid=1]:FastLeaderElection@597] - Notification: 1 > (message format version), 3 (n.leader), 0x2 (n.zxid), 0x178 (n.round), > LOOKING (n.state), 3 (n.sid), 0x0 (n.peerEpoch) FOLLOWING (my state) > 2014-10-24 19:35:27,829 [myid:1] - WARN > [QuorumPeer[myid=1]/0:0:0:0:0:0:0:0:2181:Learner@233] - Unexpected > exception, tries=3, connecting to zookeeper-test-2.mcdc/10.10.2.50:2888 > java.net.ConnectException: Connection refused > at java.net.PlainSocketImpl.socketConnect(Native Method) > at > java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:339) > at > java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:200) > at > java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:182) > at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:391) > at java.net.Socket.connect(Socket.java:579) > at > org.apache.zookeeper.server.quorum.Learner.connectToLeader(Learner.java:225) > at > org.apache.zookeeper.server.quorum.Follower.followLeader(Follower.java:71) > at org.apache.zookeeper.server.quorum.QuorumPeer.run(QuorumPeer.java:786) > 2014-10-24 19:35:27,835 [myid:1] - INFO > [WorkerReceiver[myid=1]:FastLeaderElection@597] - Notification: 1 > (message format version), 2 (n.leader), 0x0 (n.zxid), 0x179 (n.round), > LOOKING (n.state), 2 (n.sid), 0x0 (n.peerEpoch) FOLLOWING (my state) > > and the error I get when I run zkCli.sh is: > > 2014-10-24 19:40:58,371 [myid:] - INFO [main-SendThread(127.0.0.1:2181 > ):ClientCnxn$SendThread@975] - Opening socket connection to server > 127.0.0.1/127.0.0.1:2181. Will not attempt to authenticate using SASL > (unknown error) > 2014-10-24 19:40:58,371 [myid:] - INFO [main-SendThread(127.0.0.1:2181 > ):ClientCnxn$SendThread@852] - Socket connection established to > 127.0.0.1/127.0.0.1:2181, initiating session > 2014-10-24 19:40:58,373 [myid:] - INFO [main-SendThread(127.0.0.1:2181 > ):ClientCnxn$SendThread@1098] - Unable to read additional data from > server sessionid 0x0, likely server has closed socket, closing socket > connection and attempting reconnect > > my zoo.cfg file is: > > tickTime=2000 > dataDir=/var/lib/zookeeper/ > clientPort=2181 > initLimit=5 > syncLimit=2 > server.1=zookeeper-test-1.mcdc:2888:3888 > server.2=zookeeper-test-2.mcdc:2888:3888 > server.3=zookeeper-test-3.mcdc:2888:3888 > > >
