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
I had kafka running as a Docker container and similar messages were flooding to the log.
And KAFKA_ADVERTISED_HOST_NAME was set to 'kafka'.
In my case the reason for error was the missing /etc/hosts record for 'kafka' in 'kafka' container itself.
So, for example, running ping kafka inside 'kafka' container would fail with ping: bad address 'kafka'
In terms of Docker this problem gets solved by specifying hostname for the container.
Options to achieve it: