docker启动报错为:
[root@iz8vb4rhbik3h93v48ztfvz docker]# systemctl restart 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.
[root@iz8vb4rhbik3h93v48ztfvz docker]# systemctl stop docker
[root@iz8vb4rhbik3h93v48ztfvz docker]# systemctl status docker
● docker.service - Docker Application Container Engine
Loaded: loaded (/usr/lib/systemd/system/docker.service; enabled; vendor preset: disabled)
Active: failed (Result: start-limit) since Mon 2020-06-15 23:52:04 CST; 36s ago
Docs: https://docs.docker.com
Process: 9466 ExecStart=/usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock (code=exited, status=1/FAILURE)
Main PID: 9466 (code=exited, status=1/FAILURE)
Jun 15 23:52:02 iz8vb4rhbik3h93v48ztfvz systemd[1]: Failed to start Docker Application Container Engine.
Jun 15 23:52:02 iz8vb4rhbik3h93v48ztfvz systemd[1]: Unit docker.service entered failed state.
Jun 15 23:52:02 iz8vb4rhbik3h93v48ztfvz systemd[1]: docker.service failed.
Jun 15 23:52:04 iz8vb4rhbik3h93v48ztfvz systemd[1]: docker.service holdoff time over, scheduling restart.
Jun 15 23:52:04 iz8vb4rhbik3h93v48ztfvz systemd[1]: Stopped Docker Application Container Engine.
Jun 15 23:52:04 iz8vb4rhbik3h93v48ztfvz systemd[1]: start request repeated too quickly for docker.service
Jun 15 23:52:04 iz8vb4rhbik3h93v48ztfvz systemd[1]: Failed to start Docker Application Container Engine.
Jun 15 23:52:04 iz8vb4rhbik3h93v48ztfvz systemd[1]: Unit docker.service entered failed state.
Jun 15 23:52:04 iz8vb4rhbik3h93v48ztfvz systemd[1]: docker.service failed.
[root@iz8vb4rhbik3h93v48ztfvz docker]# systemctl start 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.
原因是修改了daemon.json文件,需要再次修改。
也就是把daemon.json改为daemon.conf。使用mv命令修改后,docker启动正常。
[root@iz8vb4rhbik3h93v48ztfvz docker]# mv daemon.json daemon.conf
[root@iz8vb4rhbik3h93v48ztfvz docker]# systemctl start docker
[root@iz8vb4rhbik3h93v48ztfvz docker]# systemctl status docker
● docker.service - Docker Application Container Engine
Loaded: loaded (/usr/lib/systemd/system/docker.service; enabled; vendor preset: disabled)
Active: active (running) since Mon 2020-06-15 23:53:59 CST; 4s ago
Docs: https://docs.docker.com
Main PID: 9510 (dockerd)
Tasks: 10
Memory: 50.6M
CGroup: /system.slice/docker.service
└─9510 /usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock
Jun 15 23:53:58 iz8vb4rhbik3h93v48ztfvz dockerd[9510]: time="2020-06-15T23:53:58.554833629+08:00" level=info msg="ccResolverWrapper: sending update to cc: {[{unix:///run/contain...module=grpc
Jun 15 23:53:58 iz8vb4rhbik3h93v48ztfvz dockerd[9510]: time="2020-06-15T23:53:58.554857738+08:00" level=info msg="ClientConn switching balancer to \"pick_first\"" module=grpc
Jun 15 23:53:58 iz8vb4rhbik3h93v48ztfvz dockerd[9510]: time="2020-06-15T23:53:58.570959343+08:00" level=info msg="[graphdriver] using prior storage driver: overlay2"
Jun 15 23:53:58 iz8vb4rhbik3h93v48ztfvz dockerd[9510]: time="2020-06-15T23:53:58.898909596+08:00" level=info msg="Loading containers: start."
Jun 15 23:53:59 iz8vb4rhbik3h93v48ztfvz dockerd[9510]: time="2020-06-15T23:53:59.152882347+08:00" level=info msg="Default bridge (docker0) is assigned with an IP address 172.17....IP address"
Jun 15 23:53:59 iz8vb4rhbik3h93v48ztfvz dockerd[9510]: time="2020-06-15T23:53:59.245906513+08:00" level=info msg="Loading containers: done."
Jun 15 23:53:59 iz8vb4rhbik3h93v48ztfvz dockerd[9510]: time="2020-06-15T23:53:59.283200393+08:00" level=info msg="Docker daemon" commit=afacb8b graphdriver(s)=overlay2 version=19.03.8
Jun 15 23:53:59 iz8vb4rhbik3h93v48ztfvz dockerd[9510]: time="2020-06-15T23:53:59.289824517+08:00" level=info msg="Daemon has completed initialization"
Jun 15 23:53:59 iz8vb4rhbik3h93v48ztfvz dockerd[9510]: time="2020-06-15T23:53:59.320315408+08:00" level=info msg="API listen on /var/run/docker.sock"
Jun 15 23:53:59 iz8vb4rhbik3h93v48ztfvz systemd[1]: Started Docker Application Container Engine.
Hint: Some lines were ellipsized, use -l to show in full.