Docker解决Job for docker.service failed because the control process exited with error code.

本文讲述了在安装并启动Docker时遇到服务启动尝试次数过多的错误,解决方法是检查并修复/etc/docker/daemon.json文件中的可能配置错误。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

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.


问题描述:当我们安装好docker之后,启动docker时会显示以下报错

[root@Mysql-01 ~]# systemctl start 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.

[root@Mysql-01 ~]# systemctl status docker.service
● docker.service - Docker Application Container Engine
Loaded: loaded (/usr/lib/systemd/system/docker.service; enabled; vendor preset: disabled)
Active: failed (Result: start-limit) since Sat 2024-04-20 17:58:24 CST; 32s ago
Docs: https://docs.docker.com
Process: 3380 ExecStart=/usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock (code=exited, status=1/FAILURE)
Main PID: 3380 (code=exited, status=1/FAILURE)
Apr 20 17:58:24 Mysql-01 systemd[1]: start request repeated too quickly for do…ce
Apr 20 17:58:24 Mysql-01 systemd[1]: Failed to start Docker Application Contai…e.
Apr 20 17:58:24 Mysql-01 systemd[1]: Unit docker.service entered failed state.
Apr 20 17:58:24 Mysql-01 systemd[1]: docker.service failed.
Apr 20 17:58:36 Mysql-01 systemd[1]: start request repeated too quickly for do…ce
Apr 20 17:58:36 Mysql-01 systemd[1]: Failed to start Docker Application Contai…e.
Apr 20 17:58:36 Mysql-01 systemd[1]: docker.service failed.
Apr 20 17:58:48 Mysql-01 systemd[1]: start request repeated too quickly for do…ce
Apr 20 17:58:48 Mysql-01 systemd[1]: Failed to start Docker Application Contai…e.
Apr 20 17:58:48 Mysql-01 systemd[1]: docker.service failed.
Hint: Some lines were ellipsized, use -l to show in full.

解决方法:检查/etc/docker/daemon.json 文件里面有没有填错,填错的话,是无法启动docker的。

[root@Mysql-01 ~]# mkdir -p /etc/docker
[root@Mysql-01 ~]# vim /etc/docker/daemon.json
{
  "registry-mirrors": ["https://ummqagsa.mirror.aliyuncs.com"]
}
[root@Mysql-01 ~]# systemctl daemon-reload
[root@Mysql-01 ~]# systemctl restart docker
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

伟伟未玩

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值