question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Help: Group Coordinator Not Available

See original GitHub issue

Hi. I have the latest version of kafka-python.

from kafka import KafkaConsumer
consumer = KafkaConsumer('site_index_queue', group_id='test_group', bootstrap_servers=['kafka201:9092','kafka202:9092','kafka203:9092'])
for message in consumer:                                                                                                                
    print ("%s:%d:%d: key=%s value=%s" % (message.topic, message.partition,
                                              message.offset, message.key,
                                              message.value))

DEBUG:kafka.coordinator:Sending group coordinator request for group test_group to broker 394 DEBUG:kafka.conn:<BrokerConnection host=kafka202/144.76.183.202 port=9092> Request 5: GroupCoordinatorRequest_v0(consumer_group=‘test_group’) DEBUG:kafka.client:Initializing connection to node 392 for metadata request DEBUG:kafka.client:Initiating connection to node 392 at kafka203:9092 DEBUG:kafka.conn:<BrokerConnection host=kafka203/kafka203 port=9092>: creating new socket DEBUG:kafka.client:Initializing connection to node 393 for metadata request DEBUG:kafka.client:Initiating connection to node 393 at kafka201:9092 DEBUG:kafka.conn:<BrokerConnection host=kafka201/kafka201 port=9092>: creating new socket DEBUG:kafka.conn:<BrokerConnection host=kafka203/144.76.183.198 port=9092>: established TCP connection DEBUG:kafka.client:Node 392 connected DEBUG:kafka.conn:<BrokerConnection host=kafka201/144.76.183.131 port=9092>: established TCP connection DEBUG:kafka.client:Node 393 connected DEBUG:kafka.client:Sending metadata request MetadataRequest_v0(topics=[‘site_index_queue’]) to node 393 DEBUG:kafka.conn:<BrokerConnection host=kafka201/144.76.183.131 port=9092> Request 1: MetadataRequest_v0(topics=[‘site_index_queue’]) DEBUG:kafka.conn:<BrokerConnection host=kafka202/144.76.183.202 port=9092> Response 5: GroupCoordinatorResponse_v0(error_code=15, coordinator_id=-1, host=u’‘, port=-1) DEBUG:kafka.coordinator:Received group coordinator response GroupCoordinatorResponse_v0(error_code=15, coordinator_id=-1, host=u’‘, port=-1) DEBUG:kafka.coordinator:Group Coordinator Not Available; retry DEBUG:kafka.coordinator:Sending group coordinator request for group test_group to broker 392 DEBUG:kafka.conn:<BrokerConnection host=kafka203/144.76.183.198 port=9092> Request 1: GroupCoordinatorRequest_v0(consumer_group=‘test_group’) DEBUG:kafka.conn:<BrokerConnection host=kafka201/144.76.183.131 port=9092> Response 1: MetadataResponse_v0(brokers=[(node_id=392, host=u’kafka203’, port=9092), (node_id=393, host=u’kafka201’, port=9092), (node_id=394, host=u’kafka202’, port=9092)], topics=[(error_code=0, topic=u’site_index_queue’, partitions=[(error_code=0, partition=2, leader=392, replicas=[392, 393, 394], isr=[392, 394, 393]), (error_code=0, partition=1, leader=394, replicas=[394, 392, 393], isr=[392, 394, 393]), (error_code=0, partition=0, leader=393, replicas=[393, 394, 392], isr=[392, 394, 393])])]) DEBUG:kafka.cluster:Updated cluster metadata to Cluster(brokers: 3, topics: 1, groups: 0) DEBUG:kafka.conn:<BrokerConnection host=kafka203/144.76.183.198 port=9092> Response 1: GroupCoordinatorResponse_v0(error_code=15, coordinator_id=-1, host=u’‘, port=-1) DEBUG:kafka.coordinator:Received group coordinator response GroupCoordinatorResponse_v0(error_code=15, coordinator_id=-1, host=u’‘, port=-1) DEBUG:kafka.coordinator:Group Coordinator Not Available; retry DEBUG:kafka.coordinator:Sending group coordinator request for group test_group to broker 394 DEBUG:kafka.conn:<BrokerConnection host=kafka202/144.76.183.202 port=9092> Request 6: GroupCoordinatorRequest_v0(consumer_group=‘test_group’) DEBUG:kafka.conn:<BrokerConnection host=kafka202/144.76.183.202 port=9092> Response 6: GroupCoordinatorResponse_v0(error_code=15, coordinator_id=-1, host=u’‘, port=-1) DEBUG:kafka.coordinator:Received group coordinator response GroupCoordinatorResponse_v0(error_code=15, coordinator_id=-1, host=u’‘, port=-1) DEBUG:kafka.coordinator:Group Coordinator Not Available; retry DEBUG:kafka.coordinator:Sending group coordinator request for group test_group to broker 394 DEBUG:kafka.conn:<BrokerConnection host=kafka202/144.76.183.202 port=9092> Request 7: GroupCoordinatorRequest_v0(consumer_group=‘test_group’) DEBUG:kafka.conn:<BrokerConnection host=kafka202/144.76.183.202 port=9092> Response 7: GroupCoordinatorResponse_v0(error_code=15, coordinator_id=-1, host=u’‘, port=-1) DEBUG:kafka.coordinator:Received group coordinator response GroupCoordinatorResponse_v0(error_code=15, coordinator_id=-1, host=u’', port=-1) DEBUG:kafka.coordinator:Group Coordinator Not Available; retry DEBUG:kafka.coordinator:Sending group coordinator request for group test_group to broker 394 DEBUG:kafka.conn:<BrokerConnection host=kafka202/144.76.18

3.202 port=9092> Request 8: GroupCoordinatorRequest_v0(consumer_group=‘test_group’) DEBUG:kafka.conn:<BrokerConnection host=kafka202/144.76.183.202 port=9092> Response 8: GroupCoordinatorResponse_v0(error_code=15, coordinator_id=-1, host=u’‘, port=-1) DEBUG:kafka.coordinator:Received group coordinator response GroupCoordinatorResponse_v0(error_code=15, coordinator_id=-1, host=u’‘, port=-1) DEBUG:kafka.coordinator:Group Coordinator Not Available; retry DEBUG:kafka.coordinator:Sending group coordinator request for group test_group to broker 393 DEBUG:kafka.conn:<BrokerConnection host=kafka201/144.76.183.131 port=9092> Request 2: GroupCoordinatorRequest_v0(consumer_group=‘test_group’) DEBUG:kafka.conn:<BrokerConnection host=kafka201/144.76.183.131 port=9092> Response 2: GroupCoordinatorResponse_v0(error_code=15, coordinator_id=-1, host=u’‘, port=-1) DEBUG:kafka.coordinator:Received group coordinator response GroupCoordinatorResponse_v0(error_code=15, coordinator_id=-1, host=u’', port=-1) DEBUG:kafka.coordinator:Group Coordinator Not Available; retry

What’s wrong? What does this (DEBUG:kafka.coordinator:Received group coordinator response GroupCoordinatorResponse_v0(error_code=15, coordinator_id=-1, host=u’', port=-1)) mean? How can I fix this?

Thanks for any help.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
mlyashkovcommented, Jul 6, 2016

I apologize for the trouble. The problem was in my cluster. When analyzing the logs I was able to find some phantom brokers. I had to manually delete all directories of zookeeper and reboot production cluster. I confirm that the problems were not with the library. Special thanks for the speed response.

0reactions
avaneesgexfcommented, Aug 28, 2018

I have having an issue deleting consumer groups using --bootstrap-server as --zookeeper is not working.

  • Group ‘console-consumer-3590’ could not be deleted due to: COORDINATOR_NOT_AVAILABLE
Read more comments on GitHub >

github_iconTop Results From Across the Web

The group coordinator is not available-Kafka - Stack Overflow
I faced a similar issue. The problem was when you start your Kafka broker there is a property associated with it, "KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR".
Read more >
Kafka cluster health check fails with the error "Group ...
This article provides a workaround for the Kafka health check error "Group coordinator lookup failed: The coordinator is not available."
Read more >
CoordinatorNotAvailableException (kafka 1.0.1 API)
In the context of the group coordinator, the broker returns this error code for metadata or offset commit requests if the group metadata...
Read more >
The Group Coordinator Is Not Available-Kafka - ADocLib
Root cause of this issue is impossibility to distribute topic offsets between nodes. Important thing is to configure replication factor before the kafka/cluster ......
Read more >
Group coordinator lookup failed. The coordinator is not available
Kafka consumer : Group coordinator lookup failed. ... Find Coordinator messages to it and the broker responds with Coordinator not found.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found