Kubernetes 中的 Kafka 服务不是 运行
Kafka service not running in Kubernetes
我在 kubernetes 中启动 kafka 时遇到问题。 Kafka 日志显示连接到 zookeeper 服务时出现问题。
kafka.zookeeper.ZooKeeperClientTimeoutException: Timed out waiting for connection while in state: CONNECTING
at kafka.zookeeper.ZooKeeperClient.$anonfun$waitUntilConnected(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.
错误是说 Zookeeper 在您提供的地址不可用...
根据我的经验,Kompose 没有在服务之间正确设置网络
我建议您使用预先存在的 Helm Charts 或运算符,例如 https://Strimzi.io or https://banzaicloud.com/docs/supertubes/kafka-operator/
我在 kubernetes 中启动 kafka 时遇到问题。 Kafka 日志显示连接到 zookeeper 服务时出现问题。
kafka.zookeeper.ZooKeeperClientTimeoutException: Timed out waiting for connection while in state: CONNECTING
at kafka.zookeeper.ZooKeeperClient.$anonfun$waitUntilConnected(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.
错误是说 Zookeeper 在您提供的地址不可用...
根据我的经验,Kompose 没有在服务之间正确设置网络
我建议您使用预先存在的 Helm Charts 或运算符,例如 https://Strimzi.io or https://banzaicloud.com/docs/supertubes/kafka-operator/