连接到其他节点(3节点集群)时出现zookeeper错误

wmtdaxz3  于 2021-06-04  发布在  Kafka
关注(0)|答案(0)|浏览(215)

在连接到3节点apache kafka集群中的zookeeper集群时,zk无法连接到其他zk集群节点。请建议如何调试此问题?这个apachekafka集群在上个月之前运行良好,现在已经观察到了这个错误。
另外,在创建docker compose时,我们观察到了与python2相关的错误,因此安装了cryptography==2.4.2

pip install cryptography==2.4.2

在zookeeper docker日志中发现以下错误:

[2020-09-04 17:46:14,711] INFO Notification time out: 60000 (org.apache.zookeeper.server.quorum.FastLeaderElection)
[2020-09-04 17:47:10,370] INFO Accepted socket connection from /10.10.6.5:38930 (org.apache.zookeeper.server.NIOServerCnxnFactory)
[2020-09-04 17:47:12,511] INFO Processing stat command from /10.10.6.5:38930 (org.apache.zookeeper.server.NIOServerCnxn)
[2020-09-04 17:47:12,512] INFO Closed socket connection for client /10.10.6.5:38930 (no session established for client) (org.apache.zookeeper.server.NIOServerCnxn)
[2020-09-04 17:47:19,712] WARN Cannot open channel to 2 at election address /10.10.7.5:3888 (org.apache.zookeeper.server.quorum.QuorumCnxManager)
java.net.SocketTimeoutException: connect timed out
    at java.net.PlainSocketImpl.socketConnect(Native Method)
    at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
    at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
    at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
    at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
    at java.net.Socket.connect(Socket.java:589)
    at org.apache.zookeeper.server.quorum.QuorumCnxManager.connectOne(QuorumCnxManager.java:381)
    at org.apache.zookeeper.server.quorum.QuorumCnxManager.connectAll(QuorumCnxManager.java:426)
    at org.apache.zookeeper.server.quorum.FastLeaderElection.lookForLeader(FastLeaderElection.java:843)
    at org.apache.zookeeper.server.quorum.QuorumPeer.run(QuorumPeer.java:822)

如果我为集群节点删除与zookeeper相关的配置,并且在单个节点中运行,它将正常工作。这个问题只在我尝试在3节点集群中运行时出现。
端口2888和3888在aws示例中打开。

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题