question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

rancher-desktop fails to start on macOS with `sudo: a password is required` while running lima

See original GitHub issue

Actual Behavior

Rancher desktop is failing to start due to lima error

Steps to Reproduce

  1. Open Rancher desktop
  2. Make mac laptop sleep
  3. Open again, quit Rancher desktop and start it again
  4. 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

Screen Shot 2022-03-15 at 10 25 30

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:open
  • Created 2 years ago
  • Reactions:8
  • Comments:17 (5 by maintainers)

github_iconTop GitHub Comments

6reactions
noventa-loftcommented, Mar 15, 2022

This workaround did the trick:

chmod 775 /private/var/run/rancher-desktop-lima

3reactions
jorgebnunescommented, Apr 6, 2022

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

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found