rancher-desktop: Rancher Desktop fails to start on MacOS 12.3

Noticed Rancher Desktop (1.1.1) now fails to start after the MacOS update to 12.3

Steps to Reproduce

  1. Update MacOS to 12.3
  2. Open/Start Rancher Desktop
  3. Authorize privilege access

Result Kubernetes Error Error Starting Kubernetes Error: /Applications/Rancher Desktop.app/Contents/Resources/resources/darwin/lima/bin/limactl exited with code 1

Last command Run: limactl start --tty=false 0

Context: Starting virtual machine

Some recent logfile lines:

time="2022-03-15T04:59:58-07:00" level=info msg="Using the existing instance \"0\""
time="2022-03-15T04:59:58-07:00" level=info msg="Starting switch daemon for \"shared\" network"
time="2022-03-15T04:59:58-07:00" level=fatal msg="\"/private/var/run/rancher-desktop-lima\" doesn't seem to be writable by the daemon (gid:1) group"
2022-03-15T11:59:58.940Z: + limactl start --tty=false 0
2022-03-15T11:59:58.940Z: Error: /Applications/Rancher Desktop.app/Contents/Resources/resources/darwin/lima/bin/limactl exited with code 1
2022-03-15T11:59:58.940Z: 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)

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Reactions: 49
  • Comments: 30 (8 by maintainers)

Most upvoted comments

We have determined the root cause of this issue:

Rancher Desktop has always erroneously created /private/var/run/rancher-desktop-lima with file mode 555.

We didn’t notice this because it was silently fixed by lima when it made sure the directory existed:

# head -1 /etc/sudoers.d/zzzzz-rancher-desktop-lima
%everyone ALL=(root:wheel) NOPASSWD:NOSETENV: /bin/mkdir -m 775 -p /private/var/run/rancher-desktop-lima

Now, this is actually a bug: mkdir -m 755 -p ... is not supposed to change the permission bits if the directory already existed. But it did, so it covered up the bug in Rancher Desktop.

This bug has been fixed in the Monterey 12.3 release (but not in e.g. the Catalina security update).

The best workaround for now is to run this command after each reboot (/var/run is deleted on reboot), before you invoke Rancher Desktop the first time:

sudo mkdir -m 775 /private/var/run/rancher-desktop-lima

We are planning to make a new Rancher Desktop release next week that addresses this issue.

The permissions on the /private/var/run/rancher-desktop-lima directory were reset to 555.

dr-xr-xr-x  2 root  daemon   64 15 mrt 13:34 /private/var/run/rancher-desktop-lima

Workaround is resetting it to 775.

yes, i just updated and i’m facing the same issue

I installed rancher desktop today on my intel macbook pro 2019 with montery 12.3 and faced the same issue. in my case the directory was already present but with the wrong permissions i had to run: sudo chmod 775 /private/var/run/rancher-desktop-lima instead.

Getting error in mac monterey 12.5 after launching rancher desktop. Sharing the 2 screenshots for the reference

I tried some suggested solutions but not working

  1. Tried “sudo mkdir -m 775 /private/var/run/rancher-desktop-lima”
  2. Removing the ./kube/config
  3. Tried factory reset many times 1 2

@mariusrugan Note that I said “current CI build”. It cannot be fixed for the code already released, but will be fixed in the next release (later this week).

You can test the current 1.2 release candidate by downloading from https://github.com/rancher-sandbox/rancher-desktop/actions/runs/2007360261. Note that these builds are not signed, so you’ll have to remove the quarantine attributes after installation.

To me it doesn’t start even with 775 permissions:

➜  ~ ls -al /private/var/run/rancher-desktop-lima
total 0
dr-xr-xr-x   2 root  daemon    64 Mar 15 16:49 .
drwxrwxr-x  40 root  daemon  1280 Mar 15 16:49 ..

Error is same:

time="2022-03-15T16:49:54+02:00" level=fatal msg="\"/private/var/run/rancher-desktop-lima\" doesn't seem to be writable by the daemon (gid:1) group"

Tried reinstalling rancher desktop both via brew and manually but it still fails with same error

Looks like the permissions applied to wrong directory, try again - should look like this instead:

total 32
drwxrwxr-x   8 root    daemon     256 Mar 18 08:35 .
drwxrwxr-x  39 root    daemon    1248 Mar 18 13:26 ..

With #1758 we should no longer use that directory (just /private/var/run directly), so that should no longer be an issue in the next release (but it hasn’t shipped yet).

Note that it’s checking the directory is group-writable, so 0755 wouldn’t work; you’d need 0775 or something along those lines.

To me it doesn’t start even with 775 permissions:

➜  ~ ls -al /private/var/run/rancher-desktop-lima
total 0
dr-xr-xr-x   2 root  daemon    64 Mar 15 16:49 .
drwxrwxr-x  40 root  daemon  1280 Mar 15 16:49 ..

Error is same:

time="2022-03-15T16:49:54+02:00" level=fatal msg="\"/private/var/run/rancher-desktop-lima\" doesn't seem to be writable by the daemon (gid:1) group"

Tried reinstalling rancher desktop both via brew and manually but it still fails with same error

Have you tried these? Screenshot 2023-11-30 at 12 50 58 PM Screenshot 2023-11-30 at 12 51 11 PM

@AdnanHodzic Your issue is a duplicate of #1615 and not of this one.

This issue: "/private/var/run/rancher-desktop-lima" doesn't seem to be writable by the daemon (gid:1) group

Your error: sudo: a password is required.

Running either sudo mkdir -m 775 /private/var/run/rancher-desktop-lima and/or sudo chmod 775 /private/var/run/rancher-desktop-lima does not fix the issue for me on MacOS 12.3 (Intel).

The permissions on the /private/var/run/rancher-desktop-lima directory were reset to 555.

dr-xr-xr-x  2 root  daemon   64 15 mrt 13:34 /private/var/run/rancher-desktop-lima

Workaround is resetting it to 775.

@alexdepalex Thanks that works.