解决zookeeper报错[NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:NIOServerCnxn@362] - Exception causing close...

zookeeper.out报错:

解决zookeeper报错[NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:NIOServerCnxn@362] - Exception causing close..._第1张图片

解决zookeeper报错[NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:NIOServerCnxn@362] - Exception causing close..._第2张图片

2016-12-10 18:05:46,958 [myid:3] - WARN  [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:NIOServerCnxn@362] - Exception causing close of session 0x0 due to java.io.IOException: ZooKeeperServer not running
2016-12-10 18:05:46,958 [myid:3] - INFO  [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:NIOServerCnxn@1007] - Closed socket connection for client /10.173.40.61:36781 (no session established for client)

业务总线esb系统报错:
2016-12-10 16:01:47,631 [vert.x-eventloop-thread-4] ERROR com.yunva.common.network.client.EsbClient  - esb host:10.x.x.31 instanceId:45829 connection close...

问题现象:

1.ps -ef |grep zookeeper 是有运行进程的,2181可以telnet通过

2.通过bin/zkCli.sh -server 127.0.0.1:2181 连接报错

3.top指令看到集群各节点zookeeper进程占用大量cpu大概500%~700%之间

4.查看状态报错:
zookeeper-3.4.6/bin/zkServer.sh status
JMX enabled by default
Using config: /home/zookeeper-3.4.6/bin/../conf/zoo.cfg
Error contacting service. It is probably not running.

问题解决
删除:zookeeper-3.4.6/data/version-2/ 下面的数据(即conf/zoo.cfg配置文件定义的dataDir=/home/zookeeper-3.4.6/data和dataLogDir=/home/zookeeper-3.4.6/logs 下的数据),重启后问题解决

测试:
后面连接后bin/zkCli.sh -server 127.0.0.1:2181 可以看到具体的连接信息
ls /sdk/voice/server/info
[46081, 46086, 46087, 46084, 46085, 46082, 46083]


猜想是脏数据进了这个目录,导致zook集群不能正常工作

你可能感兴趣的:(解决zookeeper报错[NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:NIOServerCnxn@362] - Exception causing close...)