Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

Error publishing a message after upgrading kafka parcel

avatar
Explorer

Aftre upgrading kafka parcel from "0.8.2.0-1.kafka1.4.0.p0.56" to "2.0.0-1.kafka2.0.0.p0.12". 

Running into an issue were by publishing message on to topic fails.

A simple test using kafka-console-producer fails withe error  message

Error when sending message to topic TESTTOPIC with key: null, value: 9 bytes with error: Failed to update metadata after 60000 ms. (org.apache.kafka.clients.producer.internals.ErrorLoggingCallback)

Please advise.

1 ACCEPTED SOLUTION

avatar
Explorer

Figured out that I had to change a setting in server.properties

listeners=PLAINTEXT://hostname:9092

to

listeners=PLAINTEXT://0.0.0.0:9092

and everything seemed to work fine now.

View solution in original post

4 REPLIES 4

avatar
Explorer

Figured out that I had to change a setting in server.properties

listeners=PLAINTEXT://hostname:9092

to

listeners=PLAINTEXT://0.0.0.0:9092

and everything seemed to work fine now.

avatar
New Contributor

Hi Bhairav,

 

I've recently started using Cloudera Enterprise. I was wondering how you were able to solve the kafka issue. I'm still having trouble solving this issue because I don't know where the server.properties file is located.

Or where I can find the "listeners" property in cloudera manager. I tried checking kafka's configuration tab but didn't find this setting.

 

 https://community.cloudera.com/t5/Cloudera-Manager-Installation/Error-publishing-a-message-after-upg...

avatar
Expert Contributor

in cloudera manager it is kafka.properties .

you can update values in borker configuration ==> advanced ==> Kafka broker Advanced Configuration Snippet (Safety Valve) for kafka.properties 

and restart

avatar

If you have kafka version - 0.10.2, then adding only the 'listeners' is not enough and 'advertised.listeners' should also be added to the safety valve values for 'kafka.properties'. This is more of a requirement when we set the ip address as '0.0.0.0'. The advertised.listeners value would have the exact ip/hostname:port value.

 

This information is clearly mentioned at - http://kafka.apache.org/documentation.html#security_configbroker