Support Questions
Find answers, ask questions, and share your expertise
Alert: The Cloudera Community will undergo maintenance on Saturday, August 17 at 12:00am PDT. See more info here.

Error in kafka consumer

Re: Error in kafka consumer

Expert Contributor

we have fixed this issue. 

Re: Error in kafka consumer

New Contributor
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'

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 :-)


Re: Error in kafka consumer

Expert Contributor

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 --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 --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' 


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.