Support Questions

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

KafkaProducer is not working on hdp 2.4 cluster

Explorer

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/kafka-console-producer.sh --broker-list lat01bigdatahwdn:6667 --topic testtopic

../bin/kafka-console-consumer.sh --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

server.properties and producer.xml are as follows;

server-properties-part-01.png

server-properties-part-02.png

producer-xml.png

1 REPLY 1

@Faruk Berksoz

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

../bin/kafka-console-producer.sh --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.