Newbie programmer trying to set up zookeeper
I'm trying to create a zookeeper cluster of 3 servers, but I'm not really sure what I am doing. I have the same config file on every machine. It looks like this:
tickTime=2000
dataDir=/home/scix3/zookeeper/data
clientPort=2181
initLimit=5
syncLimit=2
autopurge.purgeInterval=24
autopurge.snapRetainCount=5
server.1=192.168.2.106:2888:3888
server.2=192.168.2.102:2888:3888
server.3=192.168.2.105:2888:3888
I have a myid file in dataDir and it matches the server number in the zoo.cfg file. I know that zookeeper works on every system because when I command $ bin / zkServer.sh the following is issued:
Starting zookeeper ... already running as process 9548.
However, when I run bin / zkCli.sh on any of the computers, I get the following message.
scix3@M6:~/zookeeper$ bin/zkCli.sh
Connecting to localhost:2181
2015-06-02 14:29:57,310 [myid:] - INFO [main:Environment@100] - Client environment:zookeeper.version=3.4.6-1569965, built on 02/20/2014 09:09 GMT
2015-06-02 14:29:57,313 [myid:] - INFO [main:Environment@100] - Client environment:host.name=M6
2015-06-02 14:29:57,313 [myid:] - INFO [main:Environment@100] - Client environment:java.version=1.7.0_79
2015-06-02 14:29:57,316 [myid:] - INFO [main:Environment@100] - Client environment:java.vendor=Oracle Corporation
2015-06-02 14:29:57,316 [myid:] - INFO [main:Environment@100] - Client environment:java.home=/usr/lib/jvm/java-7-openjdk-amd64/jre
2015-06-02 14:29:57,316 [myid:] - INFO [main:Environment@100] - Client environment:java.class.path=/home/scix3/zookeeper/bin/../build/classes:/home/scix3/zookeeper/bin/../build/lib/*.jar:/home/scix3/zookeeper/bin/../lib/slf4j-log4j12-1.6.1.jar:/home/scix3/zookeeper/bin/../lib/slf4j-api-1.6.1.jar:/home/scix3/zookeeper/bin/../lib/netty-3.7.0.Final.jar:/home/scix3/zookeeper/bin/../lib/log4j-1.2.16.jar:/home/scix3/zookeeper/bin/../lib/jline-0.9.94.jar:/home/scix3/zookeeper/bin/../zookeeper- 3.4.6.jar:/home/scix3/zookeeper/bin/../src/java/lib/*.jar:/home/scix3/zookeeper/bi n/../conf:
2015-06-02 14:29:57,316 [myid:] - INFO [main:Environment@100] - Client environment:java.library.path=/usr/java/packages/lib/amd64:/usr/lib/x86_64-linux-gnu/jni:/lib/x86_64-linux-gnu:/usr/lib/x86_64-linux-gnu:/usr/lib/jni:/lib:/usr/lib
2015-06-02 14:29:57,316 [myid:] - INFO [main:Environment@100] - Client environment:java.io.tmpdir=/tmp
2015-06-02 14:29:57,316 [myid:] - INFO [main:Environment@100] - Client environment:java.compiler=<NA>
2015-06-02 14:29:57,316 [myid:] - INFO [main:Environment@100] - Client environment:os.name=Linux
2015-06-02 14:29:57,316 [myid:] - INFO [main:Environment@100] - Client environment:os.arch=amd64
2015-06-02 14:29:57,316 [myid:] - INFO [main:Environment@100] - Client environment:os.version=3.13.0-45-generic
2015-06-02 14:29:57,317 [myid:] - INFO [main:Environment@100] - Client environment:user.name=scix3
2015-06-02 14:29:57,317 [myid:] - INFO [main:Environment@100] - Client environment:user.home=/home/scix3
2015-06-02 14:29:57,317 [myid:] - INFO [main:Environment@100] - Client environment:user.dir=/home/scix3/zookeeper
2015-06-02 14:29:57,318 [myid:] - INFO [main:ZooKeeper@438] - Initiating client connection, connectString=localhost:2181 sessionTimeout=30000 watcher=org.apache.zookeeper.ZooKeeperMain$MyWatcher@2e559e7f
Welcome to ZooKeeper!
2015-06-02 14:29:57,344 [myid:] - INFO [main-SendThread(localhost:2181):ClientCnxn$SendThread@975] - Opening socket connection to server localhost/127.0.0.1:2181. Will not attempt to authenticate using SASL (unknown error)
JLine support is enabled
2015-06-02 14:29:57,352 [myid:] - INFO [main- SendThread(localhost:2181):ClientCnxn$SendThread@852] - Socket connection established to localhost/127.0.0.1:2181, initiating session
2015-06-02 14:29:57,356 [myid:] - INFO [main- SendThread(localhost:2181):ClientCnxn$SendThread@1098] - Unable to read additional data from server sessionid 0x0, likely server has closed socket, closing socket connection and attempting reconnect
[zk: localhost:2181(CONNECTING) 0] 2015-06-02 14:29:59,140 [myid:] - INFO [main-SendThread(localhost:2181):ClientCnxn$SendThread@975] - Opening socket connection to server localhost/127.0.0.1:2181. Will not attempt to authenticate using SASL (unknown error)
2015-06-02 14:29:59,140 [myid:] - INFO [main- SendThread(localhost:2181):ClientCnxn$SendThread@852] - Socket connection established to localhost/127.0.0.1:2181, initiating session
2015-06-02 14:29:59,141 [myid:] - INFO [main- SendThread(localhost:2181):ClientCnxn$SendThread@1098] - Unable to read additional data from server sessionid 0x0, likely server has closed socket, closing socket connection and attempting reconnect
In fact, I'm just trying to decipher the displayed message, figure out how to make a single machine master, connect the whole system, and implement it with an Apache attack.
Thanks for any help!
+3
source to share
No one has answered this question yet
Check out similar questions: