Docker container with status "Dead" after consul healthcheck runs -
i using consul's healthcheck feature, , keep getting these these "dead" containers:
container id image command created status ports names 20fd397ba638 progrium/consul:latest "\"/bin/bash -c 'cur 15 minutes ago dead what "dead" container? when stopped container become "dead"?
for record, run progrium/consul + gliderlabs/registrator images + service_xxxx_check env variables health checking. runs healthcheck script running image every x secs, docker run --rm my/img healthcheck.sh
i'm interested in general "dead" means , how prevent happening. peculiar thing dead containers have no name.
this info container inspection:
"state": { "dead": true, "error": "", "exitcode": 1, "finishedat": "2015-05-30t19:00:01.814291614z", "oomkilled": false, "paused": false, "pid": 0, "restarting": false, "running": false, "startedat": "2015-05-30t18:59:51.739464262z" }, the strange thing every , container becomes dead , isn't removed.
thank you
edit: looking @ logs, found makes container stop fail:
handler delete /containers/{name:.*} returned error: cannot destroy container 003876e41429013e46187ebcf6acce1486bc5011435c610bd163b159ba550fbc: driver aufs failed remove root filesystem 003876e41429013e46187ebcf6acce1486bc5011435c610bd163b159ba550fbc: rename /var/lib/docker/aufs/diff/003876e41429013e46187ebcf6acce1486bc5011435c610bd163b159ba550fbc /var/lib/docker/aufs/ diff/003876e41429013e46187ebcf6acce1486bc5011435c610bd163b159ba550fbc-removing: device or resource busy why happen?
edit2: found this: https://github.com/docker/docker/issues/9665
update march 2016: issue 9665 has been closed pr 21107 (for docker 1.11 possibly)
should avoid "driver aufs failed remove root filesystem", "device or resource busy" problem.
original answer may 2015
dead 1 if container states, tested container.start()
if container.removalinprogress || container.dead { return fmt.errorf("container marked removal , cannot started.") } it set dead when stopping fails, in order prevent container restarting.
amongst possible cause of failure, see container.kill().
means kill -15 , kill -9 both failing.
// 1. send sigterm if err := container.killpossiblydeadprocess(15); err != nil { logrus.infof("failed send sigterm process, force killing") if err := container.killpossiblydeadprocess(9); err != nil { that mean, op mention, busy device or resource, preventing process killed.
Comments
Post a Comment