docker启动报错Job for docker.service failed because a configured resource limit was exceeded

本文详细介绍了当Docker启动时报错“Jobfordocker.servicefailedbecauseaconfiguredresourcelimitwasexceeded”时的解决方案。包括结束Docker进程、清除所有已订的规则、关闭并删除网桥docker0,最后重启Docker服务的具体步骤。

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

docker 启动报错:Job for docker.service failed because a configured resource limit was exceeded. See “systemctl status docker.service” and “journalctl -xe” for details.
启动docker报错
查看docker状态
解决办法:
pkill docker #结束docker 进程
iptables -t nat -F #清除所有的已订的规则
ifconfig docker0 down #关掉docker0网络
brctl delbr docker0 #删除网桥docker0
service docker restart #启动docker服务

7月 08 02:08:48 sw-VMware-Virtual-Platform systemd[1]: docker.service: Deactivated successfully. 7月 08 02:08:48 sw-VMware-Virtual-Platform systemd[1]: Stopped docker.service - Docker Application Container Engine. 7月 08 02:08:48 sw-VMware-Virtual-Platform systemd[1]: Starting docker.service - Docker Application Container Engine... 7月 08 02:08:48 sw-VMware-Virtual-Platform dockerd[4104]: time="2025-07-08T02:08:48.175835934+08:00" level=info msg="Starting up" 7月 08 02:08:48 sw-VMware-Virtual-Platform dockerd[4104]: time="2025-07-08T02:08:48.176582933+08:00" level=info msg="OTEL tracing is not configured, using no-op tracer provider" 7月 08 02:08:48 sw-VMware-Virtual-Platform dockerd[4104]: time="2025-07-08T02:08:48.176673256+08:00" level=info msg="CDI directory does not exist, skipping: failed to monitor for changes: no such file or directory" dir=/var/run/cdi 7月 08 02:08:48 sw-VMware-Virtual-Platform dockerd[4104]: time="2025-07-08T02:08:48.176709209+08:00" level=info msg="CDI directory does not exist, skipping: failed to monitor for changes: no such file or directory" dir=/etc/cdi 7月 08 02:08:48 sw-VMware-Virtual-Platform dockerd[4104]: time="2025-07-08T02:08:48.176779556+08:00" level=info msg="detected 127.0.0.53 nameserver, assuming systemd-resolved, so using resolv.conf: /run/systemd/resolve/resolv.conf" 7月 08 02:08:48 sw-VMware-Virtual-Platform dockerd[4104]: time="2025-07-08T02:08:48.183689488+08:00" level=info msg="Creating a containerd client" address=/run/containerd/containerd.sock timeout=1m0s 7月 08 02:08:48 sw-VMware-Virtual-Platform dockerd[4104]: time="2025-07-08T02:08:48.198376903+08:00" level=info msg="[graphdriver] using prior storage driver: overlay2" 7月 08 02:08:48 sw-VMware-Virtual-Platform dockerd[4104]: time="2025-07-08T02:08:48.198568602+08:00" level=info msg="Loading containers: start." 7月 08 02:08:48 sw-VMware-Virtual-Platform dockerd[4104]: time="2025-07-08T02:08:48.783213421+08:00" level=warning msg="Error (Unable to complete atomic operation, key modified) deleting object [endpoint_count 46cdc042d3e3e9685261ee9652e8672806c462c4d7a00ed357e59845b2e9059d], retrying...." 7月 08 02:08:48 sw-VMware-Virtual-Platform dockerd[4104]: time="2025-07-08T02:08:48.807172158+08:00" level=info msg="Loading containers: done." 7月 08 02:08:48 sw-VMware-Virtual-Platform dockerd[4104]: time="2025-07-08T02:08:48.815720498+08:00" level=info msg="Docker daemon" commit=5beb93d containerd-snapshotter=false storage-driver=overlay2 version=28.3.1 7月 08 02:08:48 sw-VMware-Virtual-Platform dockerd[4104]: time="2025-07-08T02:08:48.815768545+08:00" level=info msg="Initializing buildkit" 7月 08 02:08:48 sw-VMware-Virtual-Platform dockerd[4104]: time="2025-07-08T02:08:48.827495405+08:00" level=info msg="Completed buildkit initialization" 7月 08 02:08:48 sw-VMware-Virtual-Platform dockerd[4104]: time="2025-07-08T02:08:48.831627620+08:00" level=info msg="Daemon has completed initialization" 7月 08 02:08:48 sw-VMware-Virtual-Platform dockerd[4104]: time="2025-07-08T02:08:48.831703735+08:00" level=info msg="API listen on /run/docker.sock" 7月 08 02:08:48 sw-VMware-Virtual-Platform systemd[1]: Started docker.service - Docker Application Container Engine. 7月 08 02:09:17 sw-VMware-Virtual-Platform dockerd[4104]: time="2025-07-08T02:09:17.991463062+08:00" level=warning msg="Error getting v2 registry: Get \"https://registry.docker-cn.com/v2/\": net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)" 7月 08 02:09:17 sw-VMware-Virtual-Platform dockerd[4104]: time="2025-07-08T02:09:17.991507785+08:00" level=info msg="Attempting next endpoint for pull after error: Get \"https://registry.docker-cn.com/v2/\": net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)" 7月 08 02:09:18 sw-VMware-Virtual-Platform dockerd[4104]: time="2025-07-08T02:09:18.038325673+08:00" level=warning msg="Error getting v2 registry: Get \"https://docker.mirrors.ustc.edu.cn/v2/\": dial tcp: lookup docker.mirrors.ustc.edu.cn on 127.0.0.53:53: no such host" 7月 08 02:09:18 sw-VMware-Virtual-Platform dockerd[4104]: time="2025-07-08T02:09:18.038354114+08:00" level=info msg="Attempting next endpoint for pull after error: Get \"https://docker.mirrors.ustc.edu.cn/v2/\": dial tcp: lookup docker.mirrors.ustc.edu.cn on 127.0.0.53:53: no such host" 7月 08 02:09:18 sw-VMware-Virtual-Platform dockerd[4104]: time="2025-07-08T02:09:18.074104206+08:00" level=warning msg="Error getting v2 registry: Get \"https://hub-mirror.c.163.com/v2/\": dial tcp: lookup hub-mirror.c.163.com on 127.0.0.53:53: no such host" 7月 08 02:09:18 sw-VMware-Virtual-Platform dockerd[4104]: time="2025-07-08T02:09:18.074122866+08:00" level=info msg="Attempting next endpoint for pull after error: Get \"https://hub-mirror.c.163.com/v2/\": dial tcp: lookup hub-mirror.c.163.com on 127.0.0.53:53: no such host" 7月 08 02:09:33 sw-VMware-Virtual-Platform dockerd[4104]: time="2025-07-08T02:09:33.075713810+08:00" level=warning msg="Error getting v2 registry: Get \"https://registry-1.docker.io/v2/\": net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)" 7月 08 02:09:33 sw-VMware-Virtual-Platform dockerd[4104]: time="2025-07-08T02:09:33.075758059+08:00" level=info msg="Not continuing with pull after error" error="Get \"https://registry-1.docker.io/v2/\": net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)" 7月 08 02:09:33 sw-VMware-Virtual-Platform dockerd[4104]: time="2025-07-08T02:09:33.076391178+08:00" level=error msg="Handler for POST /v1.51/images/create returned error: Get \"https://registry-1.docker.io/v2/\": net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)" 7月 08 02:10:22 sw-VMware-Virtual-Platform systemd[1]: Stopping docker.service - Docker Application Container Engine... 7月 08 02:10:22 sw-VMware-Virtual-Platform dockerd[4104]: time="2025-07-08T02:10:22.598062038+08:00" level=info msg="Processing signal 'terminated'" 7月 08 02:10:22 sw-VMware-Virtual-Platform dockerd[4104]: time="2025-07-08T02:10:22.598683148+08:00" level=info msg="stopping event stream following graceful shutdown" error="<nil>" module=libcontainerd namespace=moby 7月 08 02:10:22 sw-VMware-Virtual-Platform dockerd[4104]: time="2025-07-08T02:10:22.598888369+08:00" level=info msg="Daemon shutdown complete" 7月 08 02:10:22 sw-VMware-Virtual-Platform systemd[1]: docker.service: Deactivated successfully. 7月 08 02:10:22 sw-VMware-Virtual-Platform systemd[1]: Stopped docker.service - Docker Application Container Engine. 7月 08 02:10:22 sw-VMware-Virtual-Platform systemd[1]: Starting docker.service - Docker Application Container Engine... 7月 08 02:10:22 sw-VMware-Virtual-Platform dockerd[4499]: unable to configure the Docker daemon with file /etc/docker/daemon.json: invalid character 'j' looking for beginning of value 7月 08 02:10:22 sw-VMware-Virtual-Platform systemd[1]: docker.service: Main process exited, code=exited, status=1/FAILURE 7月 08 02:10:22 sw-VMware-Virtual-Platform systemd[1]: docker.service: Failed with result 'exit-code'. 7月 08 02:10:22 sw-VMware-Virtual-Platform systemd[1]: Failed to start docker.service - Docker Application Container Engine. 7月 08 02:10:24 sw-VMware-Virtual-Platform systemd[1]: docker.service: Scheduled restart job, restart counter is at 1. 7月 08 02:10:24 sw-VMware-Virtual-Platform systemd[1]: Starting docker.service - Docker Application Container Engine... 7月 08 02:10:24 sw-VMware-Virtual-Platform dockerd[4510]: unable to configure the Docker daemon with file /etc/docker/daemon.json: invalid character 'j' looking for beginning of value 7月 08 02:10:24 sw-VMware-Virtual-Platform systemd[1]: docker.service: Main process exited, code=exited, status=1/FAILURE 7月 08 02:10:24 sw-VMware-Virtual-Platform systemd[1]: docker.service: Failed with result 'exit-code'. 7月 08 02:10:24 sw-VMware-Virtual-Platform systemd[1]: Failed to start docker.service - Docker Application Container Engine. 7月 08 02:10:27 sw-VMware-Virtual-Platform systemd[1]: docker.service: Scheduled restart job, restart counter is at 2. 7月 08 02:10:27 sw-VMware-Virtual-Platform systemd[1]: Starting docker.service - Docker Application Container Engine... 7月 08 02:10:27 sw-VMware-Virtual-Platform dockerd[4520]: unable to configure the Docker daemon with file /etc/docker/daemon.json: invalid character 'j' looking for beginning of value 7月 08 02:10:27 sw-VMware-Virtual-Platform systemd[1]: docker.service: Main process exited, code=exited, status=1/FAILURE 7月 08 02:10:27 sw-VMware-Virtual-Platform systemd[1]: docker.service: Failed with result 'exit-code'. 7月 08 02:10:27 sw-VMware-Virtual-Platform systemd[1]: Failed to start docker.service - Docker Application Container Engine. 7月 08 02:10:29 sw-VMware-Virtual-Platform systemd[1]: docker.service: Scheduled restart job, restart counter is at 3. 7月 08 02:10:29 sw-VMware-Virtual-Platform systemd[1]: docker.service: Start request repeated too quickly. 7月 08 02:10:29 sw-VMware-Virtual-Platform systemd[1]: docker.service: Failed with result 'exit-code'. 7月 08 02:10:29 sw-VMware-Virtual-Platform systemd[1]: Failed to start docker.service - Docker Application Container Engine. 7月 08 02:11:05 sw-VMware-Virtual-Platform systemd[1]: docker.service: Start request repeated too quickly. 7月 08 02:11:05 sw-VMware-Virtual-Platform systemd[1]: docker.service: Failed with result 'exit-code'. 7月 08 02:11:05 sw-VMware-Virtual-Platform systemd[1]: Failed to start docker.service - Docker Application Container Engine. 7月 08 02:24:59 sw-VMware-Virtual-Platform systemd[1]: Starting docker.service - Docker Application Container Engine... 7月 08 02:24:59 sw-VMware-Virtual-Platform dockerd[9896]: time="2025-07-08T02:24:59.073177400+08:00" level=info msg="Starting up" 7月 08 02:24:59 sw-VMware-Virtual-Platform dockerd[9896]: time="2025-07-08T02:24:59.073829778+08:00" level=info msg="OTEL tracing is not configured, using no-op tracer provider" 7月 08 02:24:59 sw-VMware-Virtual-Platform dockerd[9896]: time="2025-07-08T02:24:59.073896097+08:00" level=info msg="CDI directory does not exist, skipping: failed to monitor for changes: no such file or directory" dir=/etc/cdi 7月 08 02:24:59 sw-VMware-Virtual-Platform dockerd[9896]: time="2025-07-08T02:24:59.073903656+08:00" level=info msg="CDI directory does not exist, skipping: failed to monitor for changes: no such file or directory" dir=/var/run/cdi 7月 08 02:24:59 sw-VMware-Virtual-Platform dockerd[9896]: time="2025-07-08T02:24:59.073974271+08:00" level=info msg="detected 127.0.0.53 nameserver, assuming systemd-resolved, so using resolv.conf: /run/systemd/resolve/resolv.conf" 7月 08 02:24:59 sw-VMware-Virtual-Platform dockerd[9896]: time="2025-07-08T02:24:59.081270257+08:00" level=info msg="Creating a containerd client" address=/run/containerd/containerd.sock timeout=1m0s 7月 08 02:24:59 sw-VMware-Virtual-Platform dockerd[9896]: time="2025-07-08T02:24:59.085148392+08:00" level=info msg="[graphdriver] trying configured driver: overlay2" 7月 08 02:24:59 sw-VMware-Virtual-Platform dockerd[9896]: failed to start daemon: error initializing graphdriver: overlay2: unknown option overlay2.override_kernel_check: overlay2 7月 08 02:24:59 sw-VMware-Virtual-Platform systemd[1]: docker.service: Main process exited, code=exited, status=1/FAILURE 7月 08 02:24:59 sw-VMware-Virtual-Platform systemd[1]: docker.service: Failed with result 'exit-code'. 7月 08 02:24:59 sw-VMware-Virtual-Platform systemd[1]: Failed to start docker.service - Docker Application Container Engine. 7月 08 02:25:01 sw-VMware-Virtual-Platform systemd[1]: docker.service: Scheduled restart job, restart counter is at 1. 7月 08 02:25:01 sw-VMware-Virtual-Platform systemd[1]: Starting docker.service - Docker Application Container Engine... 7月 08 02:25:01 sw-VMware-Virtual-Platform dockerd[9921]: time="2025-07-08T02:25:01.171214902+08:00" level=info msg="Starting up" 7月 08 02:25:01 sw-VMware-Virtual-Platform dockerd[9921]: time="2025-07-08T02:25:01.172077051+08:00" level=info msg="OTEL tracing is not configured, using no-op tracer provider" 7月 08 02:25:01 sw-VMware-Virtual-Platform dockerd[9921]: time="2025-07-08T02:25:01.172140193+08:00" level=info msg="CDI directory does not exist, skipping: failed to monitor for changes: no such file or directory" dir=/etc/cdi 7月 08 02:25:01 sw-VMware-Virtual-Platform dockerd[9921]: time="2025-07-08T02:25:01.172147872+08:00" level=info msg="CDI directory does not exist, skipping: failed to monitor for changes: no such file or directory" dir=/var/run/cdi 7月 08 02:25:01 sw-VMware-Virtual-Platform dockerd[9921]: time="2025-07-08T02:25:01.172218780+08:00" level=info msg="detected 127.0.0.53 nameserver, assuming systemd-resolved, so using resolv.conf: /run/systemd/resolve/resolv.conf" 7月 08 02:25:01 sw-VMware-Virtual-Platform dockerd[9921]: time="2025-07-08T02:25:01.179261467+08:00" level=info msg="Creating a containerd client" address=/run/containerd/containerd.sock timeout=1m0s 7月 08 02:25:01 sw-VMware-Virtual-Platform dockerd[9921]: time="2025-07-08T02:25:01.182966252+08:00" level=info msg="[graphdriver] trying configured driver: overlay2" 7月 08 02:25:01 sw-VMware-Virtual-Platform dockerd[9921]: failed to start daemon: error initializing graphdriver: overlay2: unknown option overlay2.override_kernel_check: overlay2 7月 08 02:25:01 sw-VMware-Virtual-Platform systemd[1]: docker.service: Main process exited, code=exited, status=1/FAILURE 7月 08 02:25:01 sw-VMware-Virtual-Platform systemd[1]: docker.service: Failed with result 'exit-code'. 7月 08 02:25:01 sw-VMware-Virtual-Platform systemd[1]: Failed to start docker.service - Docker Application Container Engine. 7月 08 02:25:03 sw-VMware-Virtual-Platform systemd[1]: docker.service: Scheduled restart job, restart counter is at 2. 7月 08 02:25:03 sw-VMware-Virtual-Platform systemd[1]: Starting docker.service - Docker Application Container Engine... 7月 08 02:25:03 sw-VMware-Virtual-Platform dockerd[9948]: time="2025-07-08T02:25:03.449723946+08:00" level=info msg="Starting up" 7月 08 02:25:03 sw-VMware-Virtual-Platform dockerd[9948]: time="2025-07-08T02:25:03.450205624+08:00" level=info msg="OTEL tracing is not configured, using no-op tracer provider" 7月 08 02:25:03 sw-VMware-Virtual-Platform dockerd[9948]: time="2025-07-08T02:25:03.450251582+08:00" level=info msg="CDI directory does not exist, skipping: failed to monitor for changes: no such file or directory" dir=/etc/cdi 7月 08 02:25:03 sw-VMware-Virtual-Platform dockerd[9948]: time="2025-07-08T02:25:03.450257899+08:00" level=info msg="CDI directory does not exist, skipping: failed to monitor for changes: no such file or directory" dir=/var/run/cdi 7月 08 02:25:03 sw-VMware-Virtual-Platform dockerd[9948]: time="2025-07-08T02:25:03.450312061+08:00" level=info msg="detected 127.0.0.53 nameserver, assuming systemd-resolved, so using resolv.conf: /run/systemd/resolve/resolv.conf" 7月 08 02:25:03 sw-VMware-Virtual-Platform dockerd[9948]: time="2025-07-08T02:25:03.457317190+08:00" level=info msg="Creating a containerd client" address=/run/containerd/containerd.sock timeout=1m0s 7月 08 02:25:03 sw-VMware-Virtual-Platform dockerd[9948]: time="2025-07-08T02:25:03.461180740+08:00" level=info msg="[graphdriver] trying configured driver: overlay2" 7月 08 02:25:03 sw-VMware-Virtual-Platform dockerd[9948]: failed to start daemon: error initializing graphdriver: overlay2: unknown option overlay2.override_kernel_check: overlay2 7月 08 02:25:03 sw-VMware-Virtual-Platform systemd[1]: docker.service: Main process exited, code=exited, status=1/FAILURE 7月 08 02:25:03 sw-VMware-Virtual-Platform systemd[1]: docker.service: Failed with result 'exit-code'. 7月 08 02:25:03 sw-VMware-Virtual-Platform systemd[1]: Failed to start docker.service - Docker Application Container Engine. 7月 08 02:25:05 sw-VMware-Virtual-Platform systemd[1]: docker.service: Scheduled restart job, restart counter is at 3. 7月 08 02:25:05 sw-VMware-Virtual-Platform systemd[1]: docker.service: Start request repeated too quickly. 7月 08 02:25:05 sw-VMware-Virtual-Platform systemd[1]: docker.service: Failed with result 'exit-code'. 7月 08 02:25:05 sw-VMware-Virtual-Platform systemd[1]: Failed to start docker.service - Docker Application Container Engine.
最新发布
07-09
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值