我在Kubernetes启动Kafka时遇到了问题。从Kafka的日志中可以看出,连接到Zookeeper服务时出现了一些问题。
kafka.zookeeper.ZooKeeperClientTimeoutException: Timed out waiting for connection while in state: CONNECTING
at kafka.zookeeper.ZooKeeperClient.$anonfun$waitUntilConnected$3(ZooKeeperClient.scala:254)
at kafka.zookeeper.ZooKeeperClient.waitUntilConnected(ZooKeeperClient.scala:250)
at kafka.zookeeper.ZooKeeperClient.<init>(ZooKeeperClient.scala:108)
at kafka.zk.KafkaZkClient$.apply(KafkaZkClient.scala:1981)
at kafka.server.KafkaServer.initZkClient(KafkaServer.scala:457)
at kafka.server.KafkaServer.startup(KafkaServer.scala:196)
at kafka.Kafka$.main(Kafka.scala:109)
at kafka.Kafka.main(Kafka.scala)
[2021-10-30 11:17:47,109] INFO shutting down (kafka.server.KafkaServer)
[2021-10-30 11:17:47,119] INFO App info kafka.server for 0 unregistered (org.apache.kafka.common.utils.AppInfoParser)
[2021-10-30 11:17:47,120] INFO shut down completed (kafka.server.KafkaServer)
[2021-10-30 11:17:47,120] ERROR Exiting Kafka. (kafka.Kafka$)
[2021-10-30 11:17:47,122] INFO shutting down (kafka.server.KafkaServer)
我可以确认zookeeper已经启动。yml文件可以在here中找到。
1条答案
按热度按时间0x6upsns1#
错误是说Zookeeper在您提供的地址不可用...
根据我的经验,Kompose没有在服务之间正确设置网络
我建议您使用预先存在的Helm图表或https://Strimzi.io或https://banzaicloud.com/docs/supertubes/kafka-operator/等运算符