Skip to content

Unable to Connect to Docker Container Service via Local IP Address, Works with Loopback (127.0.0.1) #917

@zhcn

Description

@zhcn

I'm facing an issue where I can successfully perform a TCP connection using telnet to 127.0.0.1:5900 on the host machine, but I am unable to connect through the local IP address (e.g., 10.x.x.x:5900).

The Docker container is configured to map port 5555 inside the container to 5900 on the host machine, with the following mapping:

5555/tcp -> 0.0.0.0:5900

However, after checking the container's network configuration, I found that the service inside the container (specifically adbd for Android Debug Bridge) is listening only on IPv6 ([::]:5555), and IPv4 connections to the port are not successful.

This raises the question of why 127.0.0.1 (loopback address) works, but the local IP address does not. I suspect that the service inside the container is bound to IPv6 and needs to be reconfigured to listen on IPv4 to allow external connections.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions