首页 > 代码库 > zookeeper报Unable to read additional data from server sessionid 0x0, likely server has closed socket, closing socket connection and attempting reconnect的解决
zookeeper报Unable to read additional data from server sessionid 0x0, likely server has closed socket, closing socket connection and attempting reconnect的解决
现象
服务器连不上,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的解决
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。