Docker commands do not respond anymore

后端 未结 4 618
青春惊慌失措
青春惊慌失措 2021-02-13 01:45

Most of docker commands never end. I have to interrupt them manually with CTRL+C. Even simple commands like docker ps or docker info do not respond.

4条回答
  •  执笔经年
    2021-02-13 02:43

    That Docker commands hanging bug happened after I deleted a container.

    The daemon dockerd was in an abnormal state: it couldn't be started (sudo service docker start) after having been stopped (service docker stop).

    # sudo service docker start
    Redirecting to /bin/systemctl start docker.service
    Job for docker.service failed because the control process exited with error code. See "systemctl status docker.service" and "journalctl -xe" for details.
    
    # journalctl -xe
    kernel: device-mapper: ioctl: unable to remove open device docker-253:0-19468577-d6f74dd67f106d6bfa483df4ee534dd9545dc8ca
    ...
    systemd[1]: docker.service: main process exited, code=exited, status=1/FAILURE
    systemd[1]: Failed to start Docker Application Container Engine.
    systemd[1]: Unit docker.service entered failed state.
    systemd[1]: docker.service failed.
    polkitd[896]: Unregistered Authentication Agent for unix-process:22551:34177094 (system bus name :1.290, object path /org
    ESCESC
    kernel: dev_remove: 41 callbacks suppressed
    kernel: device-mapper: ioctl: unable to remove open device docker-253:0-19468577-fc63401af903e22d05a4518e02504527f0d7883f9d997d7d97fdfe72ba789863
    ...
    dockerd[22566]: time="2016-11-28T10:18:09.840268573+01:00" level=fatal msg="Error starting daemon: timeout"
    systemd[1]: docker.service: main process exited, code=exited, status=1/FAILURE
    systemd[1]: Failed to start Docker Application Container Engine.
    

    Moreover, many zombie Docker processes could be observed using ps -eax | grep docker (presence of a "Z" in the "STAT" column), for example docker-proxies.

    After rebooting the server and restarting Docker, the zombie processes disappeared and Docker commands were working again.

提交回复
热议问题