rancher-desktop fails to start on macOS with `sudo: a password is required` while running lima
See original GitHub issueActual Behavior
Rancher desktop is failing to start due to lima error
Steps to Reproduce
- Open Rancher desktop
- Make mac laptop sleep
- Open again, quit Rancher desktop and start it again
- Encountering this error
Some times restarting the laptop (instead of sleep) makes it work again, but it’s not consistent. Most of the times it keeps having lima errors.
Result
Expected Behavior
Rancher desktop starting without issues
Additional Information
lima.log
2022-03-15T01:31:17.852Z: Running command limactl list --json...
2022-03-15T01:31:20.721Z: Running command limactl list --json...
2022-03-15T01:31:21.449Z: Running command limactl sudoers --check...
"/private/etc/sudoers.d/zzzzz-rancher-desktop-lima" is up-to-date (or sudo doesn't require a password)
2022-03-15T01:31:21.710Z: Running command limactl list --json...
2022-03-15T01:31:21.968Z: Running command limactl start --tty=false 0...
time="2022-03-15T10:31:22+09:00" level=info msg="Using the existing instance \"0\""
time="2022-03-15T10:31:22+09:00" level=info msg="Starting switch daemon for \"shared\" network"
time="2022-03-15T10:31:22+09:00" level=fatal msg="failed to run [sudo --user root --group wheel --non-interactive /bin/mkdir -m 775 -p /private/var/run/rancher-desktop-lima]: stdout=\"\", stderr=\"sudo: a password is required\\n\": exit status 1"
2022-03-15T01:31:22.260Z: + limactl start --tty=false 0
2022-03-15T01:31:22.261Z: Error: /Applications/Rancher Desktop.app/Contents/Resources/resources/darwin/lima/bin/limactl exited with code 1
2022-03-15T01:31:22.261Z: Error starting lima: Error: /Applications/Rancher Desktop.app/Contents/Resources/resources/darwin/lima/bin/limactl exited with code 1
at ChildProcess.<anonymous> (/Applications/Rancher Desktop.app/Contents/Resources/app.asar/dist/app/background.js:1:8692)
at ChildProcess.emit (node:events:394:28)
at Process.ChildProcess._handle.onexit (node:internal/child_process:290:12)
Seems like it’s the same as this #1615
Rancher Desktop Version
1.1.1
Rancher Desktop K8s Version
1.22.7
Which container runtime are you using?
moby (docker cli)
What operating system are you using?
macOS
Operating System / Build Version
Big Sur 11.6.4
What CPU architecture are you using?
x64
Linux only: what package format did you use to install Rancher Desktop?
No response
Windows User Only
No response
Issue Analytics
- State:
- Created 2 years ago
- Reactions:8
- Comments:17 (5 by maintainers)
Top Results From Across the Web
Rancher desktop is asking system permission on each startup
I installed Rancher desktop in order to look for an alternative to Docker Desktop. While starting Rancher Desktop it always asks for ...
Read more >Trying out Rancher desktop with MAC | by Ayesha Jayasankha
Rancher desktop is an open source program that provides Kubernetes and ... ask for the permission and you need to provide your password...
Read more >FAQ - Rancher Desktop Docs
Rancher Desktop runs local Kubernetes and a container management platform. The two solutions complement each other. Q: Is there a Kubernetes Cluster Explorer ......
Read more >Memory error when running Elasticsearch on Docker (macOS ...
The problem was not in MacOS I was using Rancher Desktop. After switching to Docker Desktop everything is working fine. Thank you.
Read more >Using Rancher Desktop for Local Kubernetes Development
On macOS and Linux systems, the VM is hosted by QEMU; ... When you first run Rancher Desktop, you'll need to perform some...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
This workaround did the trick:
chmod 775 /private/var/run/rancher-desktop-lima
Hi, do:
sudo vi /private/etc/sudoers.d/sudoers
On this file add/modify replacing it by your username:
your_user_name ALL=(ALL) NOPASSWD: ALL
Save and restart Rancher Desktop