省流
关闭防火墙
systemctl stop firewalld
网上搜了好几篇,大致策略是
- 排查报错日志
- 重装docker
- daemon.json文件配置问题(标点符号)
- /var/run/ 下docker相关文件权限问题
搞了好几天,反复修改配置文件和重新安装docker都不行。
最后看到一篇帖子原来是防火墙的问题。
问题描述
[root@localhost ~]# systemctl start docker
Job for docker.service failed because the control process exited with error code. See "systemctl status docker.service" and "journalctl -xe" for details.
[root@localhost ~]# systemctl status docker
● docker.service - Docker Application Container Engine
Loaded: loaded (/usr/lib/systemd/system/docker.service; disabled; vendor preset: disabled)
Active: failed (Result: start-limit) since 日 2025-03-16 16:36:40 CST; 1min 59s ago
Docs: https://docs.docker.com
Process: 47226 ExecStart=/usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock (code=exited, status=1/FAILURE)
Main PID: 47226 (code=exited, status=1/FAILURE)
3月 16 16:36:38 localhost.localdomain systemd[1]: docker.service: main process exited, code=exited, status=1/FAILURE
3月 16 16:36:38 localhost.localdomain systemd[1]: Failed to start Docker Application Container Engine.
3月 16 16:36:38 localhost.localdomain systemd[1]: Unit docker.service entered failed state.
3月 16 16:36:38 localhost.localdomain systemd[1]: docker.service failed.
3月 16 16:36:40 localhost.localdomain systemd[1]: docker.service holdoff time over, scheduling restart.
3月 16 16:36:40 localhost.localdomain systemd[1]: Stopped Docker Application Container Engine.
3月 16 16:36:40 localhost.localdomain systemd[1]: start request repeated too quickly for docker.service
3月 16 16:36:40 localhost.localdomain systemd[1]: Failed to start Docker Application Container Engine.
3月 16 16:36:40 localhost.localdomain systemd[1]: Unit docker.service entered failed state.
3月 16 16:36:40 localhost.localdomain systemd[1]: docker.service failed.
journalctl -u docker.service
-- Logs begin at 日 2025-03-16 16:12:42 CST, end at 日 2025-03-16 16:43:14 CST. --
3月 16 16:29:43 localhost.localdomain systemd[1]: Starting Docker Application Container Engine...
3月 16 16:29:43 localhost.localdomain dockerd[34152]: time="2025-03-16T16:29:43.518210030+08:00" level=info msg="Starting up"
3月 16 16:29:43 localhost.localdomain dockerd[34152]: time="2025-03-16T16:29:43.669875686+08:00" level=info msg="[graphdriver] trying configured driver: btrfs
3月 16 16:29:43 localhost.localdomain dockerd[34152]: time="2025-03-16T16:29:43.669914794+08:00" level=error msg="Failed to GetDriver graph" driver=btrfs erro
3月 16 16:29:43 localhost.localdomain dockerd[34152]: failed to start daemon: error initializing graphdriver: driver not supported: btrfs
3月 16 16:29:43 localhost.localdomain systemd[1]: docker.service: main process exited, code=exited, status=1/FAILURE
3月 16 16:29:43 localhost.localdomain systemd[1]: Failed to start Docker Application Container Engine.
3月 16 16:29:43 localhost.localdomain systemd[1]: Unit docker.service entered failed state.
3月 16 16:29:43 localhost.localdomain systemd[1]: docker.service failed.
3月 16 16:29:45 localhost.localdomain systemd[1]: docker.service holdoff time over, scheduling restart.
3月 16 16:29:45 localhost.localdomain systemd[1]: Stopped Docker Application Container Engine.
3月 16 16:29:45 localhost.localdomain systemd[1]: Starting Docker Application Container Engine...
3月 16 16:29:45 localhost.localdomain dockerd[34296]: time="2025-03-16T16:29:45.877687508+08:00" level=info msg="Starting up"
3月 16 16:29:45 localhost.localdomain dockerd[34296]: time="2025-03-16T16:29:45.893029787+08:00" level=info msg="[graphdriver] trying configured driver: btrfs
3月 16 16:29:45 localhost.localdomain dockerd[34296]: time="2025-03-16T16:29:45.893053654+08:00" level=error msg="Failed to GetDriver graph" driver=btrfs erro
3月 16 16:29:45 localhost.localdomain dockerd[34296]: failed to start daemon: error initializing graphdriver: driver not supported: btrfs
3月 16 16:29:45 localhost.localdomain systemd[1]: docker.service: main process exited, code=exited, status=1/FAILURE
3月 16 16:29:45 localhost.localdomain systemd[1]: Failed to start Docker Application Container Engine.
3月 16 16:29:45 localhost.localdomain systemd[1]: Unit docker.service entered failed state.
3月 16 16:29:45 localhost.localdomain systemd[1]: docker.service failed.
3月 16 16:29:48 localhost.localdomain systemd[1]: docker.service holdoff time over, scheduling restart.
3月 16 16:29:48 localhost.localdomain systemd[1]: Stopped Docker Application Container Engine.
确保卸载干净重装docker后问题不变的话,就想想排除电脑本身原因吧。