搭建zookeeper集群时遇到连不通其他结点3888端口的问题
2019-12-30 12:02:50,484 [myid:1] - WARN [WorkerSender[myid=1]:QuorumCnxManager@382] - Cannot open channel to 2 at election address kafka2.test.com/192.168.43.39:3888java.net.ConnectException: Connec..
2019-12-30 12:02:50,484 [myid:1] - WARN [WorkerSender[myid=1]:QuorumCnxManager@382] - Cannot open channel to 2 at election address kafka2.test.com/192.168.43.39:3888
java.net.ConnectException: Connection refused (Connection refused)
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:606)
at org.apache.zookeeper.server.quorum.QuorumCnxManager.connectOne(QuorumCnxManager.java:368)
at org.apache.zookeeper.server.quorum.QuorumCnxManager.toSend(QuorumCnxManager.java:341)
at org.apache.zookeeper.server.quorum.FastLeaderElection$Messenger$WorkerSender.process(FastLeaderElection.java:449)
at org.apache.zookeeper.server.quorum.FastLeaderElection$Messenger$WorkerSender.run(FastLeaderElection.java:430)
at java.lang.Thread.run(Thread.java:748)
检查了zoo.cfg和myid文件,配置的都没有问题。防火墙也关闭了,还是不行。
网上查了一下,
原因一般有:
1.端口被占用
2.ip地址不是本机网卡
解决方案
如果是端口被占用,换一个端口监听即可
如果是原因2.我们需要让服务器监听0.0.0.0的ip(所有网卡)
在conf中的zoo.cfg配置文件中添加
quorumListenOnAllIPs=true
————————————————
版权声明:本文为CSDN博主「Chandler丶」的原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/ouzhuangzhuang/article/details/86702770
查看了端口没有被占用。在zoo.cfg配置中添加了quorumListenOnAllIPs=true,用以监听所有网卡,再启动所有zk servers,管用了。
更多推荐
所有评论(0)