docker无法启动

1.错误提示

使用systemctl stop docker停止docker后,再次启动docker发现无法启动报错如下

[root@localhost ~]# 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.
2.解决方法

①使用systemctl daemon-reload命令重新加载

[root@localhost ~]# systemctl daemon-reload

启动docker时依然失败报错

[root@localhost ~]# systemctl restart docker
Job for docker.service failed because start of the service was attempted too often. See "systemctl status docker.service" and "journalctl -xe" for details.
To force a start use "systemctl reset-failed docker.service" followed by "systemctl start docker.service" again.

②由于博主自己添加了镜像加速的源,也是因为这个问题导致docker启动时失败,解决方法如下

[root@localhost docker]# ll
total 8
-rw-r--r--. 1 root root  59 Jan 17 23:26 daemon.json
-rw-------. 1 root root 244 Jan 13 23:22 key.json
[root@localhost docker]# mv daemon.json daemon.conf
[root@localhost docker]# ll
total 8
-rw-r--r--. 1 root root  59 Jan 17 23:26 daemon.conf
-rw-------. 1 root root 244 Jan 13 23:22 key.json             
[root@localhost docker]# systemctl restart docker

查看docker启动状态

[root@localhost ~]# systemctl status docker
● docker.service - Docker Application Container Engine
   Loaded: loaded (/usr/lib/systemd/system/docker.service; disabled; vendor preset: disabled)
   Active: active (running) since Sat 2020-01-18 08:23:49 EST; 7min ago
     Docs: https://docs.docker.com
 Main PID: 10831 (dockerd)
    Tasks: 13
   Memory: 58.7M
   CGroup: /system.slice/docker.service
           └─10831 /usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock

Jan 18 08:23:48 localhost.localdomain dockerd[10831]: time="2020-01-18T08:23:48.530931325-05:00" level=info msg="ccResolverWrapper: sending update to cc: {[{un...dule=grpc
Jan 18 08:23:48 localhost.localdomain dockerd[10831]: time="2020-01-18T08:23:48.530939296-05:00" level=info msg="ClientConn switching balancer to \"pick_first\...dule=grpc
Jan 18 08:23:48 localhost.localdomain dockerd[10831]: time="2020-01-18T08:23:48.555568826-05:00" level=info msg="[graphdriver] using prior storage driver: overlay2"
Jan 18 08:23:48 localhost.localdomain dockerd[10831]: time="2020-01-18T08:23:48.606285244-05:00" level=info msg="Loading containers: start."
Jan 18 08:23:49 localhost.localdomain dockerd[10831]: time="2020-01-18T08:23:49.135891060-05:00" level=info msg="Default bridge (docker0) is assigned with an I... address"
Jan 18 08:23:49 localhost.localdomain dockerd[10831]: time="2020-01-18T08:23:49.336634972-05:00" level=info msg="Loading containers: done."
Jan 18 08:23:49 localhost.localdomain dockerd[10831]: time="2020-01-18T08:23:49.372806318-05:00" level=info msg="Docker daemon" commit=633a0ea graphdriver(s)=o...n=19.03.5
Jan 18 08:23:49 localhost.localdomain dockerd[10831]: time="2020-01-18T08:23:49.373243437-05:00" level=info msg="Daemon has completed initialization"
Jan 18 08:23:49 localhost.localdomain dockerd[10831]: time="2020-01-18T08:23:49.389523181-05:00" level=info msg="API listen on /var/run/docker.sock"
Jan 18 08:23:49 localhost.localdomain systemd[1]: Started Docker Application Container Engine.
Hint: Some lines were ellipsized, use -l to show in full.
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值