docker 启动失败

时间:2019-07-12 00:58:03   收藏:0   阅读:264

问题

docker 启动服务失败

场景

在Ubuntu中,将docker切换阿里镜像后,运行如下两条命令: 

sudo systemctl daemon-reload

sudo systemctl restart docker

在重启docker服务这,报错信息如下: 

Job for docker.service failed because the control process exited with error code.

See "systemctl status docker.service" and "journalctl -xe" for details.

通过运行 systemctl status docker.service 命令,输出信息如下: 

● docker.service - Docker Application Container Engine
Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Thu 2019-07-11 23:49:55 CST; 56s ago
Docs: https://docs.docker.com
Process: 4316 ExecStart=/usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock (code=
Main PID: 4316 (code=exited, status=1/FAILURE)

7月 11 23:49:55 hujing-ThinkPad-E550c systemd[1]: docker.service: Service hold-off time over, schedulin
7月 11 23:49:55 hujing-ThinkPad-E550c systemd[1]: docker.service: Scheduled restart job, restart counte
7月 11 23:49:55 hujing-ThinkPad-E550c systemd[1]: Stopped Docker Application Container Engine.
7月 11 23:49:55 hujing-ThinkPad-E550c systemd[1]: docker.service: Start request repeated too quickly.
7月 11 23:49:55 hujing-ThinkPad-E550c systemd[1]: docker.service: Failed with result ‘exit-code‘.
7月 11 23:49:55 hujing-ThinkPad-E550c systemd[1]: Failed to start Docker Application Container Engine.

 

解决

原因是在json配置文件中的配置信息多加了一个逗号

{
"registry-mirrors": [
"https://abc.mirror.aliyuncs.com", 
]
}

将网址后边的逗号删除,就可以启动了

 

评论(0
© 2014 mamicode.com 版权所有 京ICP备13008772号-2  联系我们:gaon5@hotmail.com
迷上了代码!