Unable to run kafka-console-producer.sh


#1

Hello,

I ma unable to run the below command:
kafka-console-producer.sh
–broker-list nn01.itversity.com:6667,nn02.itversity.com:6667,rm01.itversity./com:6667
–topic riteshkafka

When i run this command i am getting below error message :
[2018-11-01 23:28:06,813] WARN [Producer clientId=console-producer] Connection to node -1 could not be established. Broker may not be available. ()
[2018-11-01 23:28:07,618] WARN [Producer clientId=console-producer] Connection to node -3 could not be established. Broker may not be available. ()
[2018-11-01 23:28:07,669] WARN [Producer clientId=console-producer] Connection to node -2 could not be established. Broker may not be available.

and when I enter KAFKA I am getting below message:
Usage: /usr/bin/kafka {start|stop|status|clean}
I have also set the path in the bash_profile

export KAFKA_HOME=/usr/hdp/current/kafka
PATH=$PATH:$KAFKA_HOME/bin

Please help me with this issue. Thank you.


#2

Change the path like below

export KAFKA_HOME=/usr/hdp/current/kafka-brocker
export PATH=$PATH:$KAFKA_HOME/bin

Refer the link for more information https://gist.github.com/balusai1/f7410a2835e0ddfd2721da20e90f1c42


#3

thank you, it worked.


#4