Reply
Expert Contributor
Posts: 76
Registered: ‎05-09-2017

Re: Error in kafka consumer

we have fixed this issue. 

New Contributor
Posts: 1
Registered: ‎10-23-2018

Re: Error in kafka consumer

I am able to connect to kafka manually through terminal providing details like topic, seed broker and schema url. But when I try to run automation and use ruby-kafka gem to connect with exactly same details I get the following error:
 Failed to find coordinator (Kafka::Error)
      ./features/lib/uevents/kafka_consumer.rb:33:in `block in initialize'
New Contributor
Posts: 1
Registered: ‎11-14-2018

Re: Error in kafka consumer

I am happy you fixed the issue, but next time you might consider writing some details about how you get out of that trouble situation as others might be in same situation as well :-)

Expert Contributor
Posts: 76
Registered: ‎05-09-2017

Re: Error in kafka consumer

[ Edited ]

This was an issue with that consumer group in __consumer_offsets adn these were the steps we did to fix this issue

 

On a single broker run the below 

 

1) find /kafka/data -name "*.log" | grep -i consumer | awk '{a=$1;b="kafka-run-class kafka.tools.DumpLogSegments --deep-iteration --print-data-log -files "a; print b}'

 

Now run each and every command on xxxx broker to see which log file has consumer group "prod-abc-events" 

 

2) kafka-run-class kafka.tools.DumpLogSegments --deep-iteration --print-data-log -files  /kafka/data/sdc/__consumer_offsets-24/00000000000000000000.log  | grep -i 'prod-abc-events

 

Do steps above on all the brokers and make a list of all the files that have 'prod-abc-events' . In our instance we found 3 files that refrenced this group "prod-abc-events' 

 

broker1:
/kafka/data/sda/__consumer_offsets-24/00000000000000000000.log
 
broker2:
/kafka/data/sdc/__consumer_offsets-24/00000000000000000000.log
 
broker3:
/kafka/data/sdc/__consumer_offsets-24/00000000000000000000.log
 
We noticed that the .log file on broker1 was different in size and content from the remaining two. 
 
We backed up the file from broker1 and then replaced it with the one from broker2 . and that has resolved this issue. 
 
Most likely this happened to us when we ran kafka-reassign-partitions and drives reached 99% and then something broke in _consumer_offsets. 
Announcements
New solutions