Support Questions
Find answers, ask questions, and share your expertise

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

Solved Go to solution

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

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

Accepted Solutions

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

Expert Contributor

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

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

@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

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

Expert Contributor

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

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

New Contributor

@hduraiswamy Yes this seems to work. Thank you

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

Expert Contributor

You are welcome. Glad it worked.