zookeeper集群测试,能启动,但是zkServer.sh status 报错。Error contactinprobablyg service,it is prabobly not running.

java_小怪兽 发布于 05/08 21:48
阅读 116
收藏 0

zoo.cfg配置:
tickTime=2000
initLimit=10
syncLimit=5
dataDir=/opt/zookeeper/zookeeper/data
clientPort=2181
server.1=192.168.56.99:2887:3887
server.2=192.168.56.100:2888:3888
server.3=192.168.56.101:2889:3889

 

报错日志:

2019-05-08 20:55:22,000 - INFO  [main:QuorumPeerConfig@90] - Reading configuration from: /opt/zookeeper/zookeeper/bin/../conf/zoo.cfg
2019-05-08 20:55:22,027 - INFO  [main:QuorumPeerConfig@310] - Defaulting to majority quorums
2019-05-08 20:55:22,057 - INFO  [main:QuorumPeerMain@119] - Starting quorum peer
2019-05-08 20:55:22,138 - INFO  [main:NIOServerCnxn$Factory@143] - binding to port 0.0.0.0/0.0.0.0:2181
2019-05-08 20:55:22,174 - INFO  [main:QuorumPeer@819] - tickTime set to 2000
2019-05-08 20:55:22,175 - INFO  [main:QuorumPeer@830] - minSessionTimeout set to -1
2019-05-08 20:55:22,175 - INFO  [main:QuorumPeer@841] - maxSessionTimeout set to -1
2019-05-08 20:55:22,175 - INFO  [main:QuorumPeer@856] - initLimit set to 10
2019-05-08 20:55:22,218 - INFO  [Thread-1:QuorumCnxManager$Listener@473] - My election bind port: 3888
2019-05-08 20:55:22,230 - INFO  [QuorumPeer:/0:0:0:0:0:0:0:0:2181:QuorumPeer@621] - LOOKING
2019-05-08 20:55:22,232 - INFO  [QuorumPeer:/0:0:0:0:0:0:0:0:2181:FastLeaderElection@663] - New election. My id =  2, Proposed zxid = 0
2019-05-08 20:55:27,248 - WARN  [WorkerSender Thread:QuorumCnxManager@384] - Cannot open channel to 1 at election address /192.168.56.99:3887
java.net.SocketTimeoutException
    at sun.nio.ch.SocketAdaptor.connect(SocketAdaptor.java:118)
    at org.apache.zookeeper.server.quorum.QuorumCnxManager.connectOne(QuorumCnxManager.java:371)
    at org.apache.zookeeper.server.quorum.QuorumCnxManager.toSend(QuorumCnxManager.java:340)
    at org.apache.zookeeper.server.quorum.FastLeaderElection$Messenger$WorkerSender.process(FastLeaderElection.java:360)
    at org.apache.zookeeper.server.quorum.FastLeaderElection$Messenger$WorkerSender.run(FastLeaderElection.java:333)
    at java.lang.Thread.run(Thread.java:748)
2019-05-08 20:55:27,263 - INFO  [WorkerReceiver Thread:FastLeaderElection@496] - Notification: 2 (n.leader), 0 (n.zxid), 1 (n.round), LOOKING (n.state), 2 (n.sid), LOOKING (my state)
2019-05-08 20:55:27,267 - WARN  [WorkerSender Thread:QuorumCnxManager@384] - Cannot open channel to 3 at election address /192.168.56.101:3889
java.net.NoRouteToHostException: No route to host
    at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
    at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:717)
    at sun.nio.ch.SocketAdaptor.connect(SocketAdaptor.java:111)
    at org.apache.zookeeper.server.quorum.QuorumCnxManager.connectOne(QuorumCnxManager.java:371)
    at org.apache.zookeeper.server.quorum.QuorumCnxManager.toSend(QuorumCnxManager.java:340)
    at org.apache.zookeeper.server.quorum.FastLeaderElection$Messenger$WorkerSender.process(FastLeaderElection.java:360)
    at org.apache.zookeeper.server.quorum.FastLeaderElection$Messenger$WorkerSender.run(FastLeaderElection.java:333)
    at java.lang.Thread.run(Thread.java:748)
2019-05-08 20:55:27,283 - WARN  [QuorumPeer:/0:0:0:0:0:0:0:0:2181:QuorumCnxManager@384] - Cannot open channel to 1 at election address /192.168.56.99:3887
java.net.NoRouteToHostException: No route to host
    at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
    at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:717)
    at sun.nio.ch.SocketAdaptor.connect(SocketAdaptor.java:111)
    at org.apache.zookeeper.server.quorum.QuorumCnxManager.connectOne(QuorumCnxManager.java:371)
    at org.apache.zookeeper.server.quorum.QuorumCnxManager.connectAll(QuorumCnxManager.java:404)
    at org.apache.zookeeper.server.quorum.FastLeaderElection.lookForLeader(FastLeaderElection.java:688)
    at org.apache.zookeeper.server.quorum.QuorumPeer.run(QuorumPeer.java:622)
2019-05-08 20:55:27,285 - INFO  [QuorumPeer:/0:0:0:0:0:0:0:0:2181:FastLeaderElection@697] - Notification time out: 400
2019-05-08 20:55:27,692 - WARN  [QuorumPeer:/0:0:0:0:0:0:0:0:2181:QuorumCnxManager@384] - Cannot open channel to 1 at election address /192.168.56.99:3887
java.net.NoRouteToHostException: No route to host
    at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
    at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:717)
    at sun.nio.ch.SocketAdaptor.connect(SocketAdaptor.java:111)
    at org.apache.zookeeper.server.quorum.QuorumCnxManager.connectOne(QuorumCnxManager.java:371)
    at org.apache.zookeeper.server.quorum.QuorumCnxManager.connectAll(QuorumCnxManager.java:404)
    at org.apache.zookeeper.server.quorum.FastLeaderElection.lookForLeader(FastLeaderElection.java:688)
    at org.apache.zookeeper.server.quorum.QuorumPeer.run(QuorumPeer.java:622)
2019-05-08 20:55:27,703 - WARN  [QuorumPeer:/0:0:0:0:0:0:0:0:2181:QuorumCnxManager@384] - Cannot open channel to 3 at election address /192.168.56.101:3889
java.net.NoRouteToHostException: No route to host
    at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
    at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:717)
    at sun.nio.ch.SocketAdaptor.connect(SocketAdaptor.java:111)
    at org.apache.zookeeper.server.quorum.QuorumCnxManager.connectOne(QuorumCnxManager.java:371)
    at org.apache.zookeeper.server.quorum.QuorumCnxManager.connectAll(QuorumCnxManager.java:404)
    at org.apache.zookeeper.server.quorum.FastLeaderElection.lookForLeader(FastLeaderElection.java:688)
    at org.apache.zookeeper.server.quorum.QuorumPeer.run(QuorumPeer.java:622)
2019-05-08 20:55:27,707 - INFO  [QuorumPeer:/0:0:0:0:0:0:0:0:2181:FastLeaderElection@697] - Notification time out: 800
2019-05-08 20:55:28,512 - WARN  [QuorumPeer:/0:0:0:0:0:0:0:0:2181:QuorumCnxManager@384] - Cannot open channel to 1 at election address /192.168.56.99:3887
java.net.NoRouteToHostException: No route to host
    at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
    at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:717)
    at sun.nio.ch.SocketAdaptor.connect(SocketAdaptor.java:111)
    at org.apache.zookeeper.server.quorum.QuorumCnxManager.connectOne(QuorumCnxManager.java:371)
    at org.apache.zookeeper.server.quorum.QuorumCnxManager.connectAll(QuorumCnxManager.java:404)
    at org.apache.zookeeper.server.quorum.FastLeaderElection.lookForLeader(FastLeaderElection.java:688)
    at org.apache.zookeeper.server.quorum.QuorumPeer.run(QuorumPeer.java:622)
2019-05-08 20:55:28,518 - WARN  [QuorumPeer:/0:0:0:0:0:0:0:0:2181:QuorumCnxManager@384] - Cannot open channel to 3 at election address /192.168.56.101:3889
java.net.NoRouteToHostException: No route to host
    at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
    at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:717)
    at sun.nio.ch.SocketAdaptor.connect(SocketAdaptor.java:111)
    at org.apache.zookeeper.server.quorum.QuorumCnxManager.connectOne(QuorumCnxManager.java:371)
    at org.apache.zookeeper.server.quorum.QuorumCnxManager.connectAll(QuorumCnxManager.java:404)
    at org.apache.zookeeper.server.quorum.FastLeaderElection.lookForLeader(FastLeaderElection.java:688)
    at org.apache.zookeeper.server.quorum.QuorumPeer.run(QuorumPeer.java:622)
2019-05-08 20:55:28,522 - INFO  [QuorumPeer:/0:0:0:0:0:0:0:0:2181:FastLeaderElection@697] - Notification time out: 1600
2019-05-08 20:55:30,128 - WARN  [QuorumPeer:/0:0:0:0:0:0:0:0:2181:QuorumCnxManager@384] - Cannot open channel to 1 at election address /192.168.56.99:3887

加载中
0
chinaPG
chinaPG

你系统几块网卡,我之前其他事情遇到过类似问题,两块网卡路由会有问题,你可以配置下路由表试试,我测试用,把其中一个网关去了就好了,我用的CentOS

0
Tim-wgh
Tim-wgh

看看你的所有的myid

0
Tim-wgh
Tim-wgh

也许就是myid的问题

返回顶部
顶部