1
我一直在努力與3節點Kafka集羣設置。我已經看過所有的答案,似乎在做一切正確的事情。但是,Zookeeper無法同步,因此kafka服務器無法連接。卡夫卡3節點集羣動物園管理員無法連接
這裏是我的飼養員配置
dataDir=/home/kafka/zookeeper/data
# the port at which the clients will connect
clientPort=2181
# disable the per-ip limit on the number of connections since this is a non-production config
maxClientCnxns=50
server.1=0.0.0.0:2888:3888
server.2=139.59.80.73:2888:3888
server.3=139.59.80.76:2888:3888
initLimit=5
syncLimit=2
在每一個我已經設置了server.id爲0.0.0.0如SO答案的一個建議的其他服務器。所以server.2在第二臺機器上會有0.0.0.0。我已經重新檢查了數據目錄中的myid文件以獲得相應的ID。
即使等待,而動物園管理員服務不sychronize,我總是看到這些異常後:
2017-07-31 12:40:49,110] WARN Cannot open channel to 1 at election address /139.59.80.4:3888 (org.apache.zookeeper.server.quorum.QuorumCnxManager)
java.net.NoRouteToHostException: No route to host (Host unreachable)
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:562)
at org.apache.zookeeper.server.quorum.QuorumCnxManager.toSend(QuorumCnxManager.java:538)
at org.apache.zookeeper.server.quorum.FastLeaderElection$Messenger$WorkerSender.process(FastLeaderElection.java:452)
at org.apache.zookeeper.server.quorum.FastLeaderElection$Messenger$WorkerSender.run(FastLeaderElection.java:433)
at java.lang.Thread.run(Thread.java:748)
讓我困擾的是,我可以telnet到對方計算機上的端口2181,但動物園管理員服務未能連接。完全困惑。任何幫助將不勝感激。