异常如下:
# 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.
# service docker start
Redirecting to /bin/systemctl start docker.service
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.
# systemctl status docker.service
● docker.service - Docker Application Container Engine
Loaded: loaded (/usr/lib/systemd/system/docker.service; disabled; vendor preset: disabled)
Active: failed (Result: start-limit) since Fri 2020-10-30 19:29:17 CST; 30s ago
Docs: https://docs.docker.com
Process: 1907 ExecStart=/usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock (code=exited, status=1/FAILURE)
Main PID: 1907 (code=exited, status=1/FAILURE)
Oct 30 19:29:14 c118 systemd[1]: docker.service failed.
Oct 30 19:29:17 c118 systemd[1]: docker.service holdoff time over, scheduling restart.
Oct 30 19:29:17 c118 systemd[1]: Stopped Docker Application Container Engine.
Oct 30 19:29:17 c118 systemd[1]: start request repeated too quickly for docker.service
Oct 30 19:29:17 c118 systemd[1]: Failed to start Docker Application Container Engine.
Oct 30 19:29:17 c118 systemd[1]: Unit docker.service entered failed state.
Oct 30 19:29:17 c118 systemd[1]: docker.service failed.
Oct 30 19:29:39 c118 systemd[1]: start request repeated too quickly for docker.service
Oct 30 19:29:39 c118 systemd[1]: Failed to start Docker Application Container Engine.
Oct 30 19:29:39 c118 systemd[1]: docker.service failed.
网上百度一堆都是升级系统,卸载docker重新安装。
好在我在查看 /etc/docker/deamon.json 发现是我上次修改这个文件的时在熟悉配置忘记在前一个配置后加上 , 引起的
所以有时候不能一味的按照百度的方法来,要根据自己的情况来,我一直运行的好好的docker 重启了系统就启动不了了,这很不合理下面贴一下引起问题的deamon.json文件,如下:
{
"registry-mirrors": [
"https://registry.docker-cn.com",
"https://docker.mirrors.ustc.edu.cn",
"http://hub-mirror.c.163.com",
"https://cr.console.aliyun.com/"
],
"insecure-registries": ["192.168.200.118:8082"]
"log-opts": {"max-size":"100m", "max-file":"1"}
}
修改后正常的:
{
"registry-mirrors": [
"https://registry.docker-cn.com",
"https://docker.mirrors.ustc.edu.cn",
"http://hub-mirror.c.163.com",
"https://cr.console.aliyun.com/"
],
"insecure-registries": ["192.168.200.118:8082"],
"log-opts": {"max-size":"100m", "max-file":"1"},
"storage-driver": "devicemapper"
}
就一个逗号的原因,差点就要大费周章了。