打赏

docker start问题

问题记录:
docker.socket: Failed with result 'service-start-limit-hit'
docker.service: Service RestartSec=100ms expired, scheduling restart.
docker.service: Scheduled restart job, restart counter is at 3.
Stopped Docker Application Container Engine.
docker.service: Start request repeated too quickly.
docker.service: Failed with result 'exit-code'.
Failed to start Docker Application Container Engine.

解决办法:

1.)docker启动参数设置

vim /lib/systemd/system/docker.service
ExecStart=/usr/sbin/dockerd -H fd:// $DOCKER_OPTS

2.)重新加载配置

systemctl daemon-reload

3.)启动docker

service docker start

4.)查看状态

systemctl status docker.service

5.)查看错误日志

journalctl -xe
journaltctl -fu docker

6.)守护进程配置

vim /etc/docker/daemon.json
{
    "registry-mirrors": ["http://hub-mirror.c.163.com"],
    "insecure-registries":["http://mydomain.com"]
}

7.)修改完配置文件,需要reload

sudo systemctl daemon-reload
sudo systemctl restart docker.service

结论:经过层层排查,发现是daemon.json配置错误,一定要注意格式!!可以尝试把这个文件备份,删掉后重启。

posted @ 2020-04-10 10:35  苍山落暮  阅读(15751)  评论(0编辑  收藏  举报