Reply
New Contributor
Posts: 4
Registered: ‎08-29-2018
Accepted Solution

Kafka is not working / Warning while sending messages

[ Edited ]

Hi, I recently started to read up in kafka. Now I would like to start working on cloudera but I have some problems with sending messages. I created a a topic with following code: $ kafka-topics --create --zookeeper 127.0.0.1:2181 --replication-factor 1 --partitions 1 --topic test --> it worked then i tried to send some messages with following code: $ kafka-console-producer --broker-list 127.0.0.1:2181 --topic test --> doesnt work but as soon I write a message, i get several Warnings and an Error message: WARN [Producer clientId=console-producer] Bootstrap broker 127.0.0.1:2181 (id: -1 rack: null) disconnected (org.apache.kafka.clients.NetworkClient) ... ERROR Error when sending message to topic test with key: null, value: 9 bytes with error: (org.apache.kafka.clients.producer.internals.ErrorLoggingCallback) org.apache.kafka.common.errors.TimeoutException: Failed to update metadata after 60000 ms. Does someone can help me to fix this problem?

Cloudera Employee
Posts: 50
Registered: ‎07-10-2017

Re: Kafka is not working / Warning while sending messages

[ Edited ]

Hello,

 

What version of Cloudera Kafka/CDH are you testing?

 

Can you do the following:
kafka-topics --zookeeper <zkhost>:2181 --list
kafka-topics --zookeeper <zkhost>:2181 --describe --topic test

 

Cheers!
Manuel

 

Highlighted
Posts: 1,760
Kudos: 379
Solutions: 282
Registered: ‎07-31-2013

Re: Kafka is not working / Warning while sending messages

Your port for broker is incorrect in that command, you're supplying the
ZooKeeper port of 2181 in an argument that requires the Broker client port
of 9092.

Follow our guide at
https://www.cloudera.com/documentation/kafka/latest/topics/kafka_command_line.html
for using the command line tools.
Announcements
New solutions