I am trying to use Kafka.
All configurations are done properly but when I try to produce message from console I keep getting the following error
WARN Err
The advertised listeners as mentioned in the above answers could be one of the reason. The other possible reasons are:
bin/kafka-topics --list --zookeeper : Also, ensure that you have the advertised listener set to IP:9092 instead of localhost:9092. The latter means that the broker is accessible only through the localhost.
When I encountered the error, I remember to have used PLAINTEXT:// in the list of bootstrap servers (or broker list) and it worked, strangely.
bin/kafka-console-producer --topic sample --broker-list PLAINTEXT://: