DEV Community

Discussion on: Kafka Connect - Crash Course

Collapse
 
emperoar profile image
Julius Bacosa

do you have any idea why my dockerized asp.net core app can't connect to kafka's localhost:9092, but if not dockerized it can successfully connect?

e.g.
docker run -p 5001:80 --rm my-api
my bootstrap server is: BootstrapServers = "127.0.0.1:9092"

Collapse
 
thegroo profile image
Marcos Maia • Edited

Hi, most likely related to the KAFKA_ADVERTISED_LISTENERS when using a docker container which enables you to pass in the advertised.listeners values to kafka, notice that this is a comma-separated list of listeners with their the host/ip and port and it's metadata that’s passed back to clients, so check your docker image settings, which docker image are you using?

kafka.apache.org/documentation/#br...

Also make sure to be exposing the internal kafka docker port.

Collapse
 
emperoar profile image
Julius Bacosa

Sorry for the late reply, got this working already Thanks!