I am having issues starting up kafka in kubernetes. From the Kafka logs it shows that there is some issue connecting to the zookeeper service.
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)
I can confirm that zookeeper is up. The yml files can be found here.
CodePudding user response:
The error is saying Zookeeper isn't available at the address you've provided...
In my experience, Kompose doesn't setup the network correctly between services
I suggest you use pre-existing Helm Charts or operators such as https://Strimzi.io or https://banzaicloud.com/docs/supertubes/kafka-operator/