colima: Containers crash with error EOF
Description
When running multiple containers using colima, sometimes they are terminated suddenly with following EOF errors:
error during connect: Get "http://%2FUsers%2Fuser%2F.colima%2Fdefault%2Fdocker.sock/v1.24/containers/7a/json": EOF
Following is similar errors which also happen before the containers stop suddenly:
Unexpected EOF
The issue happens intermittently, but seems more frequent when running several containers (>10) at the same time.
Version
Colima Version: 0.5.4 Lima Version: 0.15.1 Qemu Version: 8.0.0
Operating System
- macOS Intel <= 12 (Monterrey)
- macOS Intel >= 13 (Ventura)
- macOS M1 <= 12 (Monterrey)
- macOS M1 >= 13 (Ventura)
- Linux
Output of colima status
INFO[0000] colima is running using QEMU
INFO[0000] arch: aarch64
INFO[0000] runtime: docker
INFO[0000] mountType: sshfs
INFO[0000] socket: unix:///Users/user/.colima/default/docker.sock
Reproduction Steps
- Run several docker images as containers
- Wait for few minutes
- Some containers are suddenly stopped with EOF error
Expected behaviour
containers can run as usual and not stopped suddenly
Additional context
No response
About this issue
- Original URL
- State: open
- Created 4 years ago
- Reactions: 3
- Comments: 16 (2 by maintainers)
thanks for the suggestion.
In my case,
sudo chmod 666 /var/run/docker.sockinside the vm (colima ssh) do the trick.Just jumping in here to give this a bump - we had this issue on an M3 machine in our org for a while now, and running this solved it.
Would love to know the root cause of why this is happening, but this helps a lot regardless.
That fixed it for me, also. Did something change requiring that?
I’ve been running into similar issues, just on x86 - I solved it by adding more CPU, memory and disk space for the VM running colima
I tried that chmod trick and it worked for me, but I had to do it on every restart. This did not use to be required. I also wonder what is the context on this issue, requiring that change.
We recently had the class of problem described in the original issue here, where docker would get an EOF from Colima.
It turned out that our code had created dozens of docker api connections and not closed them. Colima has some kind of limit, where it stops responding after that and does not proxy the docker API call inside the VM…
You can see if this is your problem like this: If on the host,
docker ps(or whatever your app is doing) gets and EOF, try it inside the Colima VM. Socolima sshanddocker psin this case. If it works inside the VM, but not outside, you may have this problem.