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

Startup Stuck "Waiting for Kubernetes API" #2413

Closed DerekJi closed 2 years ago

DerekJi commented 2 years ago

Actual Behavior

After compressed the C drive on Windows 10, Rancher Desktop cannot be launched and stops at the step "Waiting for Kubernetes API" for ever.

Steps to Reproduce

Initial Installation

Windows Update

Restart Rancher Desktop

It stops at the step "Waiting for Kubernetes API" for ever. πŸ˜‚

Result

Rancher Desktop stops at "Waiting for Kubernetes API" for ever, with no error messages.

Expected Behavior

  1. Able to be started after compressed the system drive "C:", OR
  2. Show meaningful error message

Additional Information

What I've Found

I checked the logs, but didn't understand what k3s was complaining:

k3s no default routes found in \"/proc/net/route\" or \"/proc/net/ipv6_route\"

Tried to select different versions of Kubernetes, but no luck.

Tried to uninstall and reinstall Rancher Desktop 1.2, 1.3, 1.4. No luck.

Then, tried "Factory Reset", and found it failed at

wsl.exe --import rancher-desktop C:\Users\%USER%\AppData\Local\rancher-desktop\distro "C:\Users\%USER%\AppData\Local\Programs\Rancher Desktop\resources\resources\win32\distro-0.24.tar" --version **2**

it said something like

The requested operation could not be completed due to a virtual disk system limitation. Virtual hard disk files must be uncompressed and unencrypted and must not be sparse.

Unticked the checkbox "Compress this drive to save disk space" and OK

Then it works.

Summary

I understand it's not Rancher's fault, but it would be great if it could show proper error messages somewhere (UI or logs).

Rancher Desktop Version

1.4.1

Rancher Desktop K8s Version

1.23.6

Which container runtime are you using?

moby (docker cli)

What operating system are you using?

Windows

Operating System / Build Version

Windows 10 Pro, 20H2

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 VPN

jandubois commented 2 years ago

As you already said, this is a limitation of WSL2 and not of Rancher Desktop itself. We do need to detect this, and present an understandable error though.

I haven't tested it, but it may be possible to just uncompress the %LOCALAPPDATA%\rancher-desktop\distro folder:

You can do this in the "Advanced" property settings of the folder:

Screen Shot 2022-06-16 at 11 27 45 PM

Make sure that both compression and encryption are de-selected:

Screen Shot 2022-06-16 at 11 28 07 PM

That would still allow you to keep the rest of your disk compressed.

gaktive commented 2 years ago

We need to document the limitation of Windows 10 disk encryption with WSL (thus Rancher Desktop).

jandubois commented 2 years ago

Closing this bug report; the enhancement to detect and report the issue during installation will be tracked in #2439.

jandubois commented 2 years ago

@DerekJi You previously confirmed that disabling compression just on the folder worked, but it looks like the comment is gone now. Did you delete it because it didn't work after all, or did Github drop this by itself?