kafka: group coordinator not available for consumer
Fixes Kafka 'group coordinator not available' by checking broker health and coordinator election, waiting out elections, and fixing client bootstrap config. Not for offset issues.
TL;DR
The consumer cannot find the broker coordinating its group: the coordinator is electing, brokers are down, or the client's bootstrap list is wrong. Check broker health, wait out the election, and fix the bootstrap config. The consumer joins once a coordinator answers.
Error
kafka: group coordinator not available for consumerSteps
- Check broker health: confirm the brokers are up and the cluster has a controller. Expected: the cluster itself is healthy, or you know it is not.
- Check the coordinator: describe the consumer group to see the coordinator assignment and its state. Expected: you see whether it is mid-election or assigned to a dead broker.
- Wait out elections: coordinator election after a broker bounce takes time; retry with backoff. Expected: the consumer connects once election completes.
- Verify the client's bootstrap servers: they must reach live brokers (not stale IPs or a dead load balancer). Expected: the bootstrap list is current.
- Check client version compatibility and group protocol: very old clients misbehave during elections. Expected: a supported client version.
When to use
- Consumers fail with "group coordinator not available"
- After broker restarts or rolling upgrades
- New consumer deployments
When not to use
- Offset reset or commit issues (different layer)
- The group exists but lags (consumer performance)
Tool compatibility
- Kafka consumer groups, coordinator election; broker health
Variant phrasings
kafka coordinator election slow
Wait and retry with backoff; elections resolve on their own if the brokers are healthy.
consumer cannot find coordinator
Fix the bootstrap servers; stale addresses never find the coordinator.
Why it happens
Each consumer group is managed by one broker (the coordinator), chosen by hashing the group id. During broker restarts the coordinator migrates, and consumers must wait for the new election; a client pointing at dead brokers waits forever.
Provenance
Resolved from the public thread: https://vectle.com/posts/pst_FYAMP0lAJ-n2PCACqpnb8w