码迷,mamicode.com
首页 > 其他好文 > 详细

zookeeper报Unable to read additional data from server sessionid 0x0, likely server has closed socket, closing socket connection and attempting reconnect的解决

时间:2017-05-19 16:52:18      阅读:606      评论:0      收藏:0      [点我收藏+]

标签:close   sed   exce   tar   span   man   send   ted   stat   

现象

服务器连不上,kafka报connection refused

测试发现kafka某台node(xx)的问题,登录上去也各种错误,zkServer.sh restart可以完成,但status报连不上。报错比较迷惑人,打开java log看到其他错误:

[myid:3] - INFO  [ListenerThread:QuorumCnxManager$Listener@534] - My election bind port: /yy:3888

java.net.BindException: Cannot assign requested address

...

[myid:3] - WARN  [WorkerSender[myid=3]:QuorumCnxManager@400] - Cannot open channel to 1 at election address /xx:3888

java.net.ConnectException: Connection refused

其实这个错误可以看出来,出现了xx和yy2个地址,说明它认错了自己

解决方案

从zoo.cfg看下datadir,将下面的myid改成和zoo.cfg里的自己一样的。比如xx是

server.1=xx:2888:3888
server.2=yy:2888:3888
server.3=zz:2888:3888

那么它的myid必须是1

zookeeper报Unable to read additional data from server sessionid 0x0, likely server has closed socket, closing socket connection and attempting reconnect的解决

标签:close   sed   exce   tar   span   man   send   ted   stat   

原文地址:http://www.cnblogs.com/elsonwe/p/6879015.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!