由于 containerd 服务崩溃,docker 安装在 raspberry pi 1b 上失败

由于 containerd 服务崩溃,docker 安装在 raspberry pi 1b 上失败

我把旧的 Raspberry Pi 1B(512 MB RAM)上的灰尘掸掉,想用它做一些带有 docker 的教育项目。

我在 32 GB 卡上安装了最新的 Raspberry Pi OS 32bit Lite,更新了安装并尝试根据 docker 网站上的安装指南安装 docker。

由于崩溃,安装失败containerd.service。安装日志如下:

pi@pi1:~ $ sudo apt-get install -y docker-ce docker-ce-cli containerd.io docker-compose-plugin
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following additional packages will be installed:
  apparmor dbus-user-session docker-ce-rootless-extras git git-man liberror-perl libltdl7 libslirp0 slirp4netns
Suggested packages:
  apparmor-profiles-extra apparmor-utils cgroupfs-mount | cgroup-lite git-daemon-run | git-daemon-sysvinit git-doc
  git-el git-email git-gui gitk gitweb git-cvs git-mediawiki git-svn
The following NEW packages will be installed:
  apparmor containerd.io dbus-user-session docker-ce docker-ce-cli docker-ce-rootless-extras docker-compose-plugin
  git git-man liberror-perl libltdl7 libslirp0 slirp4netns
0 upgraded, 13 newly installed, 0 to remove and 0 not upgraded.
Need to get 94.3 MB of archives.
After this operation, 386 MB of additional disk space will be used.
Get:1 http://ftp.agdsn.de/pub/mirrors/raspbian/raspbian bullseye/main armhf apparmor armhf 2.13.6-10 [532 kB]
Get:2 http://raspbian.raspberrypi.org/raspbian bullseye/main armhf dbus-user-session armhf 1.12.24-0+deb11u1 [99.7 kB]
Get:9 https://download.docker.com/linux/debian bullseye/stable armhf containerd.io armhf 1.6.15-1 [20.4 MB]
Get:7 http://raspbian.raspberrypi.org/raspbian bullseye/main armhf libslirp0 armhf 4.4.0-1+deb11u2 [50.2 kB]
Get:6 http://ftp.agdsn.de/pub/mirrors/raspbian/raspbian bullseye/main armhf libltdl7 armhf 2.4.6-15 [388 kB]
Get:5 http://mirror1.hs-esslingen.de/pub/Mirrors/archive.raspbian.org/raspbian bullseye/main armhf git armhf 1:2.30.2-1 [4,724 kB]
Get:4 http://mirror.de.leaseweb.net/raspbian/raspbian bullseye/main armhf git-man all 1:2.30.2-1 [1,827 kB]
Get:8 http://ftp.halifax.rwth-aachen.de/raspbian/raspbian bullseye/main armhf slirp4netns armhf 1.0.1-2 [29.0 kB]
Get:3 http://mirror.pyratelan.org/raspbian/raspbian bullseye/main armhf liberror-perl all 0.17029-1 [31.0 kB]
Get:10 https://download.docker.com/linux/debian bullseye/stable armhf docker-ce-cli armhf 5:20.10.22~3-0~debian-bullseye [37.5 MB]
Get:11 https://download.docker.com/linux/debian bullseye/stable armhf docker-ce armhf 5:20.10.22~3-0~debian-bullseye [13.1 MB]
Get:12 https://download.docker.com/linux/debian bullseye/stable armhf docker-ce-rootless-extras armhf 5:20.10.22~3-0~debian-bullseye [7,442 kB]
Get:13 https://download.docker.com/linux/debian bullseye/stable armhf docker-compose-plugin armhf 2.14.1~debian-bullseye [8,218 kB]
Fetched 94.3 MB in 1min 17s (1,218 kB/s)
Preconfiguring packages ...
Selecting previously unselected package apparmor.
(Reading database ... 43694 files and directories currently installed.)
Preparing to unpack .../00-apparmor_2.13.6-10_armhf.deb ...
Unpacking apparmor (2.13.6-10) ...
Selecting previously unselected package containerd.io.
Preparing to unpack .../01-containerd.io_1.6.15-1_armhf.deb ...
Unpacking containerd.io (1.6.15-1) ...
Selecting previously unselected package dbus-user-session.
Preparing to unpack .../02-dbus-user-session_1.12.24-0+deb11u1_armhf.deb ...
Unpacking dbus-user-session (1.12.24-0+deb11u1) ...
Selecting previously unselected package docker-ce-cli.
Preparing to unpack .../03-docker-ce-cli_5%3a20.10.22~3-0~debian-bullseye_armhf.deb ...
Unpacking docker-ce-cli (5:20.10.22~3-0~debian-bullseye) ...
Selecting previously unselected package docker-ce.
Preparing to unpack .../04-docker-ce_5%3a20.10.22~3-0~debian-bullseye_armhf.deb ...
Unpacking docker-ce (5:20.10.22~3-0~debian-bullseye) ...
Selecting previously unselected package docker-ce-rootless-extras.
Preparing to unpack .../05-docker-ce-rootless-extras_5%3a20.10.22~3-0~debian-bullseye_armhf.deb ...
Unpacking docker-ce-rootless-extras (5:20.10.22~3-0~debian-bullseye) ...
Selecting previously unselected package docker-compose-plugin.
Preparing to unpack .../06-docker-compose-plugin_2.14.1~debian-bullseye_armhf.deb ...
Unpacking docker-compose-plugin (2.14.1~debian-bullseye) ...
Selecting previously unselected package liberror-perl.
Preparing to unpack .../07-liberror-perl_0.17029-1_all.deb ...
Unpacking liberror-perl (0.17029-1) ...
Selecting previously unselected package git-man.
Preparing to unpack .../08-git-man_1%3a2.30.2-1_all.deb ...
Unpacking git-man (1:2.30.2-1) ...
Selecting previously unselected package git.
Preparing to unpack .../09-git_1%3a2.30.2-1_armhf.deb ...
Unpacking git (1:2.30.2-1) ...
Selecting previously unselected package libltdl7:armhf.
Preparing to unpack .../10-libltdl7_2.4.6-15_armhf.deb ...
Unpacking libltdl7:armhf (2.4.6-15) ...
Selecting previously unselected package libslirp0:armhf.
Preparing to unpack .../11-libslirp0_4.4.0-1+deb11u2_armhf.deb ...
Unpacking libslirp0:armhf (4.4.0-1+deb11u2) ...
Selecting previously unselected package slirp4netns.
Preparing to unpack .../12-slirp4netns_1.0.1-2_armhf.deb ...
Unpacking slirp4netns (1.0.1-2) ...
Setting up liberror-perl (0.17029-1) ...
Setting up apparmor (2.13.6-10) ...
Created symlink /etc/systemd/system/sysinit.target.wants/apparmor.service → /lib/systemd/system/apparmor.service.
Setting up dbus-user-session (1.12.24-0+deb11u1) ...
Setting up containerd.io (1.6.15-1) ...
Created symlink /etc/systemd/system/multi-user.target.wants/containerd.service → /lib/systemd/system/containerd.service.
Job for containerd.service failed because a fatal signal was delivered causing the control process to dump core.
See "systemctl status containerd.service" and "journalctl -xe" for details.
Setting up docker-compose-plugin (2.14.1~debian-bullseye) ...
Setting up libltdl7:armhf (2.4.6-15) ...
Setting up docker-ce-cli (5:20.10.22~3-0~debian-bullseye) ...
Setting up libslirp0:armhf (4.4.0-1+deb11u2) ...
Setting up git-man (1:2.30.2-1) ...
Setting up docker-ce-rootless-extras (5:20.10.22~3-0~debian-bullseye) ...
Setting up slirp4netns (1.0.1-2) ...
Setting up docker-ce (5:20.10.22~3-0~debian-bullseye) ...
Created symlink /etc/systemd/system/multi-user.target.wants/docker.service → /lib/systemd/system/docker.service.
Created symlink /etc/systemd/system/sockets.target.wants/docker.socket → /lib/systemd/system/docker.socket.
A dependency job for docker.service failed. See 'journalctl -xe' for details.
invoke-rc.d: initscript docker, action "start" failed.
● docker.service - Docker Application Container Engine
     Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: enabled)
     Active: inactive (dead)
TriggeredBy: ● docker.socket
       Docs: https://docs.docker.com

Jan 14 18:29:28 pi1 systemd[1]: Dependency failed for Docker Application Container Engine.
Jan 14 18:29:28 pi1 systemd[1]: docker.service: Job docker.service/start failed with result 'dependency'.
dpkg: error processing package docker-ce (--configure):
 installed docker-ce package post-installation script subprocess returned error exit status 1
Setting up git (1:2.30.2-1) ...
Processing triggers for man-db (2.9.4-2) ...
Processing triggers for libc-bin (2.31-13+rpt2+rpi1+deb11u5) ...
Errors were encountered while processing:
 docker-ce
E: Sub-process /usr/bin/dpkg returned an error code (1)

但是服务日志也没什​​么帮助,只是显示SEGV:

pi@pi1:~ $ systemctl status containerd.service
● containerd.service - containerd container runtime
     Loaded: loaded (/lib/systemd/system/containerd.service; enabled; vendor preset: enabled)
     Active: activating (auto-restart) (Result: core-dump) since Sat 2023-01-14 21:40:06 CET; 2s ago
       Docs: https://containerd.io
    Process: 21854 ExecStartPre=/sbin/modprobe overlay (code=exited, status=0/SUCCESS)
    Process: 21855 ExecStart=/usr/bin/containerd (code=dumped, signal=SEGV)
   Main PID: 21855 (code=dumped, signal=SEGV)
        CPU: 602ms

Jan 14 21:40:06 pi1 systemd[1]: Failed to start containerd container runtime.
pi@pi1:~ $ journalctl -xe
Jan 14 22:20:19 pi1 systemd[1]: Stopped containerd container runtime.
░░ Subject: A stop job for unit containerd.service has finished
░░ Defined-By: systemd
░░ Support: https://www.debian.org/support
░░
░░ A stop job for unit containerd.service has finished.
░░
░░ The job identifier is 4073 and the job result is done.
Jan 14 22:20:19 pi1 systemd[1]: Starting containerd container runtime...
░░ Subject: A start job for unit containerd.service has begun execution
░░ Defined-By: systemd
░░ Support: https://www.debian.org/support
░░
░░ A start job for unit containerd.service has begun execution.
░░
░░ The job identifier is 4073.
Jan 14 22:20:20 pi1 systemd[1]: containerd.service: Main process exited, code=dumped, status=11/SEGV
░░ Subject: Unit process exited
░░ Defined-By: systemd
░░ Support: https://www.debian.org/support
░░
░░ An ExecStart= process belonging to unit containerd.service has exited.
░░
░░ The process' exit code is 'dumped' and its exit status is 11.
Jan 14 22:20:20 pi1 systemd[1]: containerd.service: Failed with result 'core-dump'.
░░ Subject: Unit failed
░░ Defined-By: systemd
░░ Support: https://www.debian.org/support
░░
░░ The unit containerd.service has entered the 'failed' state with result 'core-dump'.
Jan 14 22:20:20 pi1 systemd[1]: Failed to start containerd container runtime.
░░ Subject: A start job for unit containerd.service has failed
░░ Defined-By: systemd
░░ Support: https://www.debian.org/support
░░
░░ A start job for unit containerd.service has finished with a failure.
░░
░░ The job identifier is 4073 and the job result is failed.

我尝试重新启动(此问题在其他出现的问题中也有推荐)安装成功后,问题仍然存在。

我使用完全相同的操作系统映像(Raspi OS Lite 32 位)和安装命令在 Raspi 2B 上设置了 docker,运行完美。我尝试了常规的 Raspi OS 32 位(带桌面),但出现了同样的错误。所以这一定与 Raspi 1B 有关。这里的问题是什么?

答案1

我遇到了同样的问题并使用便利脚本安装对我有用。

文档还提到,Raspbian 不支持存储库安装,但我一开始忽略了这一点。

相关内容