zookeeper:配置的集群信息是domain:端口2888:端口3888;  domain为内网静态ip;每次启动都不能相互连接报错误:

[myid:3] - WARN  [WorkerSender[myid=3]:QuorumCnxManager@382] - Cannot open channel to 1 at election address zook1/10.100.20.73:3888

java.net.ConnectException: Connection refused

at java.net.PlainSocketImpl.socketConnect(Native Method)

at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:339)

at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:200)

at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:182)

at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)

at java.net.Socket.connect(Socket.java:579)

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:745)

修改了下:将hosts文件中配置了:外网ip  domain;  内网ip  domain;  重新启动zookeeper集群,就能正常连接;

诡异的是:我重新删除hosts文件中的配置:外网ip  domain 删除,  然后重启zookeeper集群,竟然能正常连接。。。。

汗颜!!!!!!!!!!!!!!!!!!我测试了几遍   诡异诡异??啥原因呢?部署了两套zookeeper集群都是这现象!!

/etc/hosts文件配置后,不是立马生效么???????????????????

05-11 09:36
查看更多