amina mollaysa
amina mollaysa

Reputation: 407

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?

Upvotes: 15

Views: 50854

Answers (4)

vpap
vpap

Reputation: 1547

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.

Upvotes: 0

zhouruixi
zhouruixi

Reputation: 11

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.

Upvotes: 1

LF-DevJourney
LF-DevJourney

Reputation: 28529

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

Upvotes: 5

Shashank V
Shashank V

Reputation: 11193

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.

Upvotes: 2

Related Questions