Help: Group Coordinator Not Available
See original GitHub issueHi. 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:
- Created 7 years ago
- Comments:7 (3 by maintainers)
Top GitHub Comments
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.
I have having an issue deleting consumer groups using --bootstrap-server as --zookeeper is not working.