docker不稳定 short running containers with -rm failed to destroy

正常运行以下命令

sudo docker run --rm busybox echo helloworld

/var/log/upstart/docker.log 日志如下:

2014/08/07 00:12:02 POST /v1.13/containers/create
[339dd1d9] +job create()
[339dd1d9] -job create() = OK (0)
2014/08/07 00:12:02 POST /v1.13/containers/5abf93d6f3f8fc6166f12fb0682d3f4d8a056cb7a07b9ef52f109525137192c0/attach?stderr=1&stdout=1&stream=1
[339dd1d9] +job container_inspect(5abf93d6f3f8fc6166f12fb0682d3f4d8a056cb7a07b9ef52f109525137192c0)
[339dd1d9] -job container_inspect(5abf93d6f3f8fc6166f12fb0682d3f4d8a056cb7a07b9ef52f109525137192c0) = OK (0)
[339dd1d9] +job attach(5abf93d6f3f8fc6166f12fb0682d3f4d8a056cb7a07b9ef52f109525137192c0)
2014/08/07 00:12:02 POST /v1.13/containers/5abf93d6f3f8fc6166f12fb0682d3f4d8a056cb7a07b9ef52f109525137192c0/start
[339dd1d9] +job start(5abf93d6f3f8fc6166f12fb0682d3f4d8a056cb7a07b9ef52f109525137192c0)
[339dd1d9] +job allocate_interface(5abf93d6f3f8fc6166f12fb0682d3f4d8a056cb7a07b9ef52f109525137192c0)
[339dd1d9] -job allocate_interface(5abf93d6f3f8fc6166f12fb0682d3f4d8a056cb7a07b9ef52f109525137192c0) = OK (0)
[339dd1d9] -job start(5abf93d6f3f8fc6166f12fb0682d3f4d8a056cb7a07b9ef52f109525137192c0) = OK (0)
[339dd1d9] +job release_interface(5abf93d6f3f8fc6166f12fb0682d3f4d8a056cb7a07b9ef52f109525137192c0)
[339dd1d9] -job release_interface(5abf93d6f3f8fc6166f12fb0682d3f4d8a056cb7a07b9ef52f109525137192c0) = OK (0)
[339dd1d9] -job attach(5abf93d6f3f8fc6166f12fb0682d3f4d8a056cb7a07b9ef52f109525137192c0) = OK (0)
2014/08/07 00:12:03 POST /v1.13/containers/5abf93d6f3f8fc6166f12fb0682d3f4d8a056cb7a07b9ef52f109525137192c0/wait
[339dd1d9] +job wait(5abf93d6f3f8fc6166f12fb0682d3f4d8a056cb7a07b9ef52f109525137192c0)
[339dd1d9] -job wait(5abf93d6f3f8fc6166f12fb0682d3f4d8a056cb7a07b9ef52f109525137192c0) = OK (0)
2014/08/07 00:12:03 GET /v1.13/containers/5abf93d6f3f8fc6166f12fb0682d3f4d8a056cb7a07b9ef52f109525137192c0/json
[339dd1d9] +job container_inspect(5abf93d6f3f8fc6166f12fb0682d3f4d8a056cb7a07b9ef52f109525137192c0)
[339dd1d9] -job container_inspect(5abf93d6f3f8fc6166f12fb0682d3f4d8a056cb7a07b9ef52f109525137192c0) = OK (0)
2014/08/07 00:12:03 DELETE /v1.13/containers/5abf93d6f3f8fc6166f12fb0682d3f4d8a056cb7a07b9ef52f109525137192c0?v=1
[339dd1d9] +job container_delete(5abf93d6f3f8fc6166f12fb0682d3f4d8a056cb7a07b9ef52f109525137192c0)
[339dd1d9] -job container_delete(5abf93d6f3f8fc6166f12fb0682d3f4d8a056cb7a07b9ef52f109525137192c0) = OK (0)

我把这个写入crontab中,每分钟执行一次,有几率出现如下错误(如果更加频繁执行docker run那出现错误的几率更大,目前一分钟一次的出错概率大概是2天一个error)

Error response from daemon: Cannot destroy container b12b979ec303276ad8c7fedcdf687c7c3760c822297fb3b7f39f52954b90057e: Driver aufs failed to remove root filesystem b12b979ec303276ad8c7fedcdf687c7c3760c822297fb3b7f39f52954b90057e: rename /var/lib/docker/aufs/mnt/b12b979ec303276ad8c7fedcdf687c7c3760c822297fb3b7f39f52954b90057e /var/lib/docker/aufs/mnt/b12b979ec303276ad8c7fedcdf687c7c3760c822297fb3b7f39f52954b90057e-removing: device or resource busy
Error response from daemon: Cannot destroy container b103443f2f2d74862e4aa37132043b9ca4aa1ade7bbac37a514c051f859d0473: Unable to remove filesystem for b103443f2f2d74862e4aa37132043b9ca4aa1ade7bbac37a514c051f859d0473: remove /var/lib/docker/containers/b103443f2f2d74862e4aa37132043b9ca4aa1ade7bbac37a514c051f859d0473: directory not empty

原因:基本还是docker不稳定造成的,并行快速的运行container的时候,有几率出现如如上错误

与之有关的issue如下:

https://github.com/docker/docker/issues/4095

https://github.com/docker/docker/issues/3968

https://github.com/docker/docker/issues/3823

我机器的信息如下:

[email protected]:~# docker info
Containers: 4
Images: 12
Storage Driver: aufs
 Root Dir: /var/lib/docker/aufs
 Dirs: 20
Execution Driver: native-0.2
Kernel Version: 3.8.0-44-generic
WARNING: No swap limit support
[email protected]:~# docker version
Client version: 1.1.2
Client API version: 1.13
Go version (client): go1.2.1
Git commit (client): d84a070
Server version: 1.1.2
Server API version: 1.13
Go version (server): go1.2.1
Git commit (server): d84a070

[email protected]:~# uname -a
Linux localhost 3.8.0-44-generic #66~precise1-Ubuntu SMP Tue Jul 15 04:01:04 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
 

如果哪位发现docker解决了这个issue了,请帖出docker version和机器信息,多谢~

docker不稳定 short running containers with -rm failed to destroy

时间: 2024-10-31 12:29:11

docker不稳定 short running containers with -rm failed to destroy的相关文章

Docker:Up & Running(读书笔记,前半部分)

Docker:Up & Running C/S Model + Registry 3大组件:Compose(Fig),Machine,Swarm bridge("docker0")<-->private subnets(可用--net关闭,直接使用host地址) "无状态架构":不应把数据库引擎潜到docker容器? vs '有状态应用' 无状态应用:依赖都可以通过环境变量传递(可能需要对现有App的代码改造) lightweight:1.4.1

输入docker ps 报错信息处理Get http:///var/run/docker.sock/v1.19/containers/json: dial unix /var/run/docker.sock: permission denied.

完整错误信息 Get http:///var/run/docker.sock/v1.19/containers/json: dial unix /var/run/docker.sock: permission denied. Are you trying to connect to a TLS-enabled daemon without TLS? 原因: 1.未使用root用户进行操作 2.未让docker以daemon方式运行/bin/bash 解决方案: 1.没有使用root 在控制台上切

./verify_generator 报错running the product executables...Failed

输入命令./verify_generator后提示如下 ===================================================               HP      Vuser Environment Verification Utility =================================================== Product: HP LoadRunner 11.0 Version: 11.0.0.8866 Build: 8

docker起不来报错:Failed to start Docker Application Container Engine.

报错信息如下: [[email protected] localdisk]# systemctl restart docker Job for docker.service failed because the control process exited with error code. See "systemctl status docker.service" and "journalctl -xe" for details. [[email protected

严重: Failed to destroy end point associated with ProtocolHandler [&quot;http-nio-8080&quot;] java.lang.NullPointer

刚接触servlet类,按照课本的方法使用eclipse新建了一个servlet类. 新建完成后,在web.xml里面进行注册 这时候就会报错了. 五月 07, 2016 11:23:28 上午 org.apache.coyote.AbstractProtocol pause信息: Pausing ProtocolHandler ["http-nio-8080"]五月 07, 2016 11:23:28 上午 org.apache.coyote.AbstractProtocol pau

docker offical docs:Working with Containers

enough ---------------------------------------------------------------------------------- Working with Containers - In the last section of the Docker User Guide we launched our first containers. We launched two containers using the docker run command

Working with Containers

回顾之前学习过的一些命令 docker run -i...交互式运行 docker run -d...background运行`daemon`守护进程 docker ps...Lists containers.(容器列表) docker logs...Shows us the standard output of a container.(显示容器的标准输出) docker stop...Stops running containers. docker命令格式: [sudo] docker [c

阿里云部署Docker(4)----容器的使用

通过上一节的学习,我们知道如何运行docker容器,我们运行了一个普通的,一个后台的,我们还学习了几个指令: docker ps - Lists containers. docker logs - Shows us the standard output of a container. docker stop - Stops running containers. 我们还可以查看下docker的版本: [email protected]:~# docker version Client vers

Learning docker--Chapter2--Handling Docker Containers

Content: (1)    Clarifying the Docker terms (2)    Working with the Docker images and containers (3)    The Docker Hub Registry (4)    Searching the Docker images (5)    Working with an interactive container (6)    Tracking the changes inside the con