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 Conta...
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/"
开放原子开发者工作坊旨在鼓励更多人参与开源活动,与志同道合的开发者们相互交流开发经验、分享开发心得、获取前沿技术趋势。工作坊有多种形式的开发者活动,如meetup、训练营等,主打技术交流,干货满满,真诚地邀请各位开发者共同参与!
更多推荐
所有评论(0)