Executing a process in a container fails with error "fork/exec /proc/self/exe: no such file or directory"

Solution Verified - Updated -

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.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content