无法连接到远程zookeeper

iyzzxitl  于 2021-06-07  发布在  Kafka
关注(0)|答案(0)|浏览(351)

我正在尝试设置一个kafka集群,其中有一个zookeeper示例运行在与kafka服务器不同的计算机上。
我可以从同一台计算机连接到zookeeper示例(通过在该计算机上创建kafka服务器),但无法从本地网络中的计算机连接其他kafka服务器。
所有服务器都运行在私有云中,默认情况下所有端口都是打开的。我可以ping和telnet到机器,但我似乎无法访问zookeeper示例:


# On the ZooKeeper machine

> telnet 10.155.208.82 2181
Trying 10.155.208.82...
Connected to 10.155.208.82.

# On any other machine

> telnet 10.155.208.82 22
Trying 10.155.208.82...
Connected to 10.155.208.82.

> telnet 10.155.208.82 2181
Trying 10.155.208.82...

# Nothing happens ...

Kafka在超过连接zookeeper的超时时间后出错: [2015-12-28 18:52:21,632] INFO Initiating client connection, connectString=10.155.208.82:2181 sessionTimeout=6000 watcher=org.I0Itec.zkclient.ZkClient@43ee72e6 (org.apache.zookeeper.ZooKeeper) [2015-12-28 18:52:21,645] INFO Opening socket connection to server 10.155.208.82/10.155.208.82:2181. Will not attempt to authenticate using SASL (unknown error) (org.apache.zookeeper.ClientCnxn) [2015-12-28 18:52:21,650] INFO Waiting for keeper state SyncConnected (org.I0Itec.zkclient.ZkClient) [2015-12-28 18:52:27,651] INFO Terminate ZkClient event thread. (org.I0Itec.zkclient.ZkEventThread) [2015-12-28 18:52:27,758] INFO Session: 0x0 closed (org.apache.zookeeper.ZooKeeper) [2015-12-28 18:52:27,759] INFO EventThread shut down (org.apache.zookeeper.ClientCnxn) [2015-12-28 18:52:27,760] FATAL Fatal error during KafkaServer startup. Prepare to shutdown (kafka.server.KafkaServer) org.I0Itec.zkclient.exception.ZkTimeoutException: Unable to connect to zookeeper server within timeout: 6000 at org.I0Itec.zkclient.ZkClient.connect(ZkClient.java:1223) at org.I0Itec.zkclient.ZkClient.<init>(ZkClient.java:155) at org.I0Itec.zkclient.ZkClient.<init>(ZkClient.java:129) at kafka.utils.ZkUtils$.createZkClientAndConnection(ZkUtils.scala:89) at kafka.utils.ZkUtils$.apply(ZkUtils.scala:71) at kafka.server.KafkaServer.initZk(KafkaServer.scala:278) at kafka.server.KafkaServer.startup(KafkaServer.scala:168) at kafka.server.KafkaServerStartable.startup(KafkaServerStartable.scala:37) at kafka.Kafka$.main(Kafka.scala:67) at kafka.Kafka.main(Kafka.scala) [2015-12-28 18:52:27,764] INFO shutting down (kafka.server.KafkaServer) [2015-12-28 18:52:27,770] INFO shut down completed (kafka.server.KafkaServer) [2015-12-28 18:52:27,771] FATAL Fatal error during KafkaServerStartable startup. Prepare to shutdown (kafka.server.KafkaServerStartable) 我做错什么了?如果有帮助的话,虚拟机在私有云中没有任何主机名分配给它们。

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题