Troubleshooting docker-compose deployment issues with Kafka configuration

Original Slack Thread

Hi all, I’m having some trouble with the deployment using docker-compose and an external kafka system which is also deployed using docker. I updated the new host for kafka in the compose file, but receiving the error that datahub-gms is unhealthy. This is what I got from the log of gms and datahub-upgrade:

at java.base/ Method)
at java.base/$PlatformNameService.lookupAllHostAddr(
at java.base/
at java.base/$NameServiceAddresses.get(
at java.base/
at java.base/
at java.base/
at org.apache.kafka.clients.ClientUtils.resolve(
at org.apache.kafka.clients.ClusterConnectionStates$NodeConnectionState.currentAddress(
at org.apache.kafka.clients.ClusterConnectionStates$NodeConnectionState.access$200(
at org.apache.kafka.clients.ClusterConnectionStates.currentAddress(
at org.apache.kafka.clients.NetworkClient.initiateConnect(
at org.apache.kafka.clients.NetworkClient.access$600(
at org.apache.kafka.clients.NetworkClient$DefaultMetadataUpdater.maybeUpdate(
at org.apache.kafka.clients.NetworkClient$DefaultMetadataUpdater.maybeUpdate(
at org.apache.kafka.clients.NetworkClient.poll(
at org.apache.kafka.clients.producer.internals.Sender.runOnce(
at java.base/```
Somehow changing the host variables in the compose file didnt reflect here, even initially the gms had popped out that it could connect to kafka stack `Connected to <<host>>:29092` . I think the host might be hard-coded in the source code. Could anyone please help with this?

Hi Which compose file did you use for datahub deployment and where did you update the broker address?

Hi I’m using this file with broker, kafka-setup, schema-registry, zookeeper removed.
I updated KAFKA_BOOTSTRAP_SERVER, SCHEMA_REGISTRY_URL, KAFKA_SCHEMAREGISTRY_URL for datahub-actions, datahub-frontend-react, datahub-gms and datahub-upgrade

Have you changed KAFKA_BOOTSTRAP_SERVER=broker:29092

as per your config in all env sections?

Yes, I have. The components that I mentioned above are all having the variable

seems it related to KAFKA_ADVERTISED_LISTENERS var from kafka stack

Is it possible to share the compose file? I am not sure what is the wrong config.

the config is in kafka compose file not in datahub. You can see on the page, to connect to the broker from an external client (here is datahub), it will use KAFKA_ADVERTISED_LISTENERS. Kafka will send the client the host defined in KAFKA_ADVERTISED_LISTENERS, and client will try to connect using this host. So in my case, I only updated the host in datahub compose file, so that why initially gms can connect to kafka but later it threw the UnknowHostException since in kafka compose file KAFKA_ADVERTISED_LISTENERS was still “broker:29092”