異常如下:
# 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"
}
就一個逗號的原因,差點就要大費周章了。