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

4

15

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?

Geranial answered 31/12, 2019 at 12:22 Comment(0)
A
5

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

Architect answered 7/7, 2020 at 7:16 Comment(0)
S
2

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.

Sendai answered 31/12, 2019 at 12:36 Comment(2)
Could you explain what > "client version and daemon version have gone out of sync" means ?Hubblebubble
When you run docker version command, it will print out two sections. One for "client" and one of "engine". Check the version field in both the sections and make sure they are same or compatible.Sendai
T
1

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.

Tripetalous answered 15/8, 2021 at 15:42 Comment(0)
S
0

I was trying to run docker as docker run ... my_external_script.py. Because my_external_script.py wasn't w/in the docker image I was getting the error. What I did was to set the scripts argument w/in my setup.py as scripts=["path/to/my_external_script.py"] and rebuild docker image. That solved the problem.

Shouldst answered 26/1, 2022 at 16:21 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.