Job for docker.service failed because start of the service was attempted too often

参考:http://www.fanliugen.com/?p=663

1、问题如下:
cnentos 7.0 为了加速下载docker的镜像库,选择使用阿里在云的镜像。官方后台有下面的配置说明

修改daemon配置文件/etc/docker/daemon.json来使用加速器
我也就自己新建了相应的json文件,加入了registry-mirrors的地址,但是启动docker时,出现了下面的错误。

[root@localhost ~]# systemctl restart docker
Job for docker.service failed because the control process exited with error code. See "systemctl status docker.service" and "journalctl -xe" for details.

[root@localhost ~]# 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.

[root@localhost ~]# systemctl status docker
● docker.service - Docker Application Container Engine
   Loaded: loaded (/usr/lib/systemd/system/docker.service; disabled; vendor preset: disabled)
   Active: failed (Result: start-limit) since 二 2019-06-04 17:00:08 CST; 5min ago
     Docs: https://docs.docker.com
  Process: 62996 ExecStart=/usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock (code=exited, status=1/FAILURE)
 Main PID: 62996 (code=exited, status=1/FAILURE)

6月 04 17:00:06 localhost.localdomain systemd[1]: docker.service failed.
6月 04 17:00:08 localhost.localdomain systemd[1]: docker.service holdoff time over....
6月 04 17:00:08 localhost.localdomain systemd[1]: Stopped Docker Application Conta....
6月 04 17:00:08 localhost.localdomain systemd[1]: start request repeated too quick...e
6月 04 17:00:08 localhost.localdomain systemd[1]: Failed to start Docker Applicati....
6月 04 17:00:08 localhost.localdomain systemd[1]: Unit docker.service entered fail....
6月 04 17:00:08 localhost.localdomain systemd[1]: docker.service failed.
6月 04 17:00:40 localhost.localdomain systemd[1]: start request repeated too quick...e
6月 04 17:00:40 localhost.localdomain systemd[1]: Failed to start Docker Applicati....
6月 04 17:00:40 localhost.localdomain systemd[1]: docker.service failed.
Hint: Some lines were ellipsized, use -l to show in full.

2、解决方式:

把daemon.json改为daemon.conf。使用mv命令修改后,docker启动正常。

[root@localhost docker]# mv daemon.json daemon.conf
[root@localhost docker]# systemctl start docker
[root@localhost docker]# docker version
Client:
 Version:           18.09.6
 API version:       1.39
 Go version:        go1.10.8
 Git commit:        481bc77156
 Built:             Sat May  4 02:34:58 2019
 OS/Arch:           linux/amd64
 Experimental:      false

Server: Docker Engine - Community
 Engine:
  Version:          18.09.6
  API version:      1.39 (minimum version 1.12)
  Go version:       go1.10.8
  Git commit:       481bc77
  Built:            Sat May  4 02:02:43 2019
  OS/Arch:          linux/amd64
  Experimental:     false
[root@localhost docker]# 

上一篇:com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Cannot load connection class b


下一篇:启动Docker 出现Job for docker.service failed because the control process exited with error code. See &qu