Failed to start Docker Application Container Engine.

2023年 9月 2日 63.5k 0

systemctl status docker.service可看到如下的错误,docker无法启动

$ sudo systemctl status docker.service

docker.service: Main process exited, code=exited, status=1/FAILURE
docker.service: Failed with result 'exit-code'.
Failed to start Docker Application Container Engine.
docker.service: Scheduled restart job, restart counter is at 2.
Stopped Docker Application Container Engine.

如何debug

systemctl status所看到的日志是不全面的,需要用到journalctl,才可以看到完整日志

# journalctl -u docker
level=error msg="failed to mount overlay: no such device" storage-driver=overlay2
level=error msg="exec: \"fuse-overlayfs\": executable file not found in $PATH" storage-driver=fuse-overlayfs
level=error msg="AUFS was not found in /proc/filesystems" storage-driver=aufs
level=error msg="failed to mount overlay: no such device" storage-driver=overlay
failed to start daemon: error initializing graphdriver: devicemapper: Error running deviceCreate (CreatePool) dm_task_run failed

进一步分析

从日志可以看出没有overlay文件系统,在系统中做进一步确认

# cat /proc/filesystems
nodev   sysfs
nodev   tmpfs
nodev   bdev
nodev   proc
nodev   cgroup
nodev   cgroup2
nodev   cpuset
nodev   devtmpfs
nodev   binfmt_misc
nodev   configfs
nodev   debugfs
nodev   securityfs
nodev   sockfs
nodev   pipefs
nodev   ramfs
nodev   hugetlbfs
nodev   rpc_pipefs
nodev   devpts
        ext3
        ext2
        ext4
        vfat
        msdos
        iso9660
nodev   ecryptfs
nodev   nfs
nodev   nfs4
        ntfs

解决问题

在做Linux文件系统的时候,遗漏了将内核的驱动模块放到文件系统的/lib/modules。将驱动模块拷贝到/lib/modules下

# ls /lib/modules
5.4.18-67-generic

相关文章

服务器端口转发,带你了解服务器端口转发
服务器开放端口,服务器开放端口的步骤
产品推荐:7月受欢迎AI容器镜像来了,有Qwen系列大模型镜像
如何使用 WinGet 下载 Microsoft Store 应用
百度搜索:蓝易云 – 熟悉ubuntu apt-get命令详解
百度搜索:蓝易云 – 域名解析成功但ping不通解决方案

发布评论