When I run "docker run -it python:3" in a Ubuntu 18.04.1 LTS server, I got the following error. What does this mean and how do I fix this?
docker: Error response from daemon: OCI runtime create failed: container_linux.go:348: starting container process caused "process_linux.go:402: container init caused \"process_linux.go:385: running prestart hook 0 caused \\\"fork/exec /usr/bin/dockerd (deleted): no such file or directory\\\"\"": unknown.
Restart docker service.
I was also facing same issue. Solve it by restarting docker service:
sudo systemctl restart docker
Same described here,
https://github.com/moby/moby/issues/29640#issuecomment-273617532
For those of you who might have installed using snap, this will restart all docker services:
sudo snap restart docker
Or, for just the daemon, use:
sudo snap restart docker.dockerd
Related
The ssh disconnected when i using a container, and then i find all containers were dead.
I want to restart my container by
docker restart mysql2
but fail with error
Error response from daemon: OCI runtime create failed: container_linux.go:345: starting container process caused "process_linux.go:430: container init caused "process_linux.go:396: setting cgroup config for procHooks process caused \"failed to write max to pids.max: write /sys/fs/cgroup/pids/docker/3e8d10946219b7ba3a2259f8f21222c978dc51fade62fd882f02d191e24c8cb5/pids.max: invalid argument\""": unknown Error: failed to start containers: mysql2
Then i tried to restart docker and restart linux, both not work.
Is there any way to troubleshoot the problem?
i resolved this problem, the step:
docker update --pids-limit 40000 mysql2
docker restart mysql2
by reset the pids limit of docker, i can restart my container now.
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?
To check the issue by run docker in the debug mode.
stop docker with systemctl stop docker
run docker in debug mode dockerd --debug
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
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.
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.
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.
My machine that boots on a ramdisk cannot start a docker container.
For example, running hello-world results in
$ docker run hello-world
docker: Error response from daemon: OCI runtime create failed: container_linux.go:345: starting container process caused "process_linux.go:430: container init caused \"rootfs_linux.go:109: jailing process inside rootfs caused \\\"pivot_root invalid argument\\\"\"": unknown.
ERRO[0000] error waiting for container: context canceled
Unfortunately, the DOCKER_RAMDISK=true variable does not seem to have an effect. I set it before restarting the docker service with systemctl restart docker but with no effect.
(I'm on Debian Buster)
If the setting applies to dockerd, then try configuring this in systemd (should just be able to copy/paste the following into a root shell):
mkdir -p /etc/systemd/system/docker.service.d
cat >/etc/systemd/system/docker.service.d/10-ramdisk.conf <<EOF
[Service]
Environment=DOCKER_RAMDISK=true
EOF
systemctl daemon-reload
systemctl restart docker
I am using docker version Docker version 18.09.0, build 4d60db4 in a Ubuntu 16.04 system. I am unable to stop a docker container. My docker image contains a spring boot application. I am using the following command to stop the container:
sudo docker stop 0c6b70fcb25e
And I am getting the following error:
Error response from daemon: cannot stop container: 0c6b70fcb25e:
Cannot kill container 0c6b70fcb25e0b0c55f123853654cd2611e3702fdf5622bd07e12a92efa3df46:
unknown error after kill: runc did not terminate sucessfully:
container_linux.go:393: signaling init process caused "permission denied": unknown
I have tried running docker stop with and without sudo.
Try this:
docker kill --signal=SIGHUP my_container
You can find more information here.
Also, if you are on Linux, AppArmor may prevent stopping the containers. Disable AppArmor temporarily and try to stop the container again. For configuring the AppArmor check this link.
Follow this link. docker on ubuntu 16.04 error when killing container
I used the following commands and it worked.
sudo killall docker-containerd-shim
sudo docker-compose down
I ran a command like this in a docker-in-docker (dind) scenario:
docker daemon --host=unix:///var/run/docker.sock --host=tcp://0.0.0.0:2375 --storage-driver=overlay
And I got this in the logs:
INFO[0000] libcontainerd: new containerd process, pid: 18
FATA[0000] Failed to connect to containerd. Please make sure containerd is installed in your PATH or you have specificed the correct address. Got error: write /proc/18/oom_score_adj: permission denied
Be sure to run the container in privileged mode.
docker run --privileged ...
This should fix the problem; you should now be able to install and run Docker inside this Docker image.