ITPub博客

首页 > 云计算 > Docker/K8 > docker 不能正常启动

docker 不能正常启动

原创 Docker/K8 作者:lhrbest 时间:2020-03-24 11:14:25 0 删除 编辑


docker 不能正常启动

[root@ecs-rac1 ~]# 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@ecs-rac1 ~]# systemctl status docker.service
● docker.service - Docker Application Container Engine
   Loaded: loaded (/usr/lib/systemd/system/docker.service; disabled; vendor preset: disabled)
   Active: failed (Result: start-limit) since Tue 2020-03-24 11:09:46 CST; 3s ago
     Docs: https://docs.docker.com
  Process: 2179 ExecStart=/usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock (code=exited, status=1/FAILURE)
 Main PID: 2179 (code=exited, status=1/FAILURE)
Mar 24 11:09:44 ecs-rac1 systemd[1]: Failed to start Docker Application Container Engine.
Mar 24 11:09:44 ecs-rac1 systemd[1]: Unit docker.service entered failed state.
Mar 24 11:09:44 ecs-rac1 systemd[1]: docker.service failed.
Mar 24 11:09:46 ecs-rac1 systemd[1]: docker.service holdoff time over, scheduling restart.
Mar 24 11:09:46 ecs-rac1 systemd[1]: Stopped Docker Application Container Engine.
Mar 24 11:09:46 ecs-rac1 systemd[1]: start request repeated too quickly for docker.service
Mar 24 11:09:46 ecs-rac1 systemd[1]: Failed to start Docker Application Container Engine.
Mar 24 11:09:46 ecs-rac1 systemd[1]: Unit docker.service entered failed state.
Mar 24 11:09:46 ecs-rac1 systemd[1]: docker.service failed.
[root@ecs-rac1 ~]# docker ps -a
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
[root@ecs-rac1 ~]# systemctl restart 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@ecs-rac1 ~]# more /etc/docker/daemon.json
{
  "registry-mirrors": [
  "https://dockerhub.azk8s.cn",
  "https://hub-mirror.c.163.com",
  "https://pee6w651.mirror.aliyuncs.com",
  "https://hub.daocloud.io",
  "https://hub.docker.com",
  "https://quay.io/search"
  ]
}
[root@ecs-rac1 ~]# mv /etc/docker/daemon.json /etc/docker/daemon.conf
[root@ecs-rac1 ~]# 
[root@ecs-rac1 ~]# systemctl restart docker
[root@ecs-rac1 ~]# docker ps -a
CONTAINER ID        IMAGE                             COMMAND                  CREATED             STATUS                       PORTS                                                      NAMES
85c5b074f0af        mysql:5.7.29                      "docker-entrypoint.s…"   7 days ago          Exited (255) 8 seconds ago   33060/tcp, 0.0.0.0:33064->3306/tcp                         mysql572933064
937cb1c90ad9        mysql:5.7.29                      "docker-entrypoint.s…"   7 days ago          Exited (255) 8 seconds ago   33060/tcp, 0.0.0.0:33062->3306/tcp                         mysql572933062
81b7eb1deb22        mysql:5.7.29                      "docker-entrypoint.s…"   7 days ago          Exited (255) 8 seconds ago   33060/tcp, 0.0.0.0:33061->3306/tcp                         mysql572933061
05f486043eb2        mysql:5.7.29                      "docker-entrypoint.s…"   7 days ago          Exited (255) 8 seconds ago   33060/tcp, 0.0.0.0:33060->3306/tcp                         mysql572933060
cfba6665cb5d        nginx:latest                      "nginx -g 'daemon of…"   7 days ago          Exited (255) 8 seconds ago   0.0.0.0:80->80/tcp                                         quirky_kare
f2597320a25a        mysql:5.7.29                      "docker-entrypoint.s…"   7 days ago          Exited (255) 8 seconds ago   3306/tcp, 33060/tcp, 0.0.0.0:3309->3309/tcp                mysql57293309
f115619bf722        hello-world                       "--registry-mirror=h…"   7 days ago          Created                                                                                 frosty_stonebraker
5f81e444f331        daocloud.io/ihypo/oracle-xe-11g   "/bin/sh -c '/usr/sb…"   7 days ago          Exited (255) 8 seconds ago   8080/tcp, 0.0.0.0:49160->22/tcp, 0.0.0.0:49161->1521/tcp   relaxed_mayer
5eb0e81b9cc3        sath89/oracle-12c                 "/entrypoint.sh "        8 days ago          Exited (255) 8 seconds ago   0.0.0.0:1521->1521/tcp, 0.0.0.0:8080->8080/tcp             oracle12c
99a9528bbeeb        centos                            "/bin/bash"              8 days ago          Exited (0) 8 days ago                                                                   centos
aa4d03c08ddc        mysql:5.7.29                      "docker-entrypoint.s…"   8 days ago          Exited (0) 8 days ago                                                                   mysql57293308
fde615090ce5        mysql:8.0.19                      "docker-entrypoint.s…"   10 days ago         Exited (0) 8 days ago                                                                   mysql8019
c87f8b6ebc45        mysql:5.7.29                      "docker-entrypoint.s…"   10 days ago         Exited (0) 8 days ago                                                                   mysql5729
[root@ecs-rac1 ~]#


总结:

如果是配置了国内镜像,并且镜像文件为/etc/docker/daemon.json,则修改文件后缀为.conf即可正常启动docker服务

/etc/docker/daemon.conf

{

  "registry-mirrors": [

  "https://dockerhub.azk8s.cn",

  "https://hub-mirror.c.163.com",

  "https://pee6w651.mirror.aliyuncs.com",

  "https://registry.docker-cn.com",

  "https://docker.mirrors.ustc.edu.cn",

  "https://hub.daocloud.io",

  "https://hub.docker.com",

  "https://quay.io/search"

  ]

}






About Me

........................................................................................................................

● 本文作者:小麦苗,部分内容整理自网络,若有侵权请联系小麦苗删除

● 本文在itpub、博客园、CSDN和个人微 信公众号( xiaomaimiaolhr)上有同步更新

● 本文itpub地址: http://blog.itpub.net/26736162

● 本文博客园地址: http://www.cnblogs.com/lhrbest

● 本文CSDN地址: https://blog.csdn.net/lihuarongaini

● 本文pdf版、个人简介及小麦苗云盘地址: http://blog.itpub.net/26736162/viewspace-1624453/

● 数据库笔试面试题库及解答: http://blog.itpub.net/26736162/viewspace-2134706/

● DBA宝典今日头条号地址: http://www.toutiao.com/c/user/6401772890/#mid=1564638659405826

........................................................................................................................

● QQ群号: 230161599 、618766405

● 微 信群:可加我微 信,我拉大家进群,非诚勿扰

● 联系我请加QQ好友 646634621 ,注明添加缘由

● 于 2020-03-01 06:00 ~ 2020-03-31 24:00 在西安完成

● 最新修改时间:2020-03-01 06:00 ~ 2020-03-31 24:00

● 文章内容来源于小麦苗的学习笔记,部分整理自网络,若有侵权或不当之处还请谅解

● 版权所有,欢迎分享本文,转载请保留出处

........................................................................................................................

小麦苗的微店https://weidian.com/s/793741433?wfr=c&ifr=shopdetail

小麦苗出版的数据库类丛书http://blog.itpub.net/26736162/viewspace-2142121/

小麦苗OCP、OCM、高可用网络班http://blog.itpub.net/26736162/viewspace-2148098/

小麦苗腾讯课堂主页https://lhr.ke.qq.com/

........................................................................................................................

使用 微 信客户端扫描下面的二维码来关注小麦苗的微 信公众号( xiaomaimiaolhr)及QQ群(DBA宝典)、添加小麦苗微 信, 学习最实用的数据库技术。

........................................................................................................................

欢迎与我联系

 

 



来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/26736162/viewspace-2682208/,如需转载,请注明出处,否则将追究法律责任。

全部评论
【QQ:646634621】【微信:lhrbestxh】【微信公众号:DB宝】【11g、12c OCM】【QQ群:230161599、618766405】【《数据库笔试面试宝典》作者】【OCP、OCM、高可用(RAC+DG+OGG)、MySQL培训班已开讲,只讲实用内容】

注册时间:2012-09-23

  • 博文量
    1494
  • 访问量
    8672569