Kafka: CoordinatorNotAvailableException: The coordinator is not available
org.apache.kafka.common.errors.CoordinatorNotAvailableExceptionThe coordinator is not available.The broker that coordinates the consumer group (or a transaction) is not ready: it is starting, the __consumer_offsets partition it leads has no leader, or that internal topic was created with too few replicas. Clients retry automatically; persistent errors point to an unhealthy internal topic.
Common causes
- Brokers are restarting or a leader election is in progress.How to confirm: The errors stop within seconds after the cluster settles.
- __consumer_offsets has partitions without a leader, often because its replication factor is higher than the number of live brokers.How to confirm: kafka-topics --describe --topic __consumer_offsets shows Leader: none for some partitions.
How to fix it
Make sure __consumer_offsets has a leader for every partition; on small clusters set the offsets topic replication factor to the number of brokers before the topic is created.
| Setting | Default | Note |
|---|---|---|
offsets.topic.replication.factor | 3 | broker |
Where the message comes from
Errors.javainapache/kafkaat4.3.2- Message checked in Kafka 4.3.2