Reply
Explorer
Posts: 15
Registered: ‎05-28-2016

Error when sending message to topic in Kafka

[ Edited ]

/vol_01/cloudera/parcels/KAFKA-2.0.0-1.kafka2.0.0.p0.12/bin/kafka-console-producer --broker-list localhost:9092 --topic t1
Hi Hello
[2016-05-29 01:24:02,381] ERROR Error when sending message to topic t1 with key: null, value: 8 bytes with error: Failed to update metadata after 60000 ms. (org.apache.kafka.clients.producer.internals.ErrorLoggingCallback)

 

In server.properties file, i have changed the added below lines:

 

advertised.host.name=localhost

advertised.port=2181

 

In zookeeper.properties file, i have changed the below lines:

 

dataDir=/vol_01/lib/zookeeper  (as per the settings)
clientPort=2181
maxClientCnxns=0

 

Cloudera Employee
Posts: 228
Registered: ‎01-09-2014

Re: Error when sending message to topic in Kafka

Can you confirm if you have the "Topic Auto Creation" disabled: auto.create.topics.enable=false

If so, have you created the t1 topic beforehand?

Can you do the following:
kafka-topics --zookeeper <zkhost>:2181 --list
kafka-topics --zookeeper <zkhost>:2181 --describe --topic t1
Explorer
Posts: 15
Registered: ‎05-28-2016

Re: Error when sending message to topic in Kafka

Hi,

I have topic auto creation enabled in kafka when I got the error previously. I tried it now after disabling auto creation and again I'm getting the same result, along with the list topic and describe topic returning nothing.

/vol_01/cloudera/parcels/KAFKA-2.0.0-1.kafka2.0.0.p0.12/bin/kafka-console-producer --broker-list localhost:9092 --topic t1
Hi Hello

ERROR Error when sending message to topic t1 with key: null, value: 8 bytes with error: Failed to update metadata after 60000 ms. (org.apache.kafka.clients.producer.internals.ErrorLoggingCallback)
Expert Contributor
Posts: 113
Registered: ‎02-15-2016

Re: Error when sending message to topic in Kafka

can you check listener value in kafka.propertie 

 and try to change it from 

 

listeners=PLAINTEXT://hostname:9092

to

listeners=PLAINTEXT://0.0.0.0:9092

 

Highlighted
New Contributor
Posts: 5
Registered: ‎11-16-2017

Re: Error when sending message to topic in Kafka

hi,

 

even i am facing the similar error, need help despreadly

 

org.apache.kafka.common.errors.TimeoutException: Failed to update metadata after 60000 ms
ERROR Error when sending message to topic binary_kafka_source with key: null, value: 175 bytes with error: (org.apache.kafka.clients.producer.internals.ErrorLoggingCallback)
 
and zookeepre keeps disconnecting and connecting
 
7/11/16 12:23:23 INFO zkclient.ZkClient: zookeeper state changed (Disconnected)
17/11/16 12:23:23 INFO zkclient.ZkClient: zookeeper state changed (Disconnected)
17/11/16 12:23:24 INFO zkclient.ZkClient: zookeeper state changed (SyncConnected)
17/11/16 12:23:24 INFO zkclient.ZkClient: zookeeper state changed (SyncConnected)
17/11/16 12:23:24 INFO zkclient.ZkClient: zookeeper state changed (SyncConnected)
17/11/16 12:24:03 INFO zkclient.ZkClient: zookeeper state changed (Disconnected)
17/11/16 12:24:03 INFO zkclient.ZkClient: zookeeper state changed (Disconnected)
17/11/16 12:24:03 INFO zkclient.ZkClient: zookeeper state changed (Disconnected)
New Contributor
Posts: 5
Registered: ‎11-16-2017

Re: Error when sending message to topic in Kafka

didnt work
Explorer
Posts: 7
Registered: ‎06-03-2017

Re: Error when sending message to topic in Kafka

Announcements