Kafka Docker - Can't produce or consume from outside of docker container - Stack Overflow
This worked for me: http://stackoverflow.com/a/37655203/1839580
My summary: The ADVERTISED_HOST environment variable in the spotify/kafka container needs to change depending on whether your service is operating inside or outside the container. I an using Docker for Mac and I have my docker network set to bridged. Outside of Docker the ADVERTISED_HOST needed to be set to localhost, inside of docker, it was set to myproject_kafka_1 or whatever it ends up being on your system. To fix it, I added and entry in my MacOS host files that mapped 127.0.0.1 to myproject_kafka_1. I don't like messing with my host file, but it fixed this issue for me.
127.0.0.1 localhost 127.0.0.1 myproject_kafka_1
Read full article from Kafka Docker - Can't produce or consume from outside of docker container - Stack Overflow
No comments:
Post a Comment