Support Questions

Find answers, ask questions, and share your expertise
Check out our newest addition to the community, the Cloudera Data Analytics (CDA) group hub.

KafkaProducer is not working on hdp 2.4 cluster


Hi all,

We want to write a simple kafka producer on our HDP 2.4 cluster .( 1 master 3 datanode.)

for loop is working but,the messages was not sent to kafka topic.

I have tried more different value for bootstrap.servers parameters but still not working.

There is no ERROR or WARNING in log files about that.

console producer and consumer are working ;

. ../bin/ --broker-list lat01bigdatahwdn:6667 --topic testtopic

../bin/ --zookeeper localhost:2181 --topic testtopic --from-beginning

props.put("bootstrap.servers", "localhost:9092"); with these line, producer is working on MS windows OS.

Code ;

13205-code-01.png and producer.xml are as follows;





@Faruk Berksoz

As you are running Kafka on non-Kerberized env - use --broker-list like in Windows env instead of bootstrap.server

../bin/ --broker-list lat01bigdatahwdn:6667 --topic testtopic
Take a Tour of the Community
Don't have an account?
Your experience may be limited. Sign in to explore more.