代码改变世界

java.io.IOException: Packet len1213486160 is out of range!

2023-03-21 11:28  abce  阅读(944)  评论(0编辑  收藏  举报

部署otter,启动node的时候一直报错:

2023-03-21 10:39:24.615 [main-SendThread(10.224.250.251:8080)] WARN  org.apache.zookeeper.ClientCnxn - Session 0x0 for server 121.121.121.121/121.121.121.121:8080, unexpected error, closing socket connection and attempting reconnect
java.io.IOException: Packet len1213486160 is out of range!
        at org.apache.zookeeper.ClientCnxnSocket.readLength(ClientCnxnSocket.java:112) ~[zookeeper-3.4.5.jar:3.4.5-1392090]
        at org.apache.zookeeper.ClientCnxnSocketNIO.doIO(ClientCnxnSocketNIO.java:79) ~[zookeeper-3.4.5.jar:3.4.5-1392090]
        at org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:355) ~[zookeeper-3.4.5.jar:3.4.5-1392090]
        at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1068) ~[zookeeper-3.4.5.jar:3.4.5-1392090]

对于:

java.io.IOException: Packet len1213486160 is out of range!

一开始以为是数据包太大,配置参数不对,做了各种调试尝试未果。
后来发现是端口配置错误了,并非8080:

Session 0x0 for server 121.121.121.121/121.121.121.121:8080

所以。如果packet len1213486160 is out of range可能是zk地址端口写错了,检查配置;其他数字的话,需要设置jute.maxbuffer参数来解决