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 #1786

Open antoninoromeo opened 2 years ago

antoninoromeo commented 2 years ago

Actual Behavior

After installed on windows 10 Pro 21H1, 19044.1586, selected docker doaemon, K8 disabled, while starting rancher-desktop appear following message.

Steps to Reproduce

Install fresh on windows 10 Pro 21H1, 19044.1586, select docker daemon, k8 disabled and start by rancher-desktop desktop icon.

Result

Error: wsl.exe exited with code 4294967295

Last command run: wsl --distribution rancher-desktop --exec cp /mnt/c/Users/aromeo/AppData/Local/Temp/rd-ca-B7X5Fc/rd-230.crt /usr/local/share/ca-certificates/

Context: Starting WSL environment

Some recent logfile lines: 2022-03-11T14:11:10.700Z: Running: wsl.exe --distribution rancher-desktop --exec cp /mnt/c/Users/aromeo/AppData/Local/Temp/rd-ca-B7X5Fc/rd-180.crt /usr/local/share/ca-certificates/ 2022-03-11T14:11:10.709Z: Running command wsl --distribution rancher-desktop --exec cp /mnt/c/Users/aromeo/AppData/Local/Temp/rd-ca-B7X5Fc/rd-191.crt /usr/local/share/ca-certificates/... 2022-03-11T14:11:10.709Z: Running: wsl.exe --distribution rancher-desktop --exec cp /mnt/c/Users/aromeo/AppData/Local/Temp/rd-ca-B7X5Fc/rd-191.crt /usr/local/share/ca-certificates/ 2022-03-11T14:11:10.718Z: Running command wsl --distribution rancher-desktop --exec cp /mnt/c/Users/aromeo/AppData/Local/Temp/rd-ca-B7X5Fc/rd-173.crt /usr/local/share/ca-certificates/... 2022-03-11T14:11:10.718Z: Running: wsl.exe --distribution rancher-desktop --exec cp /mnt/c/Users/aromeo/AppData/Local/Temp/rd-ca-B7X5Fc/rd-173.crt /usr/local/share/ca-certificates/ 2022-03-11T14:11:10.732Z: Running command wsl --distribution rancher-desktop --exec cp /mnt/c/Users/aromeo/AppData/Local/Temp/rd-ca-B7X5Fc/rd-168.crt /usr/local/share/ca-certificates/... 2022-03-11T14:11:10.732Z: Running: wsl.exe --distribution rancher-desktop --exec cp /mnt/c/Users/aromeo/AppData/Local/Temp/rd-ca-B7X5Fc/rd-168.crt /usr/local/share/ca-certificates/ 2022-03-11T14:11:10.742Z: Running command wsl --distribution rancher-desktop --exec cp /mnt/c/Users/aromeo/AppData/Local/Temp/rd-ca-B7X5Fc/rd-200.crt /usr/local/share/ca-certificates/... 2022-03-11T14:11:10.742Z: Running: wsl.exe --distribution rancher-desktop --exec cp /mnt/c/Users/aromeo/AppData/Local/Temp/rd-ca-B7X5Fc/rd-200.crt /usr/local/share/ca-certificates/

Expected Behavior

rancher-desktop works and docker daemon is available

Additional Information

2022-03-11T14:16:08.261Z: WSL: executing: cp /mnt/c/Users/aromeo/AppData/Local/Temp/rd-ca-B7X5Fc/rd-153.crt /usr/local/share/ca-certificates/: Error: wsl.exe exited with code 4294967295 2022-03-11T14:16:38.264Z: WSL: executing: cp /mnt/c/Users/aromeo/AppData/Local/Temp/rd-ca-B7X5Fc/rd-146.crt /usr/local/share/ca-certificates/: Error: wsl.exe exited with code 4294967295 2022-03-11T14:17:08.286Z: WSL: executing: cp /mnt/c/Users/aromeo/AppData/Local/Temp/rd-ca-B7X5Fc/rd-159.crt /usr/local/share/ca-certificates/: Error: wsl.exe exited with code 4294967295 2022-03-11T14:17:38.288Z: WSL: executing: cp /mnt/c/Users/aromeo/AppData/Local/Temp/rd-ca-B7X5Fc/rd-101.crt /usr/local/share/ca-certificates/: Error: wsl.exe exited with code 4294967295 2022-03-11T14:18:08.298Z: WSL: executing: cp /mnt/c/Users/aromeo/AppData/Local/Temp/rd-ca-B7X5Fc/rd-158.crt /usr/local/share/ca-certificates/: Error: wsl.exe exited with code 4294967295 2022-03-11T14:18:38.296Z: WSL: executing: cp /mnt/c/Users/aromeo/AppData/Local/Temp/rd-ca-B7X5Fc/rd-102.crt /usr/local/share/ca-certificates/: Error: wsl.exe exited with code 4294967295 2022-03-11T14:19:08.300Z: WSL: executing: cp /mnt/c/Users/aromeo/AppData/Local/Temp/rd-ca-B7X5Fc/rd-156.crt /usr/local/share/ca-certificates/: Error: wsl.exe exited with code 4294967295 2022-03-11T14:19:38.306Z: WSL: executing: cp /mnt/c/Users/aromeo/AppData/Local/Temp/rd-ca-B7X5Fc/rd-103.crt /usr/local/share/ca-certificates/: Error: wsl.exe exited with code 4294967295 2022-03-11T14:20:08.319Z: WSL: executing: cp /mnt/c/Users/aromeo/AppData/Local/Temp/rd-ca-B7X5Fc/rd-113.crt /usr/local/share/ca-certificates/: Error: wsl.exe exited with code 4294967295 2022-03-11T14:20:38.331Z: WSL: executing: cp /mnt/c/Users/aromeo/AppData/Local/Temp/rd-ca-B7X5Fc/rd-133.crt /usr/local/share/ca-certificates/: Error: wsl.exe exited with code 4294967295 2022-03-11T14:21:08.342Z: WSL: executing: cp /mnt/c/Users/aromeo/AppData/Local/Temp/rd-ca-B7X5Fc/rd-123.crt /usr/local/share/ca-certificates/: Error: wsl.exe exited with code 4294967295 2022-03-11T14:21:38.341Z: WSL: executing: cp /mnt/c/Users/aromeo/AppData/Local/Temp/rd-ca-B7X5Fc/rd-130.crt /usr/local/share/ca-certificates/: Error: wsl.exe exited with code 4294967295 2022-03-11T14:22:08.356Z: WSL: executing: cp /mnt/c/Users/aromeo/AppData/Local/Temp/rd-ca-B7X5Fc/rd-185.crt /usr/local/share/ca-certificates/: Error: wsl.exe exited with code 4294967295 2022-03-11T14:22:38.356Z: WSL: executing: cp /mnt/c/Users/aromeo/AppData/Local/Temp/rd-ca-B7X5Fc/rd-135.crt /usr/local/share/ca-certificates/: Error: wsl.exe exited with code 4294967295

Rancher Desktop Version

1.1.1

Rancher Desktop K8s Version

1.21.10

Which container runtime are you using?

moby (docker cli)

What operating system are you using?

Windows

Operating System / Build Version

windows 10 Pro 21H1, 19044.1586

What CPU architecture are you using?

x64

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

No response

Windows User Only

forticlient antivirus running

antoninoromeo commented 2 years ago

i noticed the following error Cattura )

antoninoromeo commented 2 years ago

wsl.log wsl-exec.log wsl-helper.Ubuntu-20.04.log background.log

CuriousWizard commented 2 years ago

I've found a workaround for this issue. If you use "Reset Kubernetes" under Kubernetes Settings, this error message goes away when opening Rancher Desktop.

I'm not sure why it's happenning, but from my experience it is usually due to Docker Desktop cannot stop WSL properly when I'm shutting down my computer. WSL throws an error popup on shutdown screen but only for a split second. For further info, there is an issue on Microsoft's WSL repo (issue).

egsavage commented 2 years ago

I saw the same issue on my installation attempt.

image

egsavage commented 2 years ago

I've found a workaround for this issue. If you use "Reset Kubernetes" under Kubernetes Settings, this error message goes away when opening Rancher Desktop.

I used the workaround, and I was able to get past the CA certificates copy issue. But now I have a new issue, and it never gets past the Kubernetes API check.

image

pepsoler commented 2 years ago

Same issue for me, which I think I finally solved.

  1. In Rancher log "wsl-exec.log" I had a message about update the kernel with a link. Go to that link.
  2. From the link before, do the step 4.
  3. If for step 4, the update of the kernel you have a error message abou "ended prematurely" , follow this: "find wsl_update_x64.msi file then right-click then it will show uninstall option. uninstall and reinstall".
  4. follow step 5 from the initial link.
  5. Now you can restart Rancher with no problem (I hope for you).

Regards,

egsavage commented 2 years ago

Thanks for the info. I tried to install the update as you mentioned, and it said I already had the most current installed. I did try the uninstall/install on the update MSI, but I got the same result with it hanging waiting for the Kubernetes API. I will go review the logs again to see if there is anything useful in resolving this issue.

william-davis-dev commented 2 years ago

I've been having this issue for a long time, and I finally figured out the cause. I had disabled Data Execution Protection (DEP) on my system, and that was causeing my WSL startup to fail. After I fixed my DEP (I used this link) I was able to start Rancher Desktop normally.

egsavage commented 2 years ago

@william-davis-dev, did you disable DEP globally or hopefully only on some executables? Thanks for the information.

william-davis-dev commented 2 years ago

@egsavage I actually enabled DEP globally to get this resolved. Previously I had it off (for some Flutter development task)

egsavage commented 2 years ago

Thanks @william-davis-dev. I missed the enabled part of your original post. I uninstalled the older Rancher Desktop, enabled DEP globally (via the command prompt, no exceptions), rebooted and reinstalled the latest version of Rancher Desktop. Unfortunately, it seems to be stuck in the same spot as last time.

image