微信搜索superit|邀请体验:大数据, 数据管理、OLAP分析与可视化平台 | 赞助作者:赞助作者

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

zookeeper aide_941 25℃

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

个人分类: 集群/高可用 错误处理
版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/reblue520/article/details/53560862
zookeeper.out报错:

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集群不能正常工作

转载请注明:SuperIT » 解决zookeeper报错[NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:NIOServerCnxn@362] – Exception causing close

喜欢 (2)or分享 (0)