Skip to content

host.docker.internal is rewritten to localhost for no reason #979

@pkit

Description

@pkit

Issue submitter TODO list

  • I've looked up my issue in FAQ
  • I've searched for an already existing issues here
  • I've tried running main-labeled docker image and the issue still persists there
  • I'm running a supported version of the application which is listed here

Describe the bug (actual behavior)

@Haarolean the issue lies with rewriting requests as localhost for host.docker.internal within kafka-ui
Lo and behold:

$ docker run --rm -it -p 8083:8080 \
--add-host=host.docker.internal:host-gateway \
-e DYNAMIC_CONFIG_ENABLED=true \
ghcr.io/kafbat/kafka-ui

In the UI enter host.docker.internal and 39092
What I see in the log?

2025-03-23 16:33:39,223 WARN  [kafka-admin-client-thread | kui-admin-client-validation-1742747619215] o.a.k.c.NetworkClient: [AdminClient clientId=kui-admin-client-validation-1742747619215] Connection to node 1 (localhost/127.0.0.1:39092) could not be established. Node may not be available.

Why TF it's localhost???

Image

Expected behavior

No response

Your installation details

See above

Steps to reproduce

See above

Screenshots

No response

Logs

No response

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions