moby: exec not running
Description
docker exec -i -t <container_id> bash
the above command giving me error that the image has run and stopped, but my image is still running.
Error:
rpc error: code = 13 desc = invalid header field value "oci runtime error: exec failed: cannot exec a container that has run and stopped\n"
I am running the Airflow Image from this place
docker pull puckel/docker-airflow
I ran the Image with below command from simple-docker-ui-app
docker run -i -t -P --name airflow puckel/docker-airflow:latest docker-compose -f docker-compose-LocalExecutor.yml up -d
Steps to reproduce the issue:
- start the docker image
- run below command
docker exec -i -t <container_id> bash
Describe the results you received:
Describe the results you expected:
Additional information you deem important (e.g. issue happens only occasionally):
Output of docker version
:
Client:
Version: 1.12.2
API version: 1.24
Go version: go1.6.3
Git commit: bb80604
Built:
OS/Arch: linux/amd64
Server:
Version: 1.12.2
API version: 1.24
Go version: go1.6.3
Git commit: bb80604
Built:
OS/Arch: linux/amd64
Output of docker info
:
(paste your output here)
Additional environment details (AWS, VirtualBox, physical, etc.):
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Reactions: 7
- Comments: 29 (19 by maintainers)
This still seems to be an issue in 1.12.6.
I get the above on 2 different machines running same version of ubuntu (16.10) and same version of docker. Also same behavior regardless of container (i.e. happens for all containers running on the machines).
Fixed by https://github.com/docker/docker/pull/27610
Ok so https://github.com/opencontainers/runc/pull/1136 does fix this issue. The regression is that we call
container.Status()
on exec, state, etc in runc with the vendored version that was included in 1.12.2.The problem is that the parsing logic did not account for the space inside the
()
. The bug was not a regression but a long standing issue that was always there just uncovered by the fact that when we try to exec, we check that status, which in turn, reads the process start time to verify we are interacting with the process that we thought we were. This failed parsing so runc thinks that this is not the same process and the container was stopped. @yongtang 's pr fixes this and I verified the fix with docker.Can anyone summarize the final solution for this issue? I tried following the entire conversation but couldn’t resolve my issue.
@DEVELByte reverting to 1.12.1 fixes the issue for me, you might want to do that until we release a fix.
I can confirm having the same problem after having upgraded to 1.12