解决Job for docker.service failed because the control process exited with error code. See "systemctl s
2017-05-23 13:20
1631 查看
在ubuntu16.04下安装安装docker docker daemon启不起来,报如下错误:
Job for docker.service failed because the control process exited with error code. See "systemctl status docker.service" and "journalctl -xe" for details.
解决方法:
修改docker.service内容:
sudo vim /lib/systemd/system/docker.service
将
ExecStart=/usr/bin/dockerd -H fd:// 改成
ExecStart=/usr/bin/dockerd -H fd:// -s overlay2
然后执行:
成功启动docker
-------------------------------------------------------------------add on----------------------------------------------------------------------------
如果需要pull docker镜像的私有仓库(一般是公司内网的registry),我们这里假设私有仓库IP为10.27.168.88,则需要
ExecStart=/usr/bin/dockerd -H fd:// -s overlay2 --dns 10.xx.xxx.xx --dns 8.8.8.8 --insecure-registry 10.27.168.88:5000
不想用ip也可以域名,只要做好dns解析就好了
eg:ExecStart=/usr/bin/dockerd -H fd:// -s overlay2 --dns 10.xx.xxx.xx --dns 8.8.8.8 --insecure-registry my_registry:5000
其中--dns 10.xx.xxx.xx是公司内网的dns服务器 ,my_registry是私有仓库的域名,如果没有可以直接用私有仓库ip来替代,不想用ip的可以在/etc/hosts下添加一下
10.27.168.88 my_registry #假设私有仓库的ip是10.27.168.88的话。
Job for docker.service failed because the control process exited with error code. See "systemctl status docker.service" and "journalctl -xe" for details.
解决方法:
修改docker.service内容:
sudo vim /lib/systemd/system/docker.service
将
ExecStart=/usr/bin/dockerd -H fd:// 改成
ExecStart=/usr/bin/dockerd -H fd:// -s overlay2
然后执行:
sudo systemctl daemon-reload sudo systemctl restart docker
成功启动docker
-------------------------------------------------------------------add on----------------------------------------------------------------------------
如果需要pull docker镜像的私有仓库(一般是公司内网的registry),我们这里假设私有仓库IP为10.27.168.88,则需要
ExecStart=/usr/bin/dockerd -H fd:// -s overlay2 --dns 10.xx.xxx.xx --dns 8.8.8.8 --insecure-registry 10.27.168.88:5000
不想用ip也可以域名,只要做好dns解析就好了
eg:ExecStart=/usr/bin/dockerd -H fd:// -s overlay2 --dns 10.xx.xxx.xx --dns 8.8.8.8 --insecure-registry my_registry:5000
其中--dns 10.xx.xxx.xx是公司内网的dns服务器 ,my_registry是私有仓库的域名,如果没有可以直接用私有仓库ip来替代,不想用ip的可以在/etc/hosts下添加一下
10.27.168.88 my_registry #假设私有仓库的ip是10.27.168.88的话。
相关文章推荐
- Jenkins 安装启动提示“iJob for jenkins.service failed because the control process exited with error code. See "systemctl status jenkins.service" and "journalctl -xe" for details.”
- Job for postfix.service failed because the control process exited with error code. See "systemctl st
- Job for httpd.service failed because the control process exited with error code. See "systemctl status httpd.service" and "journalctl -xe" for details
- Job for nginx.service failed because the control process exited with error code. See "systemctl stat
- Job for vsftpd.service failed because the control process exited with error code. See "systemctl sta
- Job for php-fpm.service failed because the control process exited with error code. See "systemctl st
- 解决Docker启动服务器链接失败-Job for docker.service failed because the control process exited error code
- Job for tomcat.service failed because the control process exited with error code 解决办法:
- Dockers Job for docker.service failed because the control process exited with error code
- 关于nginx的Job for nginx.service failed because the control process exited with error code.错误
- CentOS7启动SSH服务报:Job for ssh.service failed because the control process exited with error code.......
- Centos 7不能上网,Job for iptables.service failed because the control process exited with error code.
- centos出现这个错误:Job for sshd.service failed because the control process exited with error code.
- Centos 7不能上网,Job for iptables.service failed because the control process exited with error code.
- Job for vsftpd.service failed because the control process exited with error code
- 重启网卡报Job for network.service failed because the control process exited with error code.。。 错误
- OpenStack常见错误:无法开启http服务 Job for httpd.service failed because the control process exited with error
- 关于vsftp出现Restarting vsftpd (via systemctl): Job for vsftpd.service failed because the control 的解决办法
- 关于vsftp出现Restarting vsftpd (via systemctl): Job for vsftpd.service failed because the control 的解决办法
- gitlab搭建提示inet_interfacesJob for postfix.service failed because the control process exited with erro