Docker启动失败 Failed to start Docker Application Container Engine.

目录

【错误收集】

【问题分析】

【解决办法】

【运行结果】


【错误收集】

root@localhost \~# sudo journalctl -u docker.service --no-pager -n 100

-- Logs begin at 日 2025-09-07 15:25:32 CST, end at 日 2025-09-07 15:29:33 CST. --

9月 07 15:25:39 localhost.localdomain systemd1: Starting Docker Application Container Engine...

9月 07 15:25:39 localhost.localdomain dockerd1265: unable to configure the Docker daemon with file /etc/docker/daemon.json: invalid character 's' looking for beginning of value

9月 07 15:25:39 localhost.localdomain systemd1: docker.service: main process exited, code=exited, status=1/FAILURE

9月 07 15:25:39 localhost.localdomain systemd1: Failed to start Docker Application Container Engine.

9月 07 15:25:39 localhost.localdomain systemd1: Unit docker.service entered failed state.

9月 07 15:25:39 localhost.localdomain systemd1: docker.service failed.

9月 07 15:25:41 localhost.localdomain systemd1: docker.service holdoff time over, scheduling restart.

9月 07 15:25:41 localhost.localdomain systemd1: Stopped Docker Application Container Engine.

9月 07 15:25:41 localhost.localdomain systemd1: Starting Docker Application Container Engine...

9月 07 15:25:41 localhost.localdomain dockerd1837: unable to configure the Docker daemon with file /etc/docker/daemon.json: invalid character 's' looking for beginning of value

9月 07 15:25:41 localhost.localdomain systemd1: docker.service: main process exited, code=exited, status=1/FAILURE

9月 07 15:25:41 localhost.localdomain systemd1: Failed to start Docker Application Container Engine.

9月 07 15:25:41 localhost.localdomain systemd1: Unit docker.service entered failed state.

9月 07 15:25:41 localhost.localdomain systemd1: docker.service failed.

9月 07 15:25:43 localhost.localdomain systemd1: docker.service holdoff time over, scheduling restart.

9月 07 15:25:43 localhost.localdomain systemd1: Stopped Docker Application Container Engine.

9月 07 15:25:43 localhost.localdomain systemd1: Starting Docker Application Container Engine...

9月 07 15:25:43 localhost.localdomain dockerd2084: unable to configure the Docker daemon with file /etc/docker/daemon.json: invalid character 's' looking for beginning of value

9月 07 15:25:43 localhost.localdomain systemd1: docker.service: main process exited, code=exited, status=1/FAILURE

9月 07 15:25:43 localhost.localdomain systemd1: Failed to start Docker Application Container Engine.

9月 07 15:25:43 localhost.localdomain systemd1: Unit docker.service entered failed state.

9月 07 15:25:43 localhost.localdomain systemd1: docker.service failed.

9月 07 15:25:45 localhost.localdomain systemd1: docker.service holdoff time over, scheduling restart.

9月 07 15:25:45 localhost.localdomain systemd1: Stopped Docker Application Container Engine.

9月 07 15:25:45 localhost.localdomain systemd1: start request repeated too quickly for docker.service

9月 07 15:25:45 localhost.localdomain systemd1: Failed to start Docker Application Container Engine.

9月 07 15:25:45 localhost.localdomain systemd1: Unit docker.service entered failed state.

9月 07 15:25:45 localhost.localdomain systemd1: docker.service failed.

9月 07 15:26:18 localhost.localdomain systemd1: start request repeated too quickly for docker.service

9月 07 15:26:18 localhost.localdomain systemd1: Failed to start Docker Application Container Engine.

9月 07 15:26:18 localhost.localdomain systemd1: docker.service failed.

9月 07 15:28:13 localhost.localdomain systemd1: Starting Docker Application Container Engine...

9月 07 15:28:13 localhost.localdomain dockerd4990: unable to configure the Docker daemon with file /etc/docker/daemon.json: invalid character 's' looking for beginning of value

9月 07 15:28:13 localhost.localdomain systemd1: docker.service: main process exited, code=exited, status=1/FAILURE

9月 07 15:28:13 localhost.localdomain systemd1: Failed to start Docker Application Container Engine.

9月 07 15:28:13 localhost.localdomain systemd1: Unit docker.service entered failed state.

9月 07 15:28:13 localhost.localdomain systemd1: docker.service failed.

9月 07 15:28:16 localhost.localdomain systemd1: docker.service holdoff time over, scheduling restart.

9月 07 15:28:16 localhost.localdomain systemd1: Stopped Docker Application Container Engine.

9月 07 15:28:16 localhost.localdomain systemd1: Starting Docker Application Container Engine...

9月 07 15:28:16 localhost.localdomain dockerd5053: unable to configure the Docker daemon with file /etc/docker/daemon.json: invalid character 's' looking for beginning of value

9月 07 15:28:16 localhost.localdomain systemd1: docker.service: main process exited, code=exited, status=1/FAILURE

9月 07 15:28:16 localhost.localdomain systemd1: Failed to start Docker Application Container Engine.

9月 07 15:28:16 localhost.localdomain systemd1: Unit docker.service entered failed state.

9月 07 15:28:16 localhost.localdomain systemd1: docker.service failed.

9月 07 15:28:18 localhost.localdomain systemd1: docker.service holdoff time over, scheduling restart.

9月 07 15:28:18 localhost.localdomain systemd1: Stopped Docker Application Container Engine.

9月 07 15:28:18 localhost.localdomain systemd1: Starting Docker Application Container Engine...

9月 07 15:28:18 localhost.localdomain dockerd5112: unable to configure the Docker daemon with file /etc/docker/daemon.json: invalid character 's' looking for beginning of value

9月 07 15:28:18 localhost.localdomain systemd1: docker.service: main process exited, code=exited, status=1/FAILURE

9月 07 15:28:18 localhost.localdomain systemd1: Failed to start Docker Application Container Engine.

9月 07 15:28:18 localhost.localdomain systemd1: Unit docker.service entered failed state.

9月 07 15:28:18 localhost.localdomain systemd1: docker.service failed.

9月 07 15:28:20 localhost.localdomain systemd1: docker.service holdoff time over, scheduling restart.

9月 07 15:28:20 localhost.localdomain systemd1: Stopped Docker Application Container Engine.

9月 07 15:28:20 localhost.localdomain systemd1: start request repeated too quickly for docker.service

9月 07 15:28:20 localhost.localdomain systemd1: Failed to start Docker Application Container Engine.

9月 07 15:28:20 localhost.localdomain systemd1: Unit docker.service entered failed state.

9月 07 15:28:20 localhost.localdomain systemd1: docker.service failed.

【问题分析】

  1. 查看docker配置文件
    1. sudo cat /etc/docker/daemon.json
    2. 配置文件开头stry-mirrors 错误
      1. 少了 {
      2. stry-mirrors 应该是 registry-mirrors

【解决办法】

  1. 删除docker配置文件

    1. sudo rm /etc/docker/daemon.json
  2. 启动docker

    1. sudo systemctl start docker
  3. 编辑配置文件

    1. sudo vi /etc/docker/daemon.json
    2. 配置一下内容
    javascript 复制代码
    {
      "registry-mirrors": [
        "https://mirror.ccs.tencentyun.com",
        "http://hub-mirror.c.163.com",
    "https://e2zfh98i.mirror.aliyuncs.com",
    
    "https://mirror.baidubce.com",
    
    "https://docker.mirrors.ustc.edu.cn",
    
    "https://docker-cf.registry.cyou",
    
    "https://dockercf.jsdelivr.fyi",
    
    "https://docker.jsdelivr.fyi",
    
    "https://dockertest.jsdelivr.fyi",
    
    "https://dockerproxy.com",
    
    "https://docker.m.daocloud.io",
    
    "https://docker.nju.edu.cn",
    
    "https://docker.mirrors.sjtug.sjtu.edu.cn",
    
    "https://mirror.iscas.ac.cn",
    
    "https://docker.rainbond.cc",
    
    "https://do.nark.eu.org",
    
    "https://dc.j8.work",
    
    "https://dockerproxy.com",
    
    "https://gst6rzl9.mirror.aliyuncs.com",
    
    "https://registry.docker-cn.com",
    
    "http://hub-mirror.c.163.com",
    
    "http://mirrors.ustc.edu.cn/",
    
    "https://mirrors.tuna.tsinghua.edu.cn/",
    
    "http://mirrors.sohu.com/"
      ]
    }
  4. 刷新配置内容

    1. sudo systemctl daemon-reload

【运行结果】

  1. 启动docker
  2. sudo systemctl restart docker
  3. 查看docker启动状态
    1. sudo systemctl status docker
  4. 尝试下载镜像
    1. docker pull tomcat
    2. 可以看到可以正常的下载
相关推荐
天外天-亮1 小时前
docker + window 安装
运维·docker·容器
进击的小菜鸡dd1 小时前
docker 容器的挂载映射关系查看
运维·docker·容器
程序员老赵2 小时前
Docker 部署 TeX Live:轻松搭建 LaTeX 论文排版编译平台
前端·docker·latex
陈皮糖..2 小时前
基于 Keepalived 的传统 Web 高可用架构的容器化改造与可观测性升级
运维·docker·性能优化·架构·云计算·prometheus
秦jh_3 小时前
222222
docker
java_logo3 小时前
Docker 部署 go2rtc:轻松搭建摄像头多协议流媒体平台
运维·docker·容器·摄像头·rtsp·轩辕镜像·go2rtc
苏渡苇3 小时前
Spring Insight 里上报 Span 为什么用 JDK HttpClient 而不是 RestTemplate
java·后端·spring·spring cloud·springboot·性能监控
gs801405 小时前
Docker Desktop 报 Wsl/CommandTimedOut、wsl -l -v 卡死、0x80080005 的完整排查与解决
运维·docker·容器
芷栀夏5 小时前
开源菜谱工具 cook 实践:按食材筛选菜谱、随机推荐,并用 Docker 部署到本地
docker·容器·开源
张洛闻Eren5 小时前
云原生k8s【第八课】: ETCD 备份与恢复
linux·运维·docker·kubernetes·k8s