# Can't connect with Kafka
Published on 04 October 2021


Can't connect with Kafka which is running locally in Docker using image https://hub.docker.com/r/bitnami/kafka/.

Getting this error from Spring Boot:

11:29:01.020 [kafka-admin-client-thread | adminclient-1] WARN  o.apache.kafka.clients.NetworkClient - [AdminClient clientId=adminclient-1] Error connecting to node 7b125d0acb0d:9092 (id: 1001 rack: null)
java.net.UnknownHostException: 7b125d0acb0d

Where 7b125d0acb0d is the docker container hostname where I'm running Kafka.


Specify environment variable: