故障报告
1. 问题(故障)描述
kafka日志报错信息:
[2022-06-02 11:32:35,558] INFO zookeeper state changed (SyncConnected) (org.I0Itec.zkclient.ZkClient)
[2022-06-02 11:32:35,593] WARN Session 0x281227352a30000 for server 88.9.0.40/88.9.0.40:2181, unexpected error, closing socket connection and attempting reconnect (org.apache.zookeeper.ClientCnxn)
java.io.IOException: Packet len4194375 is out of range!
at org.apache.zookeeper.ClientCnxnSocket.readLength(ClientCnxnSocket.java:112)
at org.apache.zookeeper.ClientCnxnSocketNIO.doIO(ClientCnxnSocketNIO.java:79)
at org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:366)
at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1141)
[2022-06-02 11:32:35,694] INFO zookeeper state changed (Disconnected) (org.I0Itec.zkclient.ZkClient)
[2022-06-02 11:32:35,694] INFO Waiting for keeper state SyncConnected (org.I0Itec.zkclient.ZkClient)
[2022-06-02 11:32:36,311] INFO Opening socket connection to server 88.9.0.41/88.9.0.41:2181. Will not attempt to authenticate using SASL (unknown error) (org.apache.zookeeper.ClientCnxn)
[2022-06-02 11:32:36,312] INFO Socket connection established to 88.9.0.41/88.9.0.41:2181, initiating session (org.apache.zookeeper.ClientCnxn)
[2022-06-02 11:32:36,314] INFO Session establishment complete on server 88.9.0.41/88.9.0.41:2181, sessionid = 0x281227352a30000, negotiated timeout = 200000 (org.apache.zookeeper.ClientCnxn)
2. 问题(故障)原因
3. 解决
修改bin/kafka-server-start.sh的kafka启动脚本,添加-Djute.maxbuffer=10485760参数:
if [ "x$KAFKA_LOG4J_OPTS" = "x" ]; then
export KAFKA_LOG4J_OPTS="-Djute.maxbuffer=10485760 -Dlog4j.configuration=file:$base_dir/../config/log4j.properties"
fi
4. 参考
文档更新时间: 2022-08-18 22:36 作者:周风磊