rancher-desktop: Rancher Desktop Intermittently Hangs on Ventura 13.1
Actual Behavior
When running a docker command it will hang forever. Any subsequent commands to docker in another shell hang as well. Rebooting the laptop is required as Rancher Desktop becomes unusable.
Steps to Reproduce
One dev on a M1 Mac, running Ventura 13.1 can reproduce this issue consistently by building a Dockerfile in docker. We however are unable to reproduce the same issue on our laptops consistently. One of our team members reproducing it is using a M1 Mac as well.
Create a Dockerfile
echo -e 'FROM alpine:latest\nRUN echo 'hey' > hey.txt' > Dockerfile
Build Dockerfile in docker
docker run --rm --interactive --pull="always" --user="root" --network="host" --name="repro-hanging-issue" --mount "type=bind,source=/var/run/docker.sock,target=/var/run/docker.sock" -v "$(pwd):$(pwd)" -w "$(pwd)" docker:cli build .
Result
The terminal just hangs.
Expected Behavior
Docker commands not to hang.
Additional Information
We have had our developers start using Rancher Desktop in November 2022. It was working good, no hanging issues reported. Once people started updating to Ventura at the beginning of the month (January) they started reporting these issues. We have one developer who is able to consistently reproduce the issue, some of us can only reproduce it intermittently. Seems to be most reproducible on M1 Mac though. We were also able to reproduce it with our security tools disabled.
We enabled debug logging from the Rancher Desktop Troubleshooting page and looked at all the logs, lima and rancher and did not see any glaring errors or warnings.
If there is anything else we can provide to help this let me know.
Rancher Desktop Version
1.7.0
Rancher Desktop K8s Version
Disabled
Which container engine are you using?
moby (docker cli)
What operating system are you using?
macOS
Operating System / Build Version
Ventura 13.1
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 4 years ago
- Reactions: 11
- Comments: 51 (6 by maintainers)
I have been experiencing a similar problem on and off for the past month or two. Was originally discussing in the rancher-desktop slack channel, but after finding this issue I believe it’s the same as what I’m experiencing.
I find the bug to be easily reproducible in my case: Rancher Desktop: 1.8.1 macOS: Ventura 13.1 Container runtime: dockerd (moby) [I have not tested recently with containerd/nerdctl - will try this] Rancher kubernetes: disabled (doesn’t matter; I’ve seen this issue with k8s enabled as well)
I get the same behavior as described above, existing containers freeze and virtually all commands hang (
docker ps,docker image ls,rdctl shell, nothing works except simple stuff likedocker version).Here is what I can note about reproducing the problem (at least in my case):
docker run -it) with a few env vars passed in (probably not relevant)About the suggested workaround:
mountType: 9pworkaround - it did successfully prevent the container runtime from hanging; however, it caused my terraform provider to fatally crash (everytime), so this method is unusable for me.The above
Cannot connect to the Docker daemon at unix:///Users/user/.rd/docker.sock. Is the docker daemon running?may be a different issue.This one is about anydockercommand hanging. In my case even the “Quit Rancher Desktop” UI option was unresponsive - it would not quit the rancher desktop, I waited more than 5 minutes.On my side, I’ve not experienced hanging since March (with QEMU), and realized I’m still using rancher desktop 1.12.3, with regularly up to date MacOS Sonoma (now 14.6.1). There were other problems with docker build, like Debian amd64 emulation being being very slow (next build taking 20 minutes compared to less than a minute on native aarch64), which made me eventually increase
Virtual Machine -> Hardware -> Memory (GB)to16.Since then, the hanging has not reappeared yet, and the build takes only a few minutes. I kept other options as before, 4 CPUs,
Volumes -> Mount Type -> reverse-sshfs,Emulation -> Virtual Machine Type -> QEMU, andContainer Engine -> dockerd(moby).VZinSonoma. (forgot to post it 😅 )Rancher 1.12.3, macOs Sonoma 14.3.1 and this is still hanging.
I already tried several configurations such as Emulation VZ enabling Rosetta support and Volume virtiofs, but no luck…
VZworked for me. M1 Sonoma@vaniiiiiiii 's fix worked for me as well.
Same here
Rancher 1.10.0 M1 Ventura 13.5.2
Likewise, Rancher Desktop randomly freezes for me, more often-than-not after I leave it running without use for a while, and most nerdctl nor rdctl commands will respond until I restart the application (tearing down the VM, etc.).
I’m currently on Rancher Desktop 1.9.1 & on macOS Ventura 13.5.1, running on Apple silicon (M2 Pro). I don’t have Kubernetes enabled, and I’m using the containerd runtime, with VZ emulation (Rosetta support enabled) & virtiofs mounting (I did have other types of problems before when using 9p, mostly related to user mappings & permissions, so I’d like to avoid going back to that, and reverse-sshfs was unbearably slow!).
Let me know if you’d like me to gather any information when RD hangs, for debugging purposes. Thanks!
update: upgraded to Ventura 13.2 and don’t have the “freezing” problem anymore without any override…
@lakamsani edit this file and add entry the
mountTypeto top-level~/Library/Application Support/rancher-desktop/lima/_config/override.yamlNote we have been able to avoid this hanging issue by switching to the
9pmount type in Lima. I’m not sure if it completely fixes it or makes it occur less often time will tell by our users. But my suggestion to others affected by this is to try the9pmount. Caveat though the9pmount does not support symlinks in volumes.Hi I 'm able to reproduce this frequently on my M1 running Monterrey 12.6.1/RD 1.7.0/k8s 1.25.4/Traefik disabled. What logs can I provide from
~/Library/Logs/rancher-desktopto help debug this? Currently the RD UI shows Kubernetes is running but kubectl commands timeout withUnable to connect to the server: net/http: TLS handshake timeoutTried quitting Rancher desktop and restarting a couple of times but same problem. I could restart the laptop and the problem might go away. I may need to do that to not be blocked with my work and/or look to minikube (which doesn’t have a nice UI). But happy to provide logs and keep the laptop in this reproducible state for the next 24 hours or so if it helps.