rancher-sandbox / rancher-desktop

Container Management and Kubernetes on the Desktop
https://rancherdesktop.io
Apache License 2.0
5.96k stars 281 forks source link

Error: wsl.exe exited with code 4294967295 #1328

Open jandubois opened 2 years ago

jandubois commented 2 years ago

I'm running into the same error.

Error: wsl.exe exited with code 4294967295

I made sure to change my default version in wsl to 2. And my windows version is 21H1 Build 19043.

This is the log running the exe directly.

C:\Users\borcherspm\AppData\Local\Programs\Rancher Desktop>"Rancher Desktop.exe"

C:\Users\borcherspm\AppData\Local\Programs\Rancher Desktop>
(node:4788) UnhandledPromiseRejectionWarning: Error: wsl.exe exited with code 4294967295
    at ChildProcess.<anonymous> (C:\Users\borcherspm\AppData\Local\Programs\Rancher Desktop\resources\app.asar\dist\app\background.js:1:8014)
    at ChildProcess.emit (node:events:394:28)
    at Process.ChildProcess._handle.onexit (node:internal/child_process:290:12)
(Use `Rancher Desktop --trace-warnings ...` to show where the warning was created)
(node:4788) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)

Originally posted by @borcherspm in https://github.com/rancher-sandbox/rancher-desktop/issues/267#issuecomment-1021522403

jandubois commented 2 years ago

@borcherspm I've created a new issue for your problem, as it seems to be unrelated to the WSL version.

Absemj commented 2 years ago

I had a similar issue right after I completed installation and opened Rancher Desktop v0.7.1 (Windows), I got the error "there was an unknown error starting kubernetes: error.wsl.exe exited with code 4294967295"

I uninstalled it, then began to reinstall it when during the installation a PowerShell was opened and the Linux Kernel downloaded and installed, this didn't happen on the first installation. Then I proceeded to restart my computer and I no longer get the error above when starting up Rancher Desktop.

So maybe it's because you require the Linux kernel also?

zerikv commented 2 years ago

I hit the same error 4294967295 when started Rancher-Desktop on Windows 10 Pro 20H2 and I have applied the solution describe in this comment : #1001#issuecomment-999233332 wich worked fine for me :

Please run wsl --update from an elevated command prompt, and then run wsl --shutdown from a normal one.

borcherspm commented 2 years ago

running wsl --update fixed it for me. I do remember seeing the powershell on the installation but it disappeared too fast to tell if it said the linux kernel was downloaded and installed.

thanks for the help @zerikv

borcherspm commented 2 years ago

after upgrading to 1.0.0, i'm still getting this error.

image

full text

Kubernetes Error
Error Starting Kubernetes
Error: wsl.exe exited with code 4294967295
Last command run:
wsl --distribution rancher-desktop --exec /bin/sh -c [ -e /etc/os-release ] && . /etc/os-release ; echo ${VERSION_ID:-0.1}

Context:
Starting Kubernetes

Some recent logfile lines:
2022-01-31T16:31:09.059Z: Running command wsl --list --quiet...
2022-01-31T16:31:10.488Z: Registered distributions: Ubuntu,Ubuntu-20.04,rancher-desktop,docker-desktop,rancher-desktop-data,docker-desktop-data
2022-01-31T16:31:10.508Z: Running command wsl --list --quiet...
2022-01-31T16:31:11.517Z: Registered distributions: Ubuntu,Ubuntu-20.04,rancher-desktop,docker-desktop,rancher-desktop-data,docker-desktop-data
2022-01-31T16:31:11.518Z: Running command wsl --distribution rancher-desktop --exec /bin/sh -c [ -e /etc/os-release ] && . /etc/os-release ; echo ${VERSION_ID:-0.1}...
2022-01-31T16:31:12.432Z: WSL: executing: /bin/sh -c [ -e /etc/os-release ] && . /etc/os-release ; echo ${VERSION_ID:-0.1}: Error: wsl.exe exited with code 4294967295
zerikv commented 2 years ago

@borcherspm: another workaround for this error 4294967295 is to use from the Rancher Desktop Window the option : Kubernetes Settings > Reset Kubernetes.

jasonalbers commented 2 years ago

RancherDesktop

2022-02-01T17:01:39.381Z: Capturing output: wsl.exe --distribution rancher-desktop --exec cat /proc/net/fib_trie 2022-02-01T17:01:40.116Z: Running command wsl --distribution rancher-desktop --exec wslpath -a -u C:\Users\jason.albers\AppData\Local\Programs\Rancher Desktop\resources\resources\linux\wsl-helper... 2022-02-01T17:01:40.117Z: Capturing output: wsl.exe --distribution rancher-desktop --exec wslpath -a -u C:\Users\jason.albers\AppData\Local\Programs\Rancher Desktop\resources\resources\linux\wsl-helper 2022-02-01T17:01:40.317Z: Running command wsl --distribution rancher-desktop --exec /mnt/c/Users/jason.albers/AppData/Local/Programs/Rancher Desktop/resources/resources/linux/wsl-helper k3s kubeconfig... 2022-02-01T17:01:40.317Z: Capturing output: wsl.exe --distribution rancher-desktop --exec /mnt/c/Users/jason.albers/AppData/Local/Programs/Rancher Desktop/resources/resources/linux/wsl-helper k3s kubeconfig 2022-02-01T17:01:45.254Z: Running command wsl --distribution rancher-desktop --exec wslpath -a -u C:\Users\jason.albers\AppData\Local\Programs\Rancher Desktop\resources\resources\linux\wsl-helper... 2022-02-01T17:01:45.254Z: Capturing output: wsl.exe --distribution rancher-desktop --exec wslpath -a -u C:\Users\jason.albers\AppData\Local\Programs\Rancher Desktop\resources\resources\linux\wsl-helper 2022-02-01T17:01:45.443Z: Running command wsl --list --quiet... 2022-02-01T17:01:45.443Z: Capturing output: wsl.exe --list --quiet 2022-02-01T17:01:45.533Z: Running command wsl --distribution Ubuntu --exec /mnt/c/Users/jason.albers/AppData/Local/Programs/Rancher Desktop/resources/resources/linux/wsl-helper kubeconfig --show... 2022-02-01T17:01:45.533Z: Capturing output: wsl.exe --distribution Ubuntu --exec /mnt/c/Users/jason.albers/AppData/Local/Programs/Rancher Desktop/resources/resources/linux/wsl-helper kubeconfig --show 2022-02-01T17:01:45.975Z: WSL failed to execute wsl.exe --distribution Ubuntu --exec /mnt/c/Users/jason.albers/AppData/Local/Programs/Rancher Desktop/resources/resources/linux/wsl-helper kubeconfig --show: Error: wsl.exe exited with code 1 2022-02-01T17:01:45.976Z: Launching background process Win32 socket proxy. 2022-02-01T17:02:47.734Z: Running command wsl --distribution rancher-desktop --exec wslpath -a -u C:\Users\jason.albers\AppData\Local\Programs\Rancher Desktop\resources\resources\linux\wsl-helper... 2022-02-01T17:02:47.734Z: Capturing output: wsl.exe --distribution rancher-desktop --exec wslpath -a -u C:\Users\jason.albers\AppData\Local\Programs\Rancher Desktop\resources\resources\linux\wsl-helper 2022-02-01T17:02:47.887Z: Running command wsl --list --quiet... 2022-02-01T17:02:47.888Z: Capturing output: wsl.exe --list --quiet 2022-02-01T17:02:47.955Z: Running command wsl --distribution Ubuntu --exec /mnt/c/Users/jason.albers/AppData/Local/Programs/Rancher Desktop/resources/resources/linux/wsl-helper kubeconfig --show... 2022-02-01T17:02:47.955Z: Capturing output: wsl.exe --distribution Ubuntu --exec /mnt/c/Users/jason.albers/AppData/Local/Programs/Rancher Desktop/resources/resources/linux/wsl-helper kubeconfig --show 2022-02-01T17:02:48.393Z: WSL failed to execute wsl.exe --distribution Ubuntu --exec /mnt/c/Users/jason.albers/AppData/Local/Programs/Rancher Desktop/resources/resources/linux/wsl-helper kubeconfig --show: Error: wsl.exe exited with code 1

borcherspm commented 2 years ago

i kept getting this error 4294967295, but the error log wasn't very helpful. So i tried running the command that was failing directly.

wsl --import rancher-desktop C:\Users\borcherspm\AppData\Local\rancher-desktop\distro C:\Users\borcherspm\AppData\Local\Programs\Rancher Desktop\resources\resources\win32\distro-0.19.tar --version 2

and i got this error.

Logon failure: the user has not been granted the requested logon type at this computer.

I'm very use to this error with docker desktop. Restarting vmms in powershell

Restart-Service -Name vmms

and now rancher desktop starts without any issue. (Of course this is without kubernetes enabled) But i think that's either because of the proxy or the vpn(but that's a different issue https://github.com/rancher-sandbox/rancher-desktop/issues/995)

Nino-K commented 1 year ago

I have come across this issue on Windows 10. What I noticed is that rancher-desktop distro was stuck in Uninstalling state.

wsl -l -v
  NAME               STATE           VERSION
  rancher-desktop    Uninstalling    2

and that persisted even when I uninstalled rancher-desktop.

The workaround for me was to quit rancher-desktop (if running), and then

wsl --unregister rancher-desktop
wsl --unregister rancher-desktop-data

Uninstall WSL and then re-install rancher-desktop. At this point, I allowed rancher-desktop to install WSL on the machine. The workaround above seem to have rectified the issue for me.

Nelu251 commented 1 year ago

Had this issue : WSL failed to execute wsl.exe --import rancher-desktop C:\Users\\AppData\Local\rancher-desktop\distro C:\Program Files\Rancher Desktop\resources\resources\win32\distro-0.42.tar --version 2: Error: wsl.exe exited with code 4294967295

and the above comment helped me, thanks Nino-K!

bardic commented 1 year ago

I have come across this issue on Windows 10. What I noticed is that rancher-desktop distro was stuck in Uninstalling state.

wsl -l -v
  NAME               STATE           VERSION
  rancher-desktop    Uninstalling    2

and that persisted even when I uninstalled rancher-desktop.

The workaround for me was to quit rancher-desktop (if running), and then

wsl --unregister rancher-desktop
wsl --unregister rancher-desktop-data

Uninstall WSL and then re-install rancher-desktop. At this point, I allowed rancher-desktop to install WSL on the machine. The workaround above seem to have rectified the issue for me.

I had to factory reset in rancher after unregistering, but this did the trick. Thanks!