zookeeper报Unable to read additional data from server sessionid 0x0, likely server has closed socket,

Posted Els0n

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了zookeeper报Unable to read additional data from server sessionid 0x0, likely server has closed socket,相关的知识,希望对你有一定的参考价值。

现象

服务器连不上,kafka报connection refused

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

[myid:3] - INFO  [ListenerThread:[email protected]534] - My election bind port: /yy:3888

java.net.BindException: Cannot assign requested address

...

[myid:3] - WARN  [WorkerSender[myid=3]:[email protected]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,的主要内容,如果未能解决你的问题,请参考以下文章

ZK—zookeeper无法启动,报“Unable to load database on dis”

Zookeeper:Unable to read additional data from client sessionid 0x00, likely client has closed socket

Springboot 启动报错,Unable to read meta-data for class

Java-jxl插件Excel文件读写报错jxl.read.biff.BiffException: Unable to recognize OLE stream

Java-jxl插件Excel文件读写报错jxl.read.biff.BiffException: Unable to recognize OLE stream

GitHub push的时候报:Unable to access ‘https://github.com/xxxx/xxxx.git/‘:OpenSSL SSL_read:Connection was