Please take a look 
https://zookeeper.apache.org/doc/r3.1.2/zookeeperStarted.html#sc_RunningReplicatedZooKeeper
RegardsLongda


------------------------------------------------------------------From:researcher
 cs <[email protected]>Send Time:2015年11月18日(星期三) 14:49To:user 
<[email protected]>,user <[email protected]>Subject:connection of 
zookeeper
i'm new to zookeeper and using zookeeper -3.4.6 

i got this when i start the connection of client 

2015-11-18 08:44:53,355 [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 (java.lang.SecurityException: Unable to locate a login configuration)
JLine support is enabled
2015-11-18 08:44:53,411 [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
2015-11-18 08:44:53,436 [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
[zk: 127.0.0.1:2181(CONNECTING) 0] 2015-11-18 08:44:54,757 [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 (java.lang.SecurityException: Unable to locate a login configuration)
2015-11-18 08:44:54,759 [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
2015-11-18 08:44:54,761 [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
2015-11-18 08:44:56,303 [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 (java.lang.SecurityException: Unable to locate a login configuration)
2015-11-18 08:44:56,303 [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
2015-11-18 08:44:56,305 [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
2015-11-18 08:44:58,059 [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 (java.lang.SecurityException: Unable to locate a login configuration)
2015-11-18 08:44:58,060 [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
2015-11-18 08:44:58,061 [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
2015-11-18 08:45:00,139 [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 (java.lang.SecurityException: Unable to locate a login configuration)
2015-11-18 08:45:00,139 [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
2015-11-18 08:45:00,142 [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
2015-11-18 08:45:01,304 [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 (java.lang.SecurityException: Unable to locate a login configuration)
2015-11-18 08:45:01,305 [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
2015-11-18 08:45:01,306 [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
2015-11-18 08:45:02,558 [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 (java.lang.SecurityException: Unable to locate a login configuration)
2015-11-18 08:45:02,559 [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
2015-11-18 08:45:02,560 [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
2015-11-18 08:45:03,815 [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 (java.lang.SecurityException: Unable to locate a login configuration)
2015-11-18 08:45:03,816 [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
2015-11-18 08:45:03,817 [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
2015-11-18 08:45:05,157 [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 (java.lang.SecurityException: Unable to locate a login configuration)
2015-11-18 08:45:05,157 [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
2015-11-18 08:45:05,202 [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
2015-11-18 08:45:06,333 [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 (java.lang.SecurityException: Unable to locate a login configuration)
2015-11-18 08:45:06,334 [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
2015-11-18 08:45:06,337 [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
2015-11-18 08:45:08,359 [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 (java.lang.SecurityException: Unable to locate a login configuration)
2015-11-18 08:45:08,360 [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
2015-11-18 08:45:08,361 [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
2015-11-18 08:45:09,612 [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 (java.lang.SecurityException: Unable to locate a login configuration)
2015-11-18 08:45:09,613 [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
2015-11-18 08:45:09,613 [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
2015-11-18 08:45:11,384 [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 (java.lang.SecurityException: Unable to locate a login configuration)
2015-11-18 08:45:11,386 [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
2015-11-18 08:45:11,389 [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
2015-11-18 08:45:12,831 [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 (java.lang.SecurityException: Unable to locate a login configuration)
2015-11-18 08:45:12,833 [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
2015-11-18 08:45:12,893 [myid:] - INFO  
[main-SendThread(127.0.0.1:2181):ClientCnxn$SendThread@1235] - Session 
establishment complete on server 127.0.0.1/127.0.0.1:2181, sessionid = 
0x1511957053a0000, negotiated timeout = 30000

WATCHER::

WatchedEvent state:SyncConnected type:None path:null

but connection of server started well 
sometimes i start zookeeper well and sometimes got this problem 

here the zoo.cfg 

tickTime=2000
 dataDir=/home/st/storm/datadir/zookeeper
 clientPort=2181
how can i solve it ? 

Reply via email to