Support Questions
Find answers, ask questions, and share your expertise
Alert: Please see the Cloudera blog for information on the Cloudera Response to CVE-2021-4428

Kafka console consumer nor reading messages when used with bootstrap servers option

I am using kafka console consumer script to read messages from a kafka topic. but it is showing the following behavior.

If i use the zookeeper option, the consumer reads messages, whereas if i use bootstrap-server option i am not able to read messages. any thoughts.

using HDP 2.6

 bin/ --bootstrap-server --topic test1 --from-beginning 
bin/ --zookeeper --topic test1 --from-beginning
Using the ConsoleConsumer with old consumer is deprecated and will be removed in a future major release. Consider using the new consumer by passing [bootstrap-server] instead of [zookeeper].
How are you
this is a test message
Hope this helps

New Contributor

I got it working.

It seems there were some phantom borkers in zookeeper because I reconfigured the location of the kafka nodes after installation.

Removing the brokers from zookeeper and restarting the kafka nodes solved the issue:

bin/zookeeper-shell <zk-host>:2181
rmr /borker



New Contributor

you saved my day!