rancher-desktop: "Starting virtual machine" step fails due to SSH socket path being too long.

Rancher Desktop shows the “Starting virtual machine” until timeout.

~/Library/Application\ Support/rancher-desktop/lima/0/ha.stderr.log contains the following lines:

{"level":"debug","msg":"stdout=\"\", stderr=\"unix_listener: path \\\"/Users/od.andreas.zitzelsberger/Library/Application Support/rancher-desktop/lima/0/ssh.sock.Rcl2KoI2X03Sbknt\\\" too long for Unix domain socket\\r\\n\", err=failed to execute script \"ssh\": stdout=\"\", stderr=\"unix_listener: path \\\"/Users/XXXXXXXXXXXXXXXXXXXXXXXX/Library/Application Support/rancher-desktop/lima/0/ssh.sock.Rcl2KoI2X03Sbknt\\\" too long for Unix domain socket\\r\\n\": exit status 255","time":"2021-10-14T15:28:04+02:00"}

with XXXXXXXXXXXXXXXXXXXXXXXX being my user name. Please note that the path /Users/XXXXXXXXXXXXXXXXXXXXXXXX/Library/Application Support/rancher-desktop/lima/0/ssh.sock.Rcl2KoI2X03Sbknt has 109 characters. The path length for Unix Domain Sockets is limited to 108 characters (Linux) or 104 characters (Mac). Unfortunately, my user name is managed and cannot be changed. While the user name is long, I believe it’s length is not uncommon.

To Reproduce

  • Start Rancher Desktop on a Mac with a user name that has 21 characters or more.

Result Rancher Desktop shows the “Starting virtual machine” until timeout.

Expected behaviour Rancher Desktop starts up properly.

Screenshots grafik

Setup (please complete the following information):

  • macOS 11.6
  • Rancher Desktop 0.6.0
  • Kubernetes 1.21.5

About this issue

  • Original URL
  • State: open
  • Created 3 years ago
  • Comments: 23 (6 by maintainers)

Commits related to this issue

Most upvoted comments

It should be possible to work around it now, even though it is not automatic.

I’ve just moved the lima home directory to ~/.rdlima:

$ mv ~/Library/Application\ Support/rancher-desktop/lima ~/.rdlima
$ ln -s ~/.rdlima ~/Library/Application\ Support/rancher-desktop/lima

Please try that and let me know if it fixes the issue for you!

Please keep the bug open though, because I think RD should do something like this automatically, but I don’t know when we will get around to it.

It should be possible to work around it now, even though it is not automatic.

I’ve just moved the lima home directory to ~/.rdlima:

$ mv ~/Library/Application\ Support/rancher-desktop/lima ~/.rdlima
$ ln -s ~/.rdlima ~/Library/Application\ Support/rancher-desktop/lima

Please try that and let me know if it fixes the issue for you!

Please keep the bug open though, because I think RD should do something like this automatically, but I don’t know when we will get around to it.

This still works as of Feb 7, 2023.

Still occurs on 1.10.0.

Hi, Reset kubernetes button inside the Troubleshooting section worked for me (mac m1)

@anthonyrea I just heard from somebody last week that it still works. What is the error you are seeing? If you still get the same message as before, then you haven’t created the symlink correctly.

@jandubois’s workaround did not work today for version 1.8.1 on MacOS M1.

instance name \\"0\\" too long: "/Users/xxxxxxxxxxxx.xxxxxxxxxxxx/Library/Application Support/rancher-desktop/lima/0/ssh.sock.1234567890123456" must be less than UNIX_PATH_MAX=104 characters, but is 109

Any workarounds for this issue that still work in the newest version?

I can confirm that the work around works for me. Thanks!