One broker can't connect to ZooKeeper service

f5emj3cl  于 2023-04-27  发布在  Apache
关注(0)|答案(1)|浏览(145)

So I have 4 Kafka replicas and 4 ZooKeeper replicas running in my cluster, all ZooKeepers are running fine and 3 Kafka pods running fine, but there is 1 Kafka pod that constantly gets this error:
ERROR Exiting Kafka due to fatal exception during startup. (kafka.Kafka$) [main] kafka.zookeeper.ZooKeeperClientTimeoutException: Timed out waiting for connection while in state: CONNECTING
Why is 1 pod failing to find ZooKeeper?
I tried deleting the Pod multiple times, also tried scaling down to 3 replicas in ZooKeeper and Kafka. This also did not work, it just deleted 1 healthy pod and 1 still giving the timeout error.

4xy9mtcn

4xy9mtcn1#

4 ZooKeeper replicas
Never run an even number of Zookeepers. 3 or 5 is the recommendation for small-medium Kafka clusters, as written in Kafka Definitive Guide book.

相关问题