在客户端中执行任何命令时出现zookeeper客户端异常

tsm1rwdh  于 2021-06-03  发布在  Hadoop
关注(0)|答案(0)|浏览(484)

这是我的配置文件:

tickTime=2000
initLimit=20
syncLimit=5
dataDir=./store/data
clientPort=2181

server.1=A:3181:4181
server.2=B:3181:4181
server.3=C:3181:4181
server.4=D:3181:4181
server.5=E:3181:4181

之后,我启动了所有的服务器。然后我在其中一个节点上启动了客户端。它显示已连接,但只要我输入任何命令,它就会抛出异常并停止。

WatchedEvent state:SyncConnected type:None path:null
[zk: 127.0.0.1:2181(CONNECTED) 0] ls /
2012-11-08 22:35:01,418 [myid:] - INFO  [main-SendThread(localhost:2181):ClientCnxn$SendThread@1083] - Client session timed out, have not heard from server in 20000ms for sessionid 0x13ae22116e50001, closing socket connection and attempting reconnect

WATCHER::

WatchedEvent state:Disconnected type:None path:null
Exception in thread "main" org.apache.zookeeper.KeeperException$ConnectionLossException: KeeperErrorCode = ConnectionLoss for /
    at org.apache.zookeeper.KeeperException.create(KeeperException.java:99)
    at org.apache.zookeeper.KeeperException.create(KeeperException.java:51)
    at org.apache.zookeeper.ZooKeeper.getChildren(ZooKeeper.java:1463)
    at org.apache.zookeeper.ZooKeeper.getChildren(ZooKeeper.java:1491)
    at org.apache.zookeeper.ZooKeeperMain.processZKCmd(ZooKeeperMain.java:725)
    at org.apache.zookeeper.ZooKeeperMain.processCmd(ZooKeeperMain.java:593)
    at org.apache.zookeeper.ZooKeeperMain.executeLine(ZooKeeperMain.java:365)
    at org.apache.zookeeper.ZooKeeperMain.run(ZooKeeperMain.java:323)
    at org.apache.zookeeper.ZooKeeperMain.main(ZooKeeperMain.java:282)

所需端口已打开(2181、3181、4181)
正在放置myid,并且具有与ip地址对应的正确id
java版本:java版本“1.7.0\u 09”java(tm)se运行时环境(build 1.7.0\u 09-b05)
知道怎么回事吗?
提前谢谢。

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题