lensesio / fast-data-dev

Kafka Docker for development. Kafka, Zookeeper, Schema Registry, Kafka-Connect, , 20+ connectors
https://lenses.io
Apache License 2.0
2.02k stars 333 forks source link

Producer from another docker container unable to send/write messages to kafka topic #60

Closed jobetdelima closed 6 years ago

jobetdelima commented 6 years ago

Hi,

Things work perfectly when I use a producer app I have using localhost:9092 as a broker with your container. However, when I try to run the same producer on another docker container on my machine, it's unable to talk to your container and I get the below error. Hoping you'd be able to give a suggestion on what I could try. Thanks!

"org.apache.kafka.common.errors.TimeoutException: Failed to update metadata after 60000 ms"

Antwnis commented 6 years ago

It's about docker networking, read a bit about it and how you can leverage i.e. --network to define networks for dockers to talk to each other. Please re-open ticket if you can't find a solution.

Also remember that Kafka needs to advertise it's IP address correctly for other application to be able to reach it, and you can set that via the -e ADV_HOST=[VM_EXTERNAL_IP] flag when executing fast-data-dev