系统环境:centos 7

docker版本:Docker version 26.1.4, build 5650f9b

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

使用systemctl status docker.service -l查看信息,需要有sudo权限。

由报错信息看不出来,使用sudo journalctl -u docker.service 继续查看详细信息。



由上图可以看出来是因为一个无法解析的参数--graph,导致的。

是因为在docker 19.xx 版本以后使用data-root来代替graph

可以在/etc/docker/daemon.json中配置,也可以在docker.service中修改,效果一样

**注意:如果没有这个文件,需要自己创建。给出一个示例如下:

{
"debug": true,
"experimental": false,
"log-level": "info",
"storage-driver": "overlay2",
"data-root": "/var/lib/docker",
"bip": "172.17.0.1/16",
"iptables": true,
"ip6tables": true,
"bridge": "docker0",
"dns": ["8.8.8.8", "8.8.4.4"],
"hosts": ["unix:///var/run/docker.sock"],
"insecure-registries": ["myinsecure.registry.com:5000"],
"registry-mirrors": ["https://mirror.gcr.io"],
"live-restore": true
}

配置说明:

  • "debug": true:启用调试模式。
  • "experimental": false:禁用实验性功能。
  • "log-level": "info":设置日志级别。
  • "storage-driver": "overlay2":使用 overlay2 存储驱动。
  • "data-root": "/var/lib/docker":设置 Docker 数据目录。
  • "bip": "172.17.0.1/16":设置默认网桥 IP 地址。
  • "iptables": true 和 "ip6tables": true:启用 IP 规则处理。
  • "bridge": "docker0":设置默认桥接网络。
  • "dns": ["8.8.8.8", "8.8.4.4"]:设置 DNS 服务器。
  • "hosts": ["unix:///var/run/docker.sock"]:设置 Docker 守护进程监听的地址。
  • "insecure-registries": ["myinsecure.registry.com:5000"]:设置不安全的注册表地址。
  • "registry-mirrors": ["https://mirror.gcr.io"]:设置 Docker 镜像仓库镜像。
  • "live-restore": true:启用实时恢复功能,使 Docker 守护进程在重启时保持容器运行状态。

根据自己的需要去配置即可。我这边只需要配置一下data-root即可。

配置完毕后执行sudo systemctl restart docker

docker启动问题: Job for docker.service failed because the control process exited with error code. See "systemctl status docker.service" and "journalctl -xe" for details.的更多相关文章

  1. CentOS启动docker1.13失败(Job for docker.service failed because the control process exited with error code. See "systemctl status docker.service" and "journalctl -xe" for details.)

    一.启动失败 1.启动docker [root@localhost ~]# systemctl start docker Job for docker.service failed because t ...

  2. Linux系统Docker启动问题Job for docker.service failed because the control process exited with error code. See "systemctl status docker.service"

    在Liunx中使用Docker, 注: Liunx使用的是在虚拟机下的centOS7版本在刚开始安装Docker时没有任何错误, 但是在后续的docker启动过程中, 出现以下问题: [root@zk ...

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

    centos 启动docker服务报错: Job for docker.service failed because the control process exited with error cod ...

  4. Jenkins 安装启动提示“iJob for jenkins.service failed because the control process exited with error code. See "systemctl status jenkins.service" and "journalctl -xe" for details.”

    通过RPM安装Jenkins简单方便,不太需要复杂的过程,但是在安装完成以后启动Jenkins的时候提示“Starting jenkins (via systemctl): Job for jenki ...

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

    thinkphp 在Apache上配置启用伪静态,重启Apache1 restart 竟然失败了,报错 Job for httpd.service failed because the control ...

  6. Linux 重启网卡失败 Job for network.service failed because the control process exited with error code. See "systemctl status network.service" and "journalctl -xe" for details.

    linux下重启网卡使用命令 : service network restart 时报错: [root@slave01 hadoop]# service network restart Startin ...

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

    [root@web01 ~]#  systemctl start php-fpm Job for php-fpm.service failed because the control process ...

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

    环境:Ubuntu 16.04.1 + Django  1.11.15 + Apache 2.4.18 + python 3.5 此篇文章内容提到的第几步,对照以下链接中的步骤 百度云的ubuntu1 ...

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

    一.前言 Job for mysqld.service failed because the control process exited with error code. See "sys ...

  10. kali linux重启网卡失败:Job for networking.service failed because the control process exited with error code. See "systemctl status networking.service" and "journalctl -xe" for details. 问题排查

    linux菜鸡的时候,总是为了配置网络而烦恼,重启网卡的原因有很多,我这次是因为配置了固定IP[使用第三方工具连接]所以需要重启网卡,出现 Job for networking.service fai ...

随机推荐

  1. 基于EF Core存储的国际化服务

    前言 .NET 官方有一个用来管理国际化资源的扩展包Microsoft.Extensions.Localization,ASP.NET Core也用这个来实现国际化功能.但是这个包的翻译数据是使用re ...

  2. Solo 开发者周刊 (第9期):Dawwin首位人工智能编程师或将改变未来?

    这里会整合 Solo 社区每周推广内容.产品模块或活动投稿,每周五发布.在这期周刊中,我们将深入探讨开源软件产品的开发旅程,分享来自一线独立开发者的经验和见解.本杂志开源,欢迎投稿. 好文推荐 Daw ...

  3. 解决方案 | AutoCAD 版本+版本号+受支持的 .NET SDK版本+.NET Framework版本

    关于 Managed .NET 兼容性 Managed .NET 应用程序通常与扩展基于 AutoCAD 的产品的行为和功能的公司和第三方应用程序关联. 在移植到最新版本后,并非所有 .NET 应用程 ...

  4. 基于Java+SpringBoot+Vue宠物咖啡馆平台设计和实现

    \n文末获取源码联系 感兴趣的可以先收藏起来,大家在毕设选题,项目以及论文编写等相关问题都可以给我加好友咨询 系统介绍: 随着信息技术在管理上越来越深入而广泛的应用,管理信息系统的实施在技术上已逐步成 ...

  5. oeasy教您玩转vim - 90 - # 语法定义syntax

    ​ 内容查找 grep 回忆 我们这次研究了一下配色方案 murphy虽然配色好看 但是对于java的支持并不好 我们对于murphy进行了修改 增加了String.StorageClass颜色的定义 ...

  6. oeasy教您玩转vim - 63 - # window分屏

    ​ 窗口window 回忆上次 我们这次了解了缓冲区buffer ls可以查看buffer 如下是buffer缓冲的一些flag + 有修改未保存内容 - 可修改标签关闭 = 只读缓冲区 a 活跃缓冲 ...

  7. C# EF Core 后端代码已定义的用户实体,如何扩展字段?

    注:"2020中国.NET开发者大会"上学习到的开发技巧, 记录下来 1.问题 后端代码已定义的用户实体,如下: public class UserEntity { public ...

  8. 顺序表之单链表(C实现)

    // Code file created by C Code Develop #include "ccd.h"#include "stdio.h"#includ ...

  9. Django model 层之事务管理总结

    Django model 层之事务管理总结 by:授客 QQ:1033553122 实践环境 Python版本:python-3.4.0.amd64 下载地址:https://www.python.o ...

  10. pytest数据驱动(最简单)

    pytest数据驱动(最简单) 第一种:通过yaml文件获取数据(一维列表) data.yaml文件内容如下: - '软件测试'- '单元测试'- '自动化测试'- '性能测试'- '测试开发'- ' ...