Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kubernetes Fails to Start: UNIX Socket Path Exceeds Limit Due to Long Home Directory Name #8212

Open
Quevin opened this issue Feb 8, 2025 · 0 comments
Labels
kind/bug Something isn't working

Comments

@Quevin
Copy link

Quevin commented Feb 8, 2025

Actual Behavior

When starting Kubernetes on Rancher Desktop, Kubernetes fails to start because Lima (the underlying VM manager) is generating a UNIX socket file with a path that exceeds the maximum allowed length. This occurs because my home directory name (which includes my full email address, e.g., “kevin.#######@#############.com”) results in a path longer than UNIX_PATH_MAX (104 characters).

Steps to Reproduce

  1. On macOS, use a user account with a home directory named with a long string (e.g., “kevin.#######@#############.com”).
  2. Install and launch Rancher Desktop.
  3. Attempt to start Kubernetes.
  4. Observe the error generated by Lima regarding the socket path length.

Result

Kubernetes fails to start with the following error:

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

Last command run:
  /Applications/Rancher Desktop.app/Contents/Resources/resources/darwin/lima/bin/limactl start --tty=false "/Users/kevin.#######@#############.com/Library/Application Support/rancher-desktop/lima/_config/0.yaml"

Log snippet:
"time=\"2025-02-07T21:45:20-08:00\" level=fatal msg=\"instance name \\\"0\\\" too long: \\\"/Users/kevin.#######@#############.com/Library/Application Support/rancher-desktop/lima/0/ssh.sock.1234567890123456\\\" must be less than UNIX_PATH_MAX=104 characters, but is 115\""

Expected Behavior

Kubernetes should start without error. Ideally, Rancher Desktop (or Lima) should either gracefully handle long home directory names—by truncating or reformatting the instance name/sock path—or offer a configuration option to override the default path, ensuring that the generated UNIX socket path does not exceed 104 characters.

Additional Information

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

Last command run:
/Applications/Rancher Desktop.app/Contents/Resources/resources/darwin/lima/bin/limactl start --tty=false /Users/kevin.#######@#############.com/Library/Application Support/rancher-desktop/lima/_config/0.yaml

    '--tty=false',
    '/Users/kevin.#######@#############.com/Library/Application Support/rancher-desktop/lima/_config/0.yaml'
  ],
  stdout: '',
  stderr: 'time="2025-02-07T23:01:23-08:00" level=info msg="Terminal is not available, proceeding without opening an editor"\n' +
    'time="2025-02-07T23:01:23-08:00" level=fatal msg="instance name \\"0\\" too long: \\"/Users/kevin.#######@#############.com/Library/Application Support/rancher-desktop/lima/0/ssh.sock.1234567890123456\\" must be less than UNIX_PATH_MAX=104 characters, but is 115"\n',
  code: 1,
  [Symbol(child-process.command)]: '/Applications/Rancher Desktop.app/Contents/Resources/resources/darwin/lima/bin/limactl start --tty=false /Users/kevin.#######@#############.com/Library/Application Support/rancher-desktop/lima/_config/0.yaml'
}

Attempts to Work Around:

  • I attempted to change the configuration directory by setting the LIMA_HOME environment variable (e.g., to /Users/Shared/rd-rd/lima) and using symlinks.
  • I also tried manually controlling Lima with limactl commands, but no instance was found in the new location.

Notes:
This issue appears to be triggered solely by the length of the home directory path due to the email address in the username.
Attaching any additional logs or screenshots (if available) might help diagnose the problem further.

Rancher Desktop Version

1.17.1

Rancher Desktop K8s Version

1.31.4

Which container engine are you using?

moby (docker cli)

What operating system are you using?

macOS

Operating System / Build Version

15.3

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

@Quevin Quevin added the kind/bug Something isn't working label Feb 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant