Open jspc opened 3 years ago
did you ever find a fix for this?
Are there any news about this?
use confluent's kafka image...works right out of the box. @dibericky
This image also works out of the box if the listeners are used instead of advertised host/port
Starting kafka via:
Gives me the above error, after:
KAFKA_ADVERTISED_HOST_NAME: 192.168.99.100
toHOSTNAME_COMMAND: "ip a | grep inet | grep -v 127 | awk '{print $$2}' | awk -F/ '{print $$1}'"
(I've pasted a patch to this issue to show precisely what I have done)
My use case is pretty simple- I have a series of containers I want to access kafka. They will attach to the network that docker-compose creates (
kafka-docker_default
by default), and access kafka through there, by usingkafka-docker_kafka_1
as the initial broker.Is this not possible? Is there a smarter way to accomplish what I want to accomplish? I've verified inside the container that this command correctly returns the correct IP address.
I note that if I set
KAFKA_ADVERTISED_HOST_NAME
to the IP172.19.0.2
specifically (and get lucky on containers starting in the correct order, getting the correct address, and some other reason I don't follow) then the logs are clear and everything works as I want it to.Am I misunderstanding the docs? Does
HOSTNAME_COMMAND
not do what i'm trying to get it to do?