Run the following command
Sudo docker run -- RM busybox echo helloworld
The/var/log/upstart/docker. log is as follows:
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)
I write this to crontab and execute it once every minute. the following error may occur (if docker run is executed more frequently, the error may be more likely, at present, the probability of one error every minute is about two days)
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
Cause: It is basically caused by docker instability. when running the container in parallel quickly, there is a probability that the preceding error may occur.
The related issue is as follows:
Https://github.com/docker/docker/issues/4095
Https://github.com/docker/docker/issues/3968
Https://github.com/docker/docker/issues/3823
My machine information is as follows:
[email protected]:~# docker infoContainers: 4Images: 12Storage Driver: aufs Root Dir: /var/lib/docker/aufs Dirs: 20Execution Driver: native-0.2Kernel Version: 3.8.0-44-genericWARNING: No swap limit support[email protected]:~# docker versionClient version: 1.1.2Client API version: 1.13Go version (client): go1.2.1Git commit (client): d84a070Server version: 1.1.2Server API version: 1.13Go version (server): go1.2.1Git 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
If someone finds that docker has solved this issue, please post the docker version and machine information. Thank you ~