Support Questions

Find answers, ask questions, and share your expertise

I have trouble pushing messages into my Kafka topics in HDP sandbox 2.4

avatar
New Contributor

I am trying to run the below command and throws an exception.

./kafka-console-producer.sh --broker-list localhost:9092 --topic test1
1 ACCEPTED SOLUTION

avatar
Super Collaborator

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

View solution in original post

4 REPLIES 4

avatar
Super Guru

@Hadoop Yarn

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

avatar
Super Collaborator

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

avatar
New Contributor

@hduraiswamy Yes this seems to work. Thank you

avatar
Super Collaborator

You are welcome. Glad it worked.