rancher-sandbox / rancher-desktop

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

Error Starting Kubernetes (Windows Machine) #4762

Open Tushti02 opened 1 year ago

Tushti02 commented 1 year ago

Actual Behavior

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

Context: Preparing to start

Some recent logfile lines:

2023-05-24T21:37:43.178Z: Registered distributions: rancher-desktop-data,Ubuntu-20.04,rancher-desktop 2023-05-24T21:37:50.827Z: Registered distributions: rancher-desktop-data,Ubuntu-20.04,rancher-desktop 2023-05-24T21:37:55.893Z: Registered distributions: rancher-desktop-data,Ubuntu-20.04,rancher-desktop 2023-05-24T21:38:00.122Z: Registered distributions: rancher-desktop-data,Ubuntu-20.04,rancher-desktop 2023-05-24T21:38:00.122Z: data distro already registered 2023-05-24T21:38:05.947Z: WSL: executing: /bin/sh -c [ -e /etc/os-release ] && . /etc/os-release ; echo ${VERSION_ID:-0.1}: Error: wsl.exe exited with code 4294967295

Steps to Reproduce

I simply installed Rancher Desktop on windows machine using winget install -e --id suse.RancherDesktop

As soon as I start the rancher-desktop it gives this error.

Result

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

Context: Preparing to start

Some recent logfile lines:

2023-05-24T21:37:43.178Z: Registered distributions: rancher-desktop-data,Ubuntu-20.04,rancher-desktop 2023-05-24T21:37:50.827Z: Registered distributions: rancher-desktop-data,Ubuntu-20.04,rancher-desktop 2023-05-24T21:37:55.893Z: Registered distributions: rancher-desktop-data,Ubuntu-20.04,rancher-desktop 2023-05-24T21:38:00.122Z: Registered distributions: rancher-desktop-data,Ubuntu-20.04,rancher-desktop 2023-05-24T21:38:00.122Z: data distro already registered 2023-05-24T21:38:05.947Z: WSL: executing: /bin/sh -c [ -e /etc/os-release ] && . /etc/os-release ; echo ${VERSION_ID:-0.1}: Error: wsl.exe exited with code 4294967295

Expected Behavior

Rancher desktop should start

Additional Information

No response

Rancher Desktop Version

1.8.1

Rancher Desktop K8s Version

v1.26.4(stable)

Which container engine are you using?

moby (docker cli)

What operating system are you using?

Windows

Operating System / Build Version

Windows 10 Enterprise operating system OS Build 19045.2846

What CPU architecture are you using?

x64

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

None

Windows User Only

no

NewGyu commented 5 months ago

Hello developers, I'm a rd lover. I would like to say thank you for the great product.

BTW, the same type error is also occurred on Windows 11 Pro, but sometimes, once or twice per momth. image

Restarting windows can resolve it, in my case.

Or check the following and then close RD window once, and then launch RD again. image

This error is not very critical because it can be recovered by the above workaround.

However, I have a concern. My background.log says:

2024-03-07T01:06:55.122Z: UnhandledRejectionWarning: Error: ENOENT: no such file or directory, watch 'C:\Users\newgyu.kube\config' at FSWatcher. (node:internal/fs/watchers:247:19) at Object.watch (node:fs:2343:34) at C:\Users\newgyu\AppData\Local\Programs\Rancher Desktop\resources\app.asar\dist\app\background.js:41:109390 at Array.map () at Zs.watchForChanges (C:\Users\newgyu\AppData\Local\Programs\Rancher > Desktop\resources\app.asar\dist\app\background.js:41:109378) { errno: -4058, syscall: 'watch', code: 'ENOENT', path: 'C:\Users\newgyu\.kube\config', filename: 'C:\Users\newgyu\.kube\config' } 2024-03-07T01:07:32.104Z: Kubernetes was unable to start: c [Error]: wsl.exe exited with code 4294967295 at ChildProcess. (C:\Users\newgyu\AppData\Local\Programs\Rancher Desktop\resources\app.asar\dist\app\background.js:2:137486) at ChildProcess.emit (node:events:513:28) at Process.onexit (node:internal/child_process:291:12) { command: [ 'wsl.exe', '--distribution', 'rancher-desktop', '--exec', 'busybox', 'cp', '', '/etc/conf.d/docker' ], code: 4294967295, [Symbol(child-process.command)]: 'wsl.exe --distribution rancher-desktop --exec busybox cp /etc/conf.d/docker' }

But, my preference disables k8s. image

Why rd tries to start k8s even it is set to disable?