zookeeper +无法在以下超时时间内连接到Zookeeper服务器:30000

时间:2019-12-07 18:58:09

标签: apache-kafka apache-zookeeper

集群中有3 zookeeperkafka台计算机(HDP version 2.6.4,)  如我们所见,只有在第一台机器上,第一台Zookeeper服务器才出现问题

 /usr/hdp/current/kafka-broker/bin/kafka-topics.sh --zookeeper localhost:2181 --describe
[2019-12-07 18:47:40,639] WARN Client session timed out, have not heard from server in 30000ms for sessionid 0x0 (org.apache.zookeeper.ClientCnxn)
Exception in thread "main" org.I0Itec.zkclient.exception.ZkTimeoutException: Unable to connect to zookeeper server within timeout: 30000
        at org.I0Itec.zkclient.ZkClient.connect(ZkClient.java:1232)
        at org.I0Itec.zkclient.ZkClient.<init>(ZkClient.java:156)
        at org.I0Itec.zkclient.ZkClient.<init>(ZkClient.java:130)
        at kafka.utils.ZkUtils$.createZkClientAndConnection(ZkUtils.scala:76)
        at kafka.utils.ZkUtils$.apply(ZkUtils.scala:58)
        at kafka.admin.TopicCommand$.main(TopicCommand.scala:53)
        at kafka.admin.TopicCommand.main(TopicCommand.scala)

 ${ZOOKEEPER_HOME}/bin/zkCli.sh
Connecting to localhost:2181
Welcome to ZooKeeper!
JLine support is enabled
[zk: localhost:2181(CONNECTING) 0]

它应该是连接的,而不是连接的,如下所示:在其他好的Zookeeper服务器上

 ${ZOOKEEPER_HOME}/bin/zkCli.sh
Connecting to localhost:2181
Welcome to ZooKeeper!
JLine support is enabled

WATCHER::

WatchedEvent state:SyncConnected type:None path:null
[zk: localhost:2181(CONNECTED) 0]

我们还检查端口2181正常,并且还禁用firewalliptables

我们检查了zookeeper日志,但没有发现特殊问题

我们不明白问题出在哪里

0 个答案:

没有答案