Skip to content
Advertisement

Kafka – Broker: Group coordinator not available

I have the following structure:

JavaScript

Created topic with replication factor 3 and partitions 3 by kafka-topics shell script.

JavaScript

And use group localConsumers. it works fine when leader is ok.

JavaScript

Consumers’ log

JavaScript

But if leader is down – I get the error in consumer (systemctl stop kafka):

Node 3 is unavailable. ok

JavaScript

Consumers’ log

JavaScript

Consumer unable to connect until leader is down or reconnect with another consumer group.

Can’t understand why it happens? Consumer should be rebalanced to another broker, but it doesn’t.

Advertisement

Answer

Try to add properties into the server.conf and clean zookeeper cache. It should help

JavaScript

Root cause of this issue is impossibility to distribute topic offsets between nodes.

Auto generated topic: __consumer_offsets

You can check it by

JavaScript

Pay attention to this article: https://kafka.apache.org/documentation/#prodconfig

by default it creates __consumer_offsets with RF – 1

Important thing is to configure replication factor before the kafka/cluster start. Otherwise it can bring some issues with re configuring instances like in your case.

Advertisement