rancher-desktop: Rancher Desktop 1.8.1 darwin(x64) fails to startup on Apple Silicon M2 Max

Actual Behavior

The following error in lima.log presents itself when Rancher Desktop is getting initialized.

2023-06-03T10:43:18.577Z: Lima: executing: sudo rm -f /tmp/rd-nerdctl-EfiRzz.nerdctl: Error: spawn /Applications/Rancher Desktop.app/Contents/Resources/resources/darwin/lima/bin/limactl.ventura EACCES
2023-06-03T10:43:18.577Z: Error trying to start/update containerd: Error: spawn /Applications/Rancher Desktop.app/Contents/Resources/resources/darwin/lima/bin/limactl.ventura EACCES:  Error: spawn /Applications/Rancher Desktop.app/Contents/Resources/resources/darwin/lima/bin/limactl.ventura EACCES
    at ChildProcess._handle.onexit (node:internal/child_process:283:19)
    at onErrorNT (node:internal/child_process:478:16)
    at process.processTicksAndRejections (node:internal/process/task_queues:83:21) {
  errno: -13,
  code: 'EACCES',
  syscall: 'spawn /Applications/Rancher Desktop.app/Contents/Resources/resources/darwin/lima/bin/limactl.ventura',
  path: '/Applications/Rancher Desktop.app/Contents/Resources/resources/darwin/lima/bin/limactl.ventura',
  spawnargs: [
    '--debug',
    'shell',
    '--workdir=.',
    '0',
    'sudo',
    'rm',
    '-f',
    '/tmp/rd-nerdctl-EfiRzz.nerdctl'
  ]
}
image

Steps to Reproduce

Install Rancher Desktop on M2 machine first time

Result

image

Expected Behavior

Rancher Desktop should be able to setup correctly

Additional Information

No response

Rancher Desktop Version

1.8.1

Rancher Desktop K8s Version

1.27.1

Which container engine are you using?

moby (docker cli)

What operating system are you using?

macOS

Operating System / Build Version

macOS Ventura 13.4

What CPU architecture are you using?

arm64 (Apple Silicon)

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

None

Windows User Only

No response

About this issue

  • Original URL
  • State: open
  • Created 3 years ago
  • Comments: 33 (11 by maintainers)

Most upvoted comments

Hi all, this might help people experiencing this issue when Rancher tries to update certificates.

Error:
/Applications/Rancher Desktop.app/Contents/Resources/resources/darwin/lima/bin/limactl.ventura shell --workdir=. 0 sudo update-ca-certificates

Details:
'WARNING: Skipping duplicate certificate ...
  code: 1,
  [Symbol(child-process.command)]: '/Applications/Rancher Desktop.app/Contents/Resources/resources/darwin/lima/bin/limactl.ventura shell --workdir=. 0 sudo update-ca-certificates'
}

This is how I solved it after debugging for some time, as I wanted to avoid reinstalling everything in the cluster at any cost due to time.

update-ca-certificates simply runs /usr/bin/c_rehash /etc/ssl/certs

  1. Attach to the Rancher shell in a terminal rdctl shell
  2. Run the following command to update certs manually and avoid issues sudo /usr/bin/c_rehash -old /etc/ssl/certs

After restarting Rancher, my cluster started to work again. I could see that c_rehash has some problems with mkcerts while trying to update them, but I was lucky, and using the old flag could deal with them. The way I knew mkcerts where the ones giving problems was by isolating them, you can run this script to check it:

#!/bin/sh

# Remember to run mkdir first
BACKUP_DIR="/etc/ssl/certs/backup_all"
CERT_DIR="/etc/ssl/certs"

rehash_and_check() {
    sudo /usr/bin/c_rehash "$CERT_DIR"
    if [ $? -ne 0 ]; then
        echo "Issue detected after moving $1 back. Moving it back to backup."
        sudo mv "$CERT_DIR/$1" "$BACKUP_DIR/"
    fi
}

for cert in $(ls "$BACKUP_DIR"); do
    echo "Moving $cert back to certs directory"
    sudo mv "$BACKUP_DIR/$cert" "$CERT_DIR/"
    rehash_and_check "$cert"
done

sudo /usr/bin/c_rehash "$CERT_DIR"

Thanks, @Nachox07. This approach works fine for me!

I can confirm this issue on an M1 Mac running 1.10.1.