Skip to content

wslc: host.wslc.internal does not resolve in musl-based containers, resolves in glibc-based containers #41769

Closed

Description

@u1f992

Windows Version

Microsoft Windows [Version 10.0.26200.9457]

WSL Version

3.0.1.0

Are you using WSL 1 or WSL 2?

  • WSL 2
  • WSL 1

Kernel Version

6.18.40.1-1

Distro Version

wslc 3.0.1.0

Other Software

No response

Repro Steps

  1. Run a name lookup for host.wslc.internal in an Alpine-based container:

    wslc run --rm python:3-alpine python3 -c "import socket; print(socket.getaddrinfo('host.wslc.internal', 80, type=socket.SOCK_STREAM))"
    
  2. Run the same lookup in a Debian-based container:

    wslc run --rm python:3-slim python3 -c "import socket; print(socket.getaddrinfo('host.wslc.internal', 80, type=socket.SOCK_STREAM))"
    

Expected Behavior

Both commands print an address for host.wslc.internal.

The settings template generated by wslc describes session.hostLoopback as "DNS name that resolves to the host loopback address (default: host.wslc.internal)".

Actual Behavior

python:3-alpine fails with socket.gaierror:

Traceback (most recent call last):
  File "<string>", line 1, in <module>
    import socket; print(socket.getaddrinfo('host.wslc.internal', 80, type=socket.SOCK_STREAM))
                         ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.14/socket.py", line 989, in getaddrinfo
    for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
               ~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
socket.gaierror: [Errno -2] Name does not resolve

python:3-slim resolves the name:

[(<AddressFamily.AF_INET: 2>, <SocketKind.SOCK_STREAM: 1>, 6, '', ('169.254.73.254', 80))]

Diagnostic Logs

WslLogs-2026-10-02_10-22-27.tar.gz, collected with collect-wsl-logs.ps1 (default profile) while running both commands from Repro Steps.

Activity

  1. github-actions commented on Oct 2, 2026

    @github-actions
    Contributor
    Diagnostic information
    Detected appx version: 3.0.1.0
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions