[异常笔记] zookeeper集群启动异常:Error contacting service. It is probably not running.

報錯信息

zookeeper服務已經啓動,但是狀態是Error contacting service. It is probably not running.

2021-02-23 21:00:41,605 [myid:1] - INFO  [WorkerSender[myid=1]:QuorumPeer$QuorumServer@149] - Resolved hostname: 10.69.75.17 to address: /10.69.75.17
2021-02-23 21:00:41,803 [myid:1] - INFO  [QuorumPeer[myid=1]/0.0.0.0:2181:QuorumPeer@844] - FOLLOWING
2021-02-23 21:00:41,803 [myid:1] - INFO  [QuorumPeer[myid=1]/0.0.0.0:2181:ZooKeeperServer@173] - Created server with tickTime 2000 minSessionTimeout 4000 maxSession
Timeout 40000 datadir /data/apps/zookeeper/zookeeper-3.4.9/version-2 snapdir /data/apps/zookeeper/zookeeperData/version-2
2021-02-23 21:00:41,803 [myid:1] - INFO  [QuorumPeer[myid=1]/0.0.0.0:2181:Follower@61] - FOLLOWING - LEADER ELECTION TOOK - 205
2021-02-23 21:00:41,803 [myid:1] - INFO  [QuorumPeer[myid=1]/0.0.0.0:2181:QuorumPeer$QuorumServer@149] - Resolved hostname: 10.69.72.121 to address: /10.69.72.121
2021-02-23 21:00:41,806 [myid:1] - WARN  [QuorumPeer[myid=1]/0.0.0.0:2181:Learner@236] - Unexpected exception, tries=0, connecting to /10.69.72.121:2888
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:589)
        at org.apache.zookeeper.server.quorum.Learner.connectToLeader(Learner.java:228)
        at org.apache.zookeeper.server.quorum.Follower.followLeader(Follower.java:69)
        at org.apache.zookeeper.server.quorum.QuorumPeer.run(QuorumPeer.java:846)
2021-02-23 21:00:42,826 [myid:1] - INFO  [QuorumPeer[myid=1]/0.0.0.0:2181:Learner@326] - Getting a diff from the leader 0x0
2021-02-23 21:00:42,828 [myid:1] - INFO  [QuorumPeer[myid=1]/0.0.0.0:2181:FileTxnSnapLog@240] - Snapshotting: 0x0 to /data/apps/zookeeper/zookeeperData/version-2/snapshot.0
2021-02-23 21:00:43,803 [myid:1] - INFO  [/0.0.0.0:3888:QuorumCnxManager$Listener@541] - Received connection request /10.69.67.111:9638
2021-02-23 21:00:43,804 [myid:1] - WARN  [SendWorker:2:QuorumCnxManager$SendWorker@727] - Interrupted while waiting for message on queue
java.lang.InterruptedException

解決辦法

解决方法:本机用节点 用  0.0.0.0  IP代替主机名

[hadoop@cdh02 ~]$ cat  /opt/software/zookeeper-3.4.13/conf/zoo.cfg
server.1=0.0.0.0:2888:3888
server.2=cdh03:2888:3888
server.3=cdh04:2888:3888

[hadoop@cdh03 ~]$ cat  /opt/software/zookeeper-3.4.13/conf/zoo.cfg
server.1=cdh02:2888:3888
server.2=0.0.0.0:2888:3888
server.3=cdh04:2888:3888


[hadoop@cdh04 ~]$ cat  /opt/software/zookeeper-3.4.13/conf/zoo.cfg
server.1=cdh02:2888:3888
server.2=cdh03:2888:3888
server.3=0.0.0.0:2888:3888
posted @ 2021-02-23 21:04  高宏宇  阅读(326)  评论(0编辑  收藏  举报