docker服务启动失败
linux重启后,service docker start启动docker服务,失败了[root@ip-172-31-8-236 run]# systemctl start dockerJob for docker.service failed because the control process exited with error code. See "systemctl stat
linux重启后,
service docker start启动docker服务,失败了
[root@ip-172-31-8-236 run]# systemctl start docker
Job for docker.service failed because the control process exited with error code. See "systemctl status docker.service" and "journalctl -xe" for details.
输入"systemctl status docker.service"查看
[root@ip-172-31-8-236 run]# systemctl status docker.service
● docker.service - Docker Application Container Engine
Loaded: loaded (/usr/lib/systemd/system/docker.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since 三 2016-10-19 02:58:23 UTC; 20s ago
Docs: http://docs.docker.com
Process: 10835 ExecStart=/usr/bin/docker-current daemon --exec-opt native.cgroupdriver=systemd $OPTIONS $DOCKER_STORAGE_OPTIONS $DOCKER_NETWORK_OPTIONS $ADD_REGISTRY $BLOCK_REGISTRY $INSECURE_REGISTRY (code=exited, status=1/FAILURE)
Main PID: 10835 (code=exited, status=1/FAILURE)
10月 19 02:58:23 ip-172-31-8-236.cn-north-1.compute.internal systemd[1]: Starting Docker Application Container Engine...
10月 19 02:58:23 ip-172-31-8-236.cn-north-1.compute.internal docker-current[10835]: time="2016-10-19T02:58:23.880006578Z" level=fatal msg="can't create unix socket /var/run/docker.sock: is a directory"
10月 19 02:58:23 ip-172-31-8-236.cn-north-1.compute.internal systemd[1]: docker.service: main process exited, code=exited, status=1/FAILURE
10月 19 02:58:23 ip-172-31-8-236.cn-north-1.compute.internal systemd[1]: Failed to start Docker Application Container Engine.
10月 19 02:58:23 ip-172-31-8-236.cn-north-1.compute.internal systemd[1]: Unit docker.service entered failed state.
10月 19 02:58:23 ip-172-31-8-236.cn-north-1.compute.internal systemd[1]: docker.service failed.
可以看出原因:can't create unix socket /var/run/docker.sock: is a directory
/var/run/docker.sock是一个目录,导致docker启动失败
解决过程:
删除docker.sock目录,
service docker start 启动docker服务
启动过程好像出现了长时间的阻塞,后不得已强制结束,Ctrl+c
查看/var/run/目录下已新建了docker.sock文件
查看docker服务是否启动:docker image
还是出现阻塞
service docker stop 关闭docker服务,好似正常关闭
然后service docker start启动docker服务,正常启动!
更多推荐
所有评论(0)