Linux Centos docker启动失败踩坑 docker.service failed...等 持续更新

1.安装docker后启动报错docker.service failed...

[root@localhost local]# systemctl status docker

启动失败了。

先贴出错误信息

[root@localhost local]# 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-17 10:47:09 CST; 2min 29s ago
     Docs: https://docs.docker.com
  Process: 7795 ExecStart=/usr/bin/dockerd (code=exited, status=1/FAILURE)
 Main PID: 7795 (code=exited, status=1/FAILURE)

6月 17 10:47:09 localhost.localdomain systemd[1]: docker.service failed.
6月 17 10:47:09 localhost.localdomain systemd[1]: docker.service holdoff time over, scheduling restart.
6月 17 10:47:09 localhost.localdomain systemd[1]: Stopped Docker Application Container Engine.
6月 17 10:47:09 localhost.localdomain systemd[1]: start request repeated too quickly for docker.service
6月 17 10:47:09 localhost.localdomain systemd[1]: Failed to start Docker Application Container Engine.
6月 17 10:47:09 localhost.localdomain systemd[1]: Unit docker.service entered failed state.
6月 17 10:47:09 localhost.localdomain systemd[1]: docker.service failed.
6月 17 10:47:33 localhost.localdomain systemd[1]: start request repeated too quickly for docker.service
6月 17 10:47:33 localhost.localdomain systemd[1]: Failed to start Docker Application Container Engine.
6月 17 10:47:33 localhost.localdomain systemd[1]: docker.service failed.
[root@localhost local]# 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.
 

我的处理方式

[root@localhost docker]# vim /etc/docker/daemon.json

在  /etc/docker/daemon.json   添加内容:

{ "graph": "/mnt/docker-data", "storage-driver": "overlay" }     

保存后再次启动。

[root@localhost docker]# systemctl start docker 

就可以启动了。


 

 

 

2.镜像拉取时报错Error response from daemon: Get https://registry-1.docker.io/v2/: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)

 

原因:镜像不可达

解决方式 换一个国内的镜像

[root@localhost www]#  echo "DOCKER_OPTS=\"\$DOCKER_OPTS --registry-mirror=http://f2d6cb40.m.daocloud.io\"" | sudo tee -a /etc/default/docker
[root@localhost www]# sudo service docker restart    重启

[root@localhost www]# docker pull onlyoffice/documentserver   再次拉取

 

其他镜像:      DOCKER_OPTS="$DOCKER_OPTS --registry-mirror=http://f2d6cb40.m.daocloud.io"   这一个速度还行

网易:?

好像是docker中国区官方? DOCKER_OPTS="--registry-mirror=https://docker.mirrors.ustc.edu.cn/"

 

 

 

 

  • 8
    点赞
  • 16
    收藏
    觉得还不错? 一键收藏
  • 5
    评论
评论 5
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值