为什么卡夫卡崩溃?

时间:2020-06-30 08:08:46

标签: apache-kafka

我有kafka 2.5.0 我的服务卡夫卡有时会崩溃。

kafka / logs / server.log

[09:25:23,316] WARN Unable to read additional data from client sessionid 0x1000001a8fd0012, likely client has closed socket (org.apache.zookeeper.server.NIOServerCnxn)

/ var / log / messages

09:25:23 kafka1 systemd: kafka.service: main process exited, code=exited, status=1/FAILURE
09:25:23 kafka1 systemd: Unit kafka.service entered failed state.
09:25:23 kafka1 systemd: kafka.service failed.

如何找出发生这种情况的原因?

1 个答案:

答案 0 :(得分:0)

首先检查Zookeeper是否正在运行。

如果它正在运行,请尝试在zoo.cfg中更改这些设置:

autopurge.snapRetainCount=15 (at least)
autopurge.purgeInterval=1 - 2 hours

一些提示可能在这里:

zookeeper + Unable to read additional data from client session id

ZooKeeper keeps getting EndOfStreamException, causing a crash