Skip to content
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

WSL2, Stuck on Initializing Rancher Desktop, Cause by cannot read .kube/config #7997

Open
sople1 opened this issue Dec 21, 2024 · 5 comments
Labels
kind/bug Something isn't working

Comments

@sople1
Copy link

sople1 commented Dec 21, 2024

Actual Behavior

Recently I faced - stuck on initializing Rancher Desktop step (graph at GUI Bottom-Right).
And I found why it presented.

Steps to Reproduce

  1. Delete %userprofile%/.kube/config or set %home% to not equal with %userprofile%
  2. no set %kubeconfig% or delete it
  3. Run Rancher Desktop (rdctl start)
  4. See Graph (initializing Rancher Desktop) forever

Result

in %localappdata%\rancher-desktop\logs\background.log , showing error - cannot read .kube/config - and not run wsl-helper for listen docker.sock
and I can see graph (initializing Rancher Desktop) forever and forever

Expected Behavior

Although .kube\config not readable, must run wsl-helper for using docker
can see graph (initializing Rancher Desktop) is disappeared

Additional Information

No response

Rancher Desktop Version

1.16 (latest)

Rancher Desktop K8s Version

not installed

Which container engine are you using?

moby (docker cli)

What operating system are you using?

Windows

Operating System / Build Version

Windows 10 Enterprise

What CPU architecture are you using?

x64

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

None

Windows User Only

VPN Proxied, not equal %userprofile% and %home%, not set %kubeconfig%, Admin Restricted

@sople1 sople1 added the kind/bug Something isn't working label Dec 21, 2024
@sople1
Copy link
Author

sople1 commented Dec 21, 2024

Ah, is it correct that .kube/config file is not present, and after factory reset and first run, not creating .kube/config automately?

@mook-as
Copy link
Contributor

mook-as commented Dec 23, 2024

The cannot read .kube/config part is probably normal (because it doesn't exist yet, and it will ignore it and keep going). Most likely the error is elsewhere.

Would you be able to attach your complete logs to the issue so we can look at it? Ideally enable debug logging before quitting Rancher Desktop and restarting it, so that we get extra logging that might be relevant. Thanks!

@sople1
Copy link
Author

sople1 commented Dec 24, 2024

Umm, these logs are not switched on debug logging, but these logs were created by reproducing the error at that time.

logs-1 - not set %KUBECONFIG%, no .kube/config
logs-1.zip

logs-2 - set %KUBECONFIG% to %USERPROFILE%.kube\config, no .kube/config
logs-2.zip

@mook-as
Copy link
Contributor

mook-as commented Dec 24, 2024

Oh, I see a:
2024-12-23T16:56:19.636-0800: Integration sync: Error: Error: EPERM: operation not permitted, mkdir 'U:\.kube'

That sounds like it's the same thing as #7824 — failure to create the Kubernetes config was causing the rest to fail unexpectedly.

I also notice that different parts of the code is behaving differently… I see references to C:\Users\…\.kube at the start of the second log file (in background.log), but U:\.kube afterwards. That's the one where you override %KUBECONFIG%, so we should obey that everywhere (and not look at U:\ at all)…

@sople1
Copy link
Author

sople1 commented Dec 25, 2024

Oh, there was someone else with a similar problem as me!

And, My case, U:.kube is no write-able on that pc. (Although Admin rights)

So I think it would be nice to allow the user to specify .kube\config location on the GUI frontend.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants