ID为1的连接断开的根本原因,我的id = 3,错误=

时间:2018-04-06 12:22:33

标签: apache-kafka apache-zookeeper confluent-kafka

我正在使用Confluent 4进行kafka和zookeeper的安装。

在我们的Kafka群集环境中(在3个aws实例上运行的3个代理和3个zookeeper节点) 我们看到一组以下警告,反复记录在经纪人的server.log文件中。

我们尚未发现任何功能问题,但我们无法找到根本原因,将来可能会影响客户端或其他代理节点。我们还不确定这一点。以下是一组警告

[2018-04-03 12:00:40,707] WARN Interrupted while waiting for message on queue (org.apache.zookeeper.server.quorum.QuorumCnxManager)
java.lang.InterruptedException
 at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.reportInterruptAfterWait(AbstractQueuedSynchronizer.java:2014)
 at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2088)
 at java.util.concurrent.ArrayBlockingQueue.poll(ArrayBlockingQueue.java:418)
 at org.apache.zookeeper.server.quorum.QuorumCnxManager.pollSendQueue(QuorumCnxManager.java:1097)
 at org.apache.zookeeper.server.quorum.QuorumCnxManager.access$700(QuorumCnxManager.java:74)
 at org.apache.zookeeper.server.quorum.QuorumCnxManager$SendWorker.run(QuorumCnxManager.java:932)
[2018-04-03 12:00:40,707] WARN Connection broken for id 1, my id = 3, error =  (org.apache.zookeeper.server.quorum.QuorumCnxManager)
java.net.SocketException: Socket closed
 at java.net.SocketInputStream.socketRead0(Native Method)
 at java.net.SocketInputStream.socketRead(SocketInputStream.java:116)
 at java.net.SocketInputStream.read(SocketInputStream.java:171)
 at java.net.SocketInputStream.read(SocketInputStream.java:141)
 at java.io.BufferedInputStream.fill(BufferedInputStream.java:246)
 at java.io.BufferedInputStream.read(BufferedInputStream.java:265)
 at java.io.DataInputStream.readInt(DataInputStream.java:387)
 at org.apache.zookeeper.server.quorum.QuorumCnxManager$RecvWorker.run(QuorumCnxManager.java:1013)
[2018-04-03 12:00:40,708] WARN Interrupting SendWorker (org.apache.zookeeper.server.quorum.QuorumCnxManager)
[2018-04-03 12:00:40,707] WARN Send worker leaving thread (org.apache.zookeeper.server.quorum.QuorumCnxManager) 

这一组警告会重复并在所有3个kafka节点中被观察到。

如果有人知道为什么会产生此警告,请告诉我。

提前致谢。

2 个答案:

答案 0 :(得分:0)

这听起来像是Zk较新版本的已知问题,请查看此JIRA https://issues.apache.org/jira/browse/ZOOKEEPER-2938

答案 1 :(得分:0)

就我而言,我正在更换一个 ZK 节点,而我没有意识到旧节点仍在运行。所以我用相同的“myid”创建了 2x 个节点。