Created 10-09-2016 10:03 PM
I am trying to run the below command and throws an exception.
./kafka-console-producer.sh --broker-list localhost:9092 --topic test1
Created on 10-09-2016 10:11 PM - edited 08-19-2019 03:26 AM
Go to your Ambari >> Kafka >> Configs and look for the port the Kafka broker listens on
8374-screen-shot-2016-10-09-at-60602-pm.png
If it is HDP sandbox 2.4, it will most probably be on 6667 and therefore you should be running the below command instead
./kafka-console-producer.sh --broker-list sandbox.hortonworks.com:6667 --topic test1
Let me know if this works. Else, post with the proper exception and we can look deeper.
If this answer helps you, please don't forget to upvote / accept this answer
Created 10-09-2016 10:05 PM
what exception you are getting? it looks a sandbox so broker port is 6667 .. can you try this command
/kafka-console-producer.sh --broker-list hostname:6667 --topic kafkatopic
Created on 10-09-2016 10:11 PM - edited 08-19-2019 03:26 AM
Go to your Ambari >> Kafka >> Configs and look for the port the Kafka broker listens on
8374-screen-shot-2016-10-09-at-60602-pm.png
If it is HDP sandbox 2.4, it will most probably be on 6667 and therefore you should be running the below command instead
./kafka-console-producer.sh --broker-list sandbox.hortonworks.com:6667 --topic test1
Let me know if this works. Else, post with the proper exception and we can look deeper.
If this answer helps you, please don't forget to upvote / accept this answer
Created 10-09-2016 10:15 PM
@hduraiswamy Yes this seems to work. Thank you
Created 10-09-2016 10:16 PM
You are welcome. Glad it worked.