Not able to consume/display messages published for a topic


#1

Not able to receive messages from a Kafka topic .
Getting error - No brokers found in ZK.
session 1 -
[abhig60bd@gw01 ~]$ cd /usr/hdp/2.5.0.0-1245/kafka/bin
[abhig60bd@gw01 bin]$ ./kafka-topics.sh --create --zookeeper nn01.itversity.com:2181,nn02.itversity.com:2181,rm01.itversity.com:2181 --replication-factor 1 --partitions 1 --topic topicabhig60bd2
Created topic “topicabhig60bd2”.
[abhig60bd@gw01 bin]$ ./kafka-topics.sh --list \

–zookeeper nn01.itversity.com:2181,nn02.itversity.com:2181,rm01.itversity.com:2181
–topic topicabhig60bd2
topicabhig60bd2
[abhig60bd@gw01 bin]$ ./kafka-console-producer.sh
–broker-list nn01.itversity.com:6667,nn02.itversity.com:6667,rm01.itversity.com:6667
–topic topicabhig60bd2
Hello World !
Check messages

Session 2
[abhig60bd@gw01 ~]$ cd /usr/hdp/2.5.0.0-1245/kafka/bin
[abhig60bd@gw01 bin]$ ./kafka-console-consumer.sh \

–zookeeper nn01.itversity.com:6667,nn02.itversity.com:6667,rm01.itversity.com:6667
–topic topicabhig60bd2
–from-beginning
No brokers found in ZK.
[abhig60bd@gw01 bin]$