Skip to content

The rancher-desktop cannot start with WSL 2.5.4 (Pre-release) #8455

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
esikgabi opened this issue Apr 1, 2025 · 7 comments
Closed

The rancher-desktop cannot start with WSL 2.5.4 (Pre-release) #8455

esikgabi opened this issue Apr 1, 2025 · 7 comments
Assignees
Labels
area/networking kind/bug Something isn't working platform/windows triage/next-candidate Discuss if it should be moved to "Next" milestone

Comments

@esikgabi
Copy link

esikgabi commented Apr 1, 2025

Actual Behavior

I've updated my WSL version to the latest 2.5.4 (Pre-released) version.
Since the WSL upgrade, the rancher-desktop cannot start.

Some interesting parts from my logs

vm-switch.log

time="2025-04-01T10:42:30+02:00" level=debug msg="using a AF_VSOCK connection file from default namespace: &{0xc00019a1e0}"
time="2025-04-01T10:42:31+02:00" level=fatal msg="creating tap device eth0 failed: no such file or directory"

rancher-desktop-guestagent.log

2025/04/01 10:48:52 [INFO]    Starting Rancher Desktop Agent in [AdminInstall=true] mode
2025/04/01 10:48:52 [FATAL]   scanning /proc/net/{tcp, udp} failed: could not open the sysctl file /proc/sys/net/ipv4/conf/eth0/route_localnet: open /proc/sys/net/ipv4/conf/eth0/route_localnet: no such file or directory

network-setup.log

time="2025-04-01T10:42:29+02:00" level=info msg="starting handshake process with host-switch"
time="2025-04-01T10:42:30+02:00" level=error msg="listenForHandshake reading signature phrase failed: EOF"
time="2025-04-01T10:42:30+02:00" level=info msg="listenForHandshake successful handshake with host-switch"
time="2025-04-01T10:42:30+02:00" level=debug msg="attempting to connect to the host on CID: 2 and Port: 6656"
time="2025-04-01T10:42:30+02:00" level=debug msg="successful connection to host on CID: 2 and Port: 6656: connection: &{vsock:0xc0000c6010 fd:6 local:<nil> remote:0xc0000b60d0}"
time="2025-04-01T10:42:30+02:00" level=info msg="created a new namespace NS(9: 4, 4026532233) NS(9: 4, 4026532233)"
time="2025-04-01T10:42:30+02:00" level=debug msg="successfully wrote wsl-init.pid with: 427"
time="2025-04-01T10:42:30+02:00" level=info msg="successfully started the vm-switch running with a PID: 428"
time="2025-04-01T10:42:30+02:00" level=info msg="created veth pair veth-rd-wsl and veth-rd-ns"
time="2025-04-01T10:42:30+02:00" level=debug msg="Network setup complete, waiting for vm-switch"
time="2025-04-01T10:42:31+02:00" level=error msg="vm-switch exited with error: exit status 1"
time="2025-04-01T10:42:31+02:00" level=info msg="tearing down link veth-rd-wsl: <nil>"

background.log

2025-04-01T08:41:49.358Z: Stopping background process Win32 socket proxy (pid <none>).
2025-04-01T08:41:53.693Z: mainEvents settings-update: {"version":14,"application":{"adminAccess":false,"debug":true,"extensions":{"allowed":{"enabled":false,"list":[]},"installed":{}},"pathManagementStrategy":"manual","telemetry":{"enabled":true},"updater":{"enabled":true},"autoStart":false,"startInBackground":false,"hideNotificationIcon":false,"window":{"quitOnClose":false}},"containerEngine":{"allowedImages":{"enabled":false,"patterns":[]},"name":"moby"},"virtualMachine":{"memoryInGB":2,"numberCPUs":2},"WSL":{"integrations":{"Ubuntu":true}},"kubernetes":{"version":"1.31.6","port":6443,"enabled":false,"options":{"traefik":true,"flannel":true},"ingress":{"localhostOnly":false}},"portForwarding":{"includeKubernetesServices":false},"images":{"showAll":true,"namespace":"default"},"containers":{"showAll":true,"namespace":"default"},"diagnostics":{"showMuted":true,"mutedChecks":{}},"experimental":{"containerEngine":{"webAssembly":{"enabled":false}},"kubernetes":{"options":{"spinkube":false}},"virtualMachine":{"type":"qemu","useRosetta":false,"mount":{"type":"reverse-sshfs","9p":{"securityModel":"none","protocolVersion":"9p2000.L","msizeInKib":128,"cacheMode":"mmap"}},"proxy":{"enabled":true,"address":"","password":"","port":3128,"username":"","noproxy":["0.0.0.0/8","10.0.0.0/8","127.0.0.0/8","169.254.0.0/16","172.16.0.0/12","192.168.0.0/16","224.0.0.0/4","240.0.0.0/4"]}}}}
2025-04-01T08:41:53.719Z: Stopping background process Win32 socket proxy (pid <none>).
2025-04-01T08:41:53.740Z: Checking if credential helper wincred is working...
2025-04-01T08:41:53.901Z: Credential helper docker-credential-wincred is working.
2025-04-01T08:41:58.666Z: Stopping background process host-switch.exe (pid <none>).
2025-04-01T08:42:03.533Z: Launching background process host-switch.exe.
2025-04-01T08:42:03.633Z: Launched background process host-switch.exe (pid 32168)
2025-04-01T08:42:09.602Z: Launching background process Win32 socket proxy.
2025-04-01T08:42:09.629Z: Launched background process Win32 socket proxy (pid 32332)
2025-04-01T08:42:11.359Z: Launching background process Ubuntu socket proxy.
2025-04-01T08:42:11.372Z: Launched background process Ubuntu socket proxy (pid 8920)
2025-04-01T08:42:31.838Z: Kubernetes was unable to start: c [Error]: wsl.exe exited with code 1
    at ChildProcess.<anonymous> (C:\Program Files\Rancher Desktop\resources\app.asar\dist\app\background.js:2:45862)
    at ChildProcess.emit (node:events:518:28)
    at ChildProcess._handle.onexit (node:internal/child_process:293:12) {
  command: [
    'wsl.exe',
    '--distribution',
    'rancher-desktop',
    '--exec',
    '/usr/local/bin/wsl-service',
    '--ifstarted',
    'local',
    'stop'
  ],
  code: 1,
  [Symbol(child-process.command)]: 'wsl.exe --distribution rancher-desktop --exec /usr/local/bin/wsl-service --ifstarted local stop'
}
2025-04-01T08:42:31.840Z: Stopping background process Win32 socket proxy (pid 32332).
2025-04-01T08:42:31.849Z: Background process Win32 socket proxy (pid 32332) exited gracefully.
2025-04-01T08:42:32.033Z: Stopping background process Ubuntu socket proxy (pid 8920).
2025-04-01T08:42:32.068Z: Background process Ubuntu socket proxy (pid 8920) exited gracefully.
2025-04-01T08:42:33.501Z: ipcMain: "k8s-state" triggered with arguments: 
2025-04-01T08:42:33.537Z: ipcMain: "get-app-version" triggered with arguments: 

wsl.log

2025-04-01T08:42:30.997Z: Running: wsl.exe --distribution rancher-desktop --exec /usr/local/bin/wsl-proxy -debug true
2025-04-01T08:42:31.006Z: Progress: finished Starting WSL environment
2025-04-01T08:42:31.006Z: Progress: finished Installing container engine
2025-04-01T08:42:31.007Z: Progress: started Running provisioning scripts
2025-04-01T08:42:31.008Z: Capturing output: wsl.exe --distribution rancher-desktop --exec wslpath -a -u C:\Users\User_Name\AppData\Local\rancher-desktop\provisioning
2025-04-01T08:42:31.190Z: /sbin/init exited gracefully.
2025-04-01T08:42:31.439Z: captureCommand:
command: ({} 'wslpath' '-a' '-u' 'C:\Users\User_Name\AppData\Local\rancher-desktop\provisioning')
output: </mnt/c/Users/User_Name/AppData/Local/rancher-desktop/provisioning
>
2025-04-01T08:42:31.440Z: Running: wsl.exe --distribution rancher-desktop --exec /usr/local/bin/wsl-service --ifstarted local stop
2025-04-01T08:42:31.825Z: WSL: executing: /usr/local/bin/wsl-service --ifstarted local stop: Error: wsl.exe exited with code 1

2025-04-01T08:42:31.826Z: Progress: errored Running provisioning scripts: Error: wsl.exe exited with code 1

2025-04-01T08:42:31.838Z: Progress: errored Initializing Rancher Desktop: Error: wsl.exe exited with code 1

Steps to Reproduce

Upgrade your WSL version to this: https://github.com/microsoft/WSL/releases/tag/2.5.4
Use the default settings of WSL.

Result

Rancher Desktop start is failing.

Expected Behavior

Rancher Desktop can start.

Additional Information

Based on the following log entry: creating tap device eth0 failed: no such file or directory, it is possible the problem is network-related.
Maybe connected to the following WSL change:
Remove support bridged networking

Rancher Desktop Version

1.18.2

Rancher Desktop K8s Version

1.31.6

Which container engine are you using?

moby (docker cli)

What operating system are you using?

Windows

Operating System / Build Version

Windows 11 Pro 24H2 (OS build: 26100.3476)

What CPU architecture are you using?

x64

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

None

Windows User Only

WSL: 2.5.4
SentinelOne Agent
MetaDefender (Opswat)

@esikgabi esikgabi added the kind/bug Something isn't working label Apr 1, 2025
@jandubois jandubois added platform/windows area/networking triage/next-candidate Discuss if it should be moved to "Next" milestone labels Apr 1, 2025
@Nino-K Nino-K self-assigned this Apr 2, 2025
@Nino-K
Copy link
Member

Nino-K commented Apr 4, 2025

@esikgabi Thanks for reporting this. However, I tried reproducing the issue on both Windows 10 and Windows 11, and I was unable to replicate it. In both cases, Rancher Desktop installed and started without any issues. To further verify, I was able to successfully pull an image and run the container.

Below are the version numbers that were used during my testing:

Windows 11:

WSL version: 2.5.4.0
Kernel version: 6.6.75.1-1
WSLg version: 1.0.66
MSRDC version: 1.2.6074
Direct3D version: 1.611.1-81528511
DXCore version: 10.0.26100.1-240331-1435.ge-release
Windows version: 10.0.22621.4317

Windows 10:

WSL version: 2.5.4.0
Kernel version: 6.6.75.1-1
WSLg version: 1.0.66
MSRDC version: 1.2.6074
Direct3D version: 1.611.1-81528511
DXCore version: 10.0.26100.1-240331-1435.ge-release
Windows version: 10.0.19045.5608

@Nino-K
Copy link
Member

Nino-K commented Apr 4, 2025

After further investigating this without being able to reproduce the issue, I suspect that the error "creating tap device eth0 failed: no such file or directory" originates from here, which ultimately references the /dev/net/tun file descriptor here.

Are you able to share your Windows build number (via wsl --version)? I'm wondering if the build you're using might be impacted by this issue and may need an upgrade.

Additionally, could you try accessing the WSL distro by running wsl -d rancher-desktop and then executing ls -la /dev/net/tun to see if the file exists and has the correct permissions?

@jetvp
Copy link

jetvp commented Apr 7, 2025

Same issue, with /dev/net/tun appearing to be missing (build 26100)

@esikgabi
Copy link
Author

esikgabi commented Apr 7, 2025

Hi @Nino-K ,

Thank you for trying to reproduce it.
Unfortunately, the problem still exists on my side.
The info that you have asked for:

PS C:\Users\username> wsl --version
WSL version: 2.5.4.0
Kernel version: 6.6.75.1-1
WSLg version: 1.0.66
MSRDC version: 1.2.6074
Direct3D version: 1.611.1-81528511
DXCore version: 10.0.26100.1-240331-1435.ge-release
Windows version: 10.0.26100.3476
 PS C:\Users\username> wsl -d rancher-desktop
/mnt/c/Users/username # ls -la /dev/net/tun
ls: /dev/net/tun: No such file or directory

@esikgabi
Copy link
Author

esikgabi commented Apr 7, 2025

Hi All,

After I've added the

[boot]
systemd=true

config option to the /etc/wsl.conf of the rancher-desktop, the /dev/net/tun was available, and the rancher-desktop could start.

PS C:\Users\User_Name> wsl -d rancher-desktop
/mnt/c/Users/User_Name # cat /etc/wsl.conf
# WSL configuration options for the Rancher Desktop distribution.
[automount]
# Prevent processing /etc/fstab, since it doesn't exist.
mountFsTab = false
ldconfig = false
# Needed for compatibility with some `npm install` scenarios.
options = metadata

[network]
# Rather than generate automatically, we copy it over from the data distribution
# while adding the *.internal hosts.
generateHosts = false
# Disable generating /etc/resolv.conf too; we'll use a local dnsmasq instead.
generateResolvConf = false

[boot]
systemd=true

/mnt/c/Users/User_Name # ls -la /dev/net/tun
crw-rw-rw-    1 root     0          10, 200 Apr  7 13:30 /dev/net/tun

It can be a workaround till this option is added to the original config:
https://github.com/rancher-sandbox/rancher-desktop-wsl-distro/blob/bbcece8d65efd0f1b7ad26e329248c597f58eb39/files/wsl.conf

@jetvp
Copy link

jetvp commented Apr 7, 2025

Appears to be an issues in WSL that they will fix in the next pre-release:
microsoft/WSL#12748 (comment)

@jandubois
Copy link
Member

Appears to be an issues in WSL that they will fix in the next pre-release: microsoft/WSL#12748 (comment)

Thank you for the link @jetvp!

Since this bug is only in a pre-release of WSL and will be fixed before the actual release, there is nothing left for Rancher Desktop to do about it, so I'm going to close this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/networking kind/bug Something isn't working platform/windows triage/next-candidate Discuss if it should be moved to "Next" milestone
Projects
None yet
Development

No branches or pull requests

4 participants