Ubuntu VM 从 22 升级到 24,使用 discourse Docker

我在 Ubuntu 上运行了一个 Discourse 实例。我有一段时间没有登录系统了,它需要通过 do-release-upgrade 进行升级。

这似乎运行正常,但在重启后 Discourse 不工作了,并且在执行 systemct restart docker journalctl 时显示:

Nov 07 16:53:58 discourse systemd[1]: docker.service: Scheduled restart job, restart counter is at 2.
Nov 07 16:53:58 discourse systemd[1]: Starting docker.service - Docker Application Container Engine...
Nov 07 16:53:58 discourse dockerd[1566]: time="2024-11-07T16:53:58.855938951-05:00" level=info msg="systemd-resolved is running, so using resolvconf: /run/systemd/resolve/resolv.conf"
Nov 07 16:53:58 discourse dockerd[1566]: time="2024-11-07T16:53:58.858965305-05:00" level=info msg="parsed scheme: \"unix\"" module=grpc
Nov 07 16:53:58 discourse dockerd[1566]: time="2024-11-07T16:53:58.859013907-05:00" level=info msg="scheme \"unix\" not registered, fallback to default scheme" module=grpc
Nov 07 16:53:58 discourse dockerd[1566]: time="2024-11-07T16:53:58.859094653-05:00" level=info msg="parsed scheme: \"unix\"" module=grpc
Nov 07 16:53:58 discourse dockerd[1566]: time="2024-11-07T16:53:58.859114038-05:00" level=info msg="scheme \"unix\" not registered, fallback to default scheme" module=grpc
Nov 07 16:53:58 discourse dockerd[1566]: time="2024-11-07T16:53:58.864502036-05:00" level=info msg="[graphdriver] using prior storage driver: overlay2"
Nov 07 16:53:58 discourse dockerd[1566]: time="2024-11-07T16:53:58.871019185-05:00" level=info msg="Graph migration to content-addressability took 0.00 seconds"
Nov 07 16:53:58 discourse dockerd[1566]: time="2024-11-07T16:53:58.871656775-05:00" level=warning msg="Your kernel does not support cgroup memory limit"
Nov 07 16:53:58 discourse dockerd[1566]: time="2024-11-07T16:53:58.871680667-05:00" level=warning msg="Unable to find cpu cgroup in mounts"
Nov 07 16:53:58 discourse dockerd[1566]: time="2024-11-07T16:53:58.871693302-05:00" level=warning msg="Unable to find blkio cgroup in mounts"
Nov 07 16:53:58 discourse dockerd[1566]: time="2024-11-07T16:53:58.871704545-05:00" level=warning msg="Unable to find cpuset cgroup in mounts"
Nov 07 16:53:58 discourse dockerd[1566]: time="2024-11-07T16:53:58.871760062-05:00" level=warning msg="mountpoint for pids not found"
Nov 07 16:53:58 discourse dockerd[1566]: Error starting daemon: Devices cgroup isn't mounted
root@discourse:/var/discourse# uname -r
6.8.0-48-generic
root@discourse:/var/discourse# cat /etc/os-release
PRETTY_NAME="Ubuntu 24.04.1 LTS"
NAME="Ubuntu"
VERSION_ID="24.04"
VERSION="24.04.1 LTS (Noble Numbat)"
VERSION_CODENAME=noble
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
UBUNTU_CODENAME=noble
LOGO=ubuntu-logo

rebuild 是我意识到以上所有问题的契机

root@discourse:~# cd /var/discourse
root@discourse:/var/discourse# ./launcher rebuild app
Device "docker0" does not exist.
Cannot connect to the docker daemon - verify it is running and you have access


这真的是内核的问题吗?我不确定如何继续,当然,当我输入 do-release-upgrade 时,我没有备份 discourse DB,我发布了一些最近的重要笔记,我想找回来 :face_with_peeking_eye:

你已经重建了应用程序吗?

@omarfilip
抱歉,一开始忘了添加。这让我开始研究为什么 docker 一开始就没运行

root@discourse:~# cd /var/discourse
root@discourse:/var/discourse# ./launcher rebuild app
设备“docker0”不存在。
无法连接到 docker 守护进程 - 请验证它是否正在运行并且您有权访问

看看这是否能给你一些启发:

它并不需要你执行 do-release-upgrade,而是建议你这样做。

如建议的,docker 已损坏。你应该修复它。一种可能有效也可能无效的方法是

curl https://get.docker.com | sh

你会收到一些警告,但我最近使用过它。

然后你可以看看这个是否成功:

docker run hello-world