Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

docker: Error response from daemon: OCI runtime create failed: unable to retrieve OCI runtime error

my docker starts giving error after a recent update. Existing containers works but I can not build or run any image.

A simple

docker run hello-world

gives me an error:

docker: Error response from daemon: OCI runtime create failed: unable to retrieve OCI runtime error (open /run/containerd/io.containerd.runtime.v1.linux/moby/881b53be5cfe91d19577414c2f4a52dd06804624fe1d2189d06c1c3c13f2b4d1/log.json: no such file or directory): runc did not terminate successfully: unknown.

I tried all the tips that are suggested on the internet regarding this issue as restarting, building links, reinstall.....

My current docker version is 18.09.5, Ubuntu 19.04

Does anyone had a similar issue and solved it?

like image 486
amina mollaysa Avatar asked Dec 31 '19 12:12

amina mollaysa


3 Answers

To check the issue by run docker in the debug mode.

  1. stop docker with systemctl stop docker
  2. run docker in debug mode dockerd --debug
  3. start container with docker start container_name

Then check the output in docker debug console in 2.

In my case, it shows

ERRO[2020-07-07T23:15:02Z] stream copy error: reading from a closed fifo
ERRO[2020-07-07T23:15:02Z] stream copy error: reading from a closed fifo

And solve it by removing the container state folder with rm -rf /var/run/docker/runtime-runc/moby/docker_id

Then start your container.

Refer to: Solving Error response from daemon OCI runtime create failed container with id exists

like image 88
LF00 Avatar answered Oct 12 '22 20:10

LF00


Check the output of docker version and see if the client version and daemon version have gone out of sync.

Check the output of following commands which runc and which docker-runc. If the docker daemon version is 18.09, you should be having runc or else docker-runc.

like image 2
Shashank V Avatar answered Oct 12 '22 18:10

Shashank V


I use debian 11 with docker 20.10.5, When I run docker run hello-world I got:

docker: Error response from daemon: OCI runtime create failed: unable to retrieve OCI runtime error (open /run/containerd/io.containerd.runtime.v2.task/moby/2957ad06a6bc7a4f7c7f3fca6b43bde1d6b27600df774f0e8052f4c736300759/log.json: no such file or directory): runc did not terminate successfully: exit status 139: unknown. ERRO[0010] error waiting for container: context canceled

when I run runc command , I got "segmentation fault".

I solved it by apt reinstall runc.

like image 1
zhouruixi Avatar answered Oct 12 '22 20:10

zhouruixi