Issues while using Kafka commands

Hi Itversity,

Below is my code:

1) created a topic
kafka-topics.sh --create
–zookeeper nn01.itversity.com:2181,nn02.itversity.com:2181,rm01.itversity.com:2181
–replication-factor 1 --partitions 1 --topic testnm

Facing issues with the below command:
kafka-console-producer.sh
–broker-list nn01.itversity.com:6667,nn02.itversity.com:6667,rm01.itversity.com:6667
–topic testnm
"Testing if the connection between Kafka producer and Kafka topic is successfully created."

Warning messages printed on the console:
[2017-05-18 17:10:05,258] WARN Error while fetching metadata with correlation id 0 : {testnm=LEADER_NOT_AVAILABLE} (org.apache.kafka.clients.NetworkClient)
[2017-05-18 17:10:05,354] WARN Error while fetching metadata with correlation id 1 : {testnm=LEADER_NOT_AVAILABLE} (org.apache.kafka.clients.NetworkClient)
[2017-05-18 17:10:05,458] WARN Error while fetching metadata with correlation id 2 : {testnm=LEADER_NOT_AVAILABLE} (org.apache.kafka.clients.NetworkClient)
[2017-05-18 17:10:05,562] WARN Error while fetching metadata with correlation id 3 : {testnm=LEADER_NOT_AVAILABLE} (org.apache.kafka.clients.NetworkClient)
[2017-05-18 17:10:05,667] WARN Error while fetching metadata with correlation id 4 : {testnm=LEADER_NOT_AVAILABLE} (org.apache.kafka.clients.NetworkClient)
[2017-05-18 17:10:05,770] WARN Error while fetching metadata with correlation id 5 : {testnm=LEADER_NOT_AVAILABLE} (org.apache.kafka.clients.NetworkClient)

Please advise on the cause of this error and the resolution for the same.

I am able to run the exact code and not facing any error.

It is working for me as well.

Dear itversity, Please post one workout example with scala as explained in one Tutorial videos. Like how we can make use of Kafka of itversity labs.

Sure, I will take care of it in couple of days!!!

1 Like