Job for docker.service failed because the control process exited with error code. See "systemctl status docker.service" and "journalctl -xe" for details.


当我们向私有仓库推送镜像,如下:

$ docker push *.*.*.*:5000/pod-infrastructure:latest
The push refers to a repository [*.*.*.*:5000/pod-infrastructure]
Get https://*.*.*.*:5000/v1/_ping: http: server gave HTTP response to HTTPS client

原因是:Docker自从1.3.X之后docker registry交互默认使用的是HTTPS,但是搭建私有镜像默认使用的是HTTP服务导致。

处理办法如下:

# 修改启动文件第12行 
$ vim /usr/lib/systemd/system/docker.service
ExecStart=/usr/bin/dockerd --insecure-registry *.*.*.*:5000

或者

$ vim /etc/docker/daemon.json
{
"insecure-registries":["*.*.*.*:5000"]
}

重启docker服务

$ systemctl daemon-reload
$ systemctl restart docker

如出现如下报错:

$ 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.

 这个可能是/etc/docker/daemon.json内容配置有误,需要认真检查;

或者/etc/sysconfig/docker里面已经配置了insecure-registries内容,重复配置导致的问题,删掉重复的insecure-registries内容即可。

结束!


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



猜您在找 docker 报错: Job for docker.service failed because the control process exited with error code. See "systemctl status docker.service" and "journalctl -xe" for details. docker 启动失败 Job for docker.service failed because the control process exited with error code. See "systemctl status docker.service" and "journalctl -xe" for details. DOCKER启动失败Job for docker.service failed because the control process exited with error code. See "syste mctl status docker.service" and "journalctl -xe" for details. Job for docker.service failed because the control process exited with error code. See "systemctl status docker.service" and "journalctl -xe" for details Restarting network (via systemctl): Job for network.service failed because the control process exited with error code. See "systemctl status network.service" and "journalctl -xe" for details. Job for mysqld.service failed because the control process exited with error code. See "systemctl status mysqld.service" and "journalctl -xe" for details. linux----------启动network的时候报错Job for network.service failed because the control process exited with error code. See "systemctl status network.service" and "journalctl -xe" for details. Job for ssh.service failed because the control process exited with error code. See "systemctl status ssh.service" and "journalctl -xe" for details. Job for rabbitmq-server.service failed because the control process exited with error code. See "systemctl status rabbitmq-server.service" and "journalctl -xe" for details. 启动Nginx服务失败:Job for nginx.service failed because the control process exited with error code. See "systemctl status nginx.service" and "journalctl -xe" for details.
 
粤ICP备18138465号  © 2018-2026 CODEPRJ.COM