Executing a process in a container fails with error "fork/exec /proc/self/exe: no such file or directory"
Issue
- Trying to execute a new process inside a running container fails with this error:
# docker exec -ti test /bin/bash
rpc error: code = 2 desc = oci runtime error: exec failed: container_linux.go:247: starting container process caused "process_linux.go:75: starting setns process caused \"fork/exec /proc/self/exe: no such file or directory\""
-
This usually happens after the container has been restarted with
docker restart -
For this issue to be triggered, the affected container had to be still running when the docker daemon was stopped the last time. This is usually the result of a unorderly shutdown or, in some corner cases, of the docker daemon being killed by systemd because it was taking too long to stop all running containers.
Environment
- Red Hat Enterprise Linux 7.x
- docker-1.13.1
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.