Container hostname DNS resolution fails when wsl-proxy.sock is not ready at startup

Author: gl42Created Mar 23, 2026Updated Sep 15, 2026
Labelskind/bugarea/dns

Actual Behavior

Container hostnames are not resolvable via the internal DNS server (192.168.127.1) even after all containers are fully running. nslookup returns NXDOMAIN from inside containers on the same Docker network. This persists indefinitely and is not a timing issue — containers that have been running for hours still cannot resolve each other by hostname.

Steps to Reproduce

  1. Install Rancher Desktop and configure it to use nerdctl (not dockerd)
  2. Create two or more containers on the same named network using nerdctl compose
  3. From inside any container, run nslookup 192.168.127.1
  4. Observe NXDOMAIN response
  5. Check rancher-desktop-guestagent.log — observe the following error on startup: failed to send a static portMapping event to wsl-proxy: dial unix /run/wsl-proxy.sock: connect: no such file or directory

Result

  1. nslookup returns NXDOMAIN from all containers for specific containers that cannot resolve - the list of containers that the resolver cannot find change on reboot
  2. Container hostname resolution never recovers without a full Rancher Desktop restart
  3. Even after full restart, the issue recurs intermittently
  4. hostname directive in compose and network aliases are silently ignored by nerdctl — neither registers the hostname in DNS
  5. The upstream DNS server 192.168.127.1 never registers some container names regardless of network configuration
  6. The set of containers not registered change after each reboot

Expected Behavior

  1. Containers on the same named network should be able to resolve each other by service name via the internal DNS server
  2. Network aliases defined in compose should be registered in DNS
  3. The hostname directive in compose should register in DNS
  4. If wsl-proxy.sock is not ready at startup, DNS registration should be retried automatically once it becomes available

Additional Information

  1. Issue does not occur with Docker Desktop — identical compose files work correctly with Docker Desktop's DNS
  2. Workaround attempted: resolver 192.168.127.1 valid=10s in nginx.conf — does not help as names never register
  3. Workaround attempted: network aliases in compose — silently ignored, nerdctl inspect shows empty Aliases field
  4. Workaround attempted: hostname directive in compose — does not register in DNS
  5. Workaround attempted: full Rancher Desktop restart — temporarily fixes the issue but it recurs after container rebuilds
  6. The wsl-proxy.sock startup failure in rancher-desktop-guestagent.log appears to be the root cause, breaking DNS registration for the entire session
  7. Running approximately 35+ containers across 6 named external networks
  8. All networks declared in networks.yml and then declared as external across multiple compose files

Rancher Desktop Version

1.22.0

Rancher Desktop K8s Version

1.34.5 (stable)

Which container engine are you using?

containerd (nerdctl)

What operating system are you using?

Windows

Operating System / Build Version

Windows 11 Home Build 26200

What CPU architecture are you using?

x64

Linux only: what package format did you use to install Rancher Desktop?

None

Windows User Only

cloudflare tunnel running in a container, which I also tried downing to see if that resolves the issue. It was not the issue. I even did factory resets and rebuilt all containers excluding the tunnel container, and the dns issues remained.

I also have tried windows repair in case something is busted with WSL2. I also have previously used virtual box and docker on this physical host. Note that the same set of containers work in docker desktop on my laptop.

Source: rancher-sandbox/rancher-desktop