Archives of Support Questions (Read Only)

This is an archived board for historical reference. Information and links may no longer be available or relevant
Announcements
This board is archived and read-only for historical reference. To ask a new question, please post a new topic on the appropriate active board.

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

avatar
New Member

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 Member

@hduraiswamy Yes this seems to work. Thank you

avatar
Super Collaborator

You are welcome. Glad it worked.