obsidiandynamics / kafdrop

Kafka Web UI
Apache License 2.0
5.56k stars 841 forks source link

Kafdrop failing to connect with Kafka broker running on docker #549

Closed MuhtasimTanmoy closed 1 year ago

MuhtasimTanmoy commented 1 year ago

I have a Kafka broker running on docker on my local machine which is available on localhost:9092.

Output from docker ps:

CONTAINER ID   IMAGE                  COMMAND                  CREATED        STATUS          PORTS                    NAMES
53c9d05ad2ed   bitnami/kafka:latest   "/opt/bitnami/script…"   20 hours ago   Up 30 minutes   0.0.0.0:9092->9092/tcp   Kafka

However, when I try to set up kafdrop with the broker with the following command.

java --add-opens=java.base/sun.nio.ch=ALL-UNNAMED 
-jar kafdrop-3.31.0.jar
--kafka.brokerConnect=127.0.0.1:9092 
--server.port=9020 
--management.server.port=9020

It gives this error.

2023-08-01 11:10:29.387  WARN 33372 [| kafdrop-admin] o.a.k.c.NetworkClient                   
 : [AdminClient clientId=kafdrop-admin] Error connecting to node 53c9d05ad2ed:9092 (id: 1 rack: null)

Here, why it is trying to connect to 53c9d05ad2ed:9092 whereas I explicitly provided this --kafka.brokerConnect=127.0.0.1:9092 connection endpoint?

Note that, 53c9d05ad2ed is the container ID of my Kafka broker as you can see from the output from the docker ps command given above. Is there any other flag I need to pass in order to resolve this?

github-actions[bot] commented 1 year ago

This issue is stale because it has been open for 30 days with no activity.

github-actions[bot] commented 1 year ago

This issue was closed because it has been inactive for 14 days since being marked as stale.