kafka拒绝连接zookeeper

博静玉歌 发表于: 2018-11-12   最后更新时间: 2018-11-12 20:44:20   7,109 游览

kafka连接zookeeper时报错:

FATAL Fatal error during KafkaServer startup. Prepare to shutdown (kafka.server error during KafkaServer startup. Prepare to shutdown (kafka.server.KafkaServer)
orgFATALl error during KafkaServer startup. Prepare to shutdownerrorFATAL Fatal error during KafkaServeratal error during KafkaServer startup. Prepare to shutdown (kafka.serverl error duringFATAL Fatal error during KafkaServer startupl errorFATAL Fatal error during KafkaServer startup. Prepare toerrorFATAL Fatal error during KafkaServer startup. Prepareatal error during KafkaServer startup. Prepare to shutdown (kafka.server.KafkaServer)
org.I0Itec.zkclient.exceptionl error during KafkaServer startup. Prepare to shutdown (kafka.server.KafkaServer)
orgl errorFATAL Fatal error during KafkaServer startup. Prepare toFATALerror during KafkaServer startup. Prepare to shutdown (kafkaatal errorFATAL Fatal error during KafkaServer startup. Prepare to shutdown (kafka.server.KafkaServer)
org.I0Itec.zkclient.exception.ZkTimeoutException: Unable tol error during KafkaServer startup. Prepare to shutdown (kafka.server.KafkaServer)
orgl errorFATAL Fatal error during KafkaServer startup. Prepare to shutdownerrorFATAL Fatal error during KafkaServer startup. Prepare toatal errorFATAL Fatal error during KafkaServer startup. Prepare to shutdown (kafka.server.KafkaServer)
org.I0Itecl errorServer startupFATAL Fatal error during KafkaServer startup. Prepare toFATAL Fatal error during KafkaServer startup. Prepare to shutdownFATALerror during KafkaServer startup. Prepare to shutdown (kafkaFATALFATAL Fatal error during KafkaServer startup. Prepare to shutdown (kafka.server.KafkaServer)
org.I0Itecl errorServer startup. Prepare to shutdown (kafka.server.KafkaServer)
orgFATAL Fatal error during KafkaServer startup. Prepare to shutdown (kafka.serverFATALerror during KafkaServer startup. Prepare to shutdownFATAL FatalFATAL Fatal error duringFATAL Fatal error during KafkaServer startup. Prepare to shutdown (kafka.server.KafkaServer)
org.I0Itec.zkclient.exception.ZkTimeoutException: Unable to connect to zookeeper server 'localhost:2181' with timeout of 6000 ms

请问如何解决?

发表于 2018-11-12
添加评论

telnet localhost 2181

先看网络通不通

博静玉歌 -> 半兽人 6年前

Trying ::1...
Connected to localhost.
Escape character is '^]'.


Connection closed by foreign host.

半兽人 -> 博静玉歌 6年前

telnet进到命令后,输入 mntr ,查看zk是否正常。
另外,贴下你连接kafka的那段配置

博静玉歌 -> 半兽人 6年前

已经好了 谢谢 加了一行host.name=172.16.1.113就连接上了

你的答案

查看kafka相关的其他问题或提一个您自己的问题