1、问题描述
Docker宿主机重启后,再次执行systemctl start docker命令时报如下错误:
[root@k8s-node02 docker]# 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.
To force a start use "systemctl reset-failed docker.service" followed by "systemctl start docker.service" again.
2、问题分析
需要删除/var/lib/docker下的文件。
3、解决方法
rm -rf /var/lib/docker
4、测试结果
[root@k8s-node02 docker]# systemctl start docker
[root@k8s-node02 docker]# systemctl status docker
● docker.service - Docker Application Container Engine
Loaded: loaded (/usr/lib/systemd/system/docker.service; enabled; vendor preset: disabled)
Active: active (running) since 一 2021-12-06 10:05:29 CST; 4s ago
Docs: https://docs.docker
Main PID: 5453 (dockerd)
Tasks: 12
Memory: 36.0M
CGroup: /system.slice/docker.service
└─5453 /usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock
5、补充/var/lib/docker下存放了哪些docker信息?
/var/lib/docker/
├── aufs # 存储AUFS驱动。Storage area for AUFS driver
│ ├── diff # 层的分支目录。Branch directory of layer
│ ├── layers # 层信息。Infomation about docker layer
│ └── mnt # aufs的挂载点,容器的根目录。Mount point of aufs,root of containers
├── containers # 存放日志文件。Container configurations (both LXC and Docker-specific)
├── graph # 图片存储。Storage for the images
├── init
│ └── dockerinit-0.7.3 # Used as /sbin/init in containers
├── linkgraph.db # sqlite 数据库存储链接和姓名。sqlite database storing links and names.
├── lxc-start-unconfined -> /usr/bin/lxc-start # When starting a privileged container,this is used in lieu of lxc-start,to evade AppArmor confinement (whichmatches by exact path).
├── repositories-aufs # 仓库信息。repository infomation
└── volumes # 存储不是特定绑定的“匿名”卷。Storage for "anonymous" volumes(those which are not bind-mounts)
更多推荐
已解决:Job for docker.service failed because the control process exited with error
发布评论