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

Containers crash with error EOF #710

Open
1 of 5 tasks
edwinwijaya94 opened this issue May 11, 2023 · 10 comments
Open
1 of 5 tasks

Containers crash with error EOF #710

edwinwijaya94 opened this issue May 11, 2023 · 10 comments

Comments

@edwinwijaya94
Copy link

Description

When running multiple containers using colima, sometimes they are terminated suddenly with following EOF errors:

error during connect: Get "http:https://%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:https:///Users/user/.colima/default/docker.sock

Reproduction Steps

  1. Run several docker images as containers
  2. Wait for few minutes
  3. Some containers are suddenly stopped with EOF error

Expected behaviour

containers can run as usual and not stopped suddenly

Additional context

No response

@MadsRC
Copy link

MadsRC commented Jun 3, 2023

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

@yihuang
Copy link

yihuang commented Feb 22, 2024

I have the same issue, the container don't crash, just docker docker can't connect, colima ssh.

$ docker --version
Docker version 24.0.5, build v24.0.5
$ colima --version
colima version 0.6.8
$ colima status
INFO[0000] colima is running using macOS Virtualization.Framework
INFO[0000] arch: aarch64
INFO[0000] runtime: docker
INFO[0000] mountType: virtiofs
INFO[0000] socket: unix:https:///Users/user/.colima/default/docker.sock

@rfay
Copy link
Contributor

rfay commented Feb 22, 2024

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. So colima ssh and docker ps in this case. If it works inside the VM, but not outside, you may have this problem.

@yihuang
Copy link

yihuang commented Feb 22, 2024

try it inside the Colima VM

thanks for the suggestion.

In my case, sudo chmod 666 /var/run/docker.sock inside the vm (colima ssh) do the trick.

@shinzui
Copy link

shinzui commented Mar 5, 2024

In my case, sudo chmod 666 /var/run/docker.sock inside the vm (colima ssh) do the trick.

That fixed it for me, also. Did something change requiring that?

@jakekreider
Copy link

In my case, sudo chmod 666 /var/run/docker.sock inside the vm (colima ssh) do the trick.

That fixed it for me, also. Did something change requiring that?

Same here, used Colima for a while now but never had this issue before today.

@takirala
Copy link

In my case, sudo chmod 666 /var/run/docker.sock inside the vm (colima ssh) do the trick.

That fixed it for me, also. Did something change requiring that?

Same here, used Colima for a while now but never had this issue before today.

Same here as well, colima hung after upgrade and chmod fixed for me.

@rhysjohns
Copy link

In my case, sudo chmod 666 /var/run/docker.sock inside 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.

@Olnexia
Copy link

Olnexia commented Jun 26, 2024

try it inside the Colima VM

thanks for the suggestion.

In my case, sudo chmod 666 /var/run/docker.sock inside the vm (colima ssh) do the trick.

That did not work for me running on M3. I wonder what was the background behind this solution.

@pecigonzalo
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants