New Contributor
Posts: 1
Registered: ‎04-20-2017

How can I consume a kafka topic from romote server?

I have a kafka zookeeper with port 2181 and kafka broker with port 9092 in a public server and I am trying to consume the topic content from a client machine. The ports 2181 (zk) and 9092 are open to the consumer machine. I can even do a bin/ --list --zookeeper myPublicServer:2181 from my client machine which gives me the list of topics. But when I try to consume or produce message from/to a topic the server no showa the messages.

I've tryed with the next comands:

bin/ --broker-list myPublicServer:9092 --topic test_topic


bin/ --zookeeper myPlublicServer:2181 --topic test_topic


Even I configured a flume sink and source for public or consume the messages from the client machine.


I configured the file in the server with the below values:




Are there some configuration that I am forgetting??


Cloudera Employee
Posts: 222
Registered: ‎01-09-2014

Re: How can I consume a kafka topic from romote server?

If you turn on debug, it will give you a good idea of what might be happening:

cp /etc/kafka/conf/ /var/tmp
sed -i -e 's/WARN/DEBUG/g' /var/tmp/
export KAFKA_OPTS="-Dlog4j.configuration=file:/var/tmp/"