Proxmoxにてreopen fd 8: permission denied: unknown への対処法
はじめに
この記事は下記記事の続編にあたります.
結論
Proxmox VEホストマシンを8.xから9.xにアップグレードすることで,lxc-pveパッケージが6.0.5-3に更新できるようになり,LXCコンテナ内でDockerを正常に起動できるようになった.
問題の概要
Proxmox8.3 上のLXCコンテナでDockerを動かしていたところ,突然全Dockerコンテナが停止した.

docker compose upを実行すると

Error response from daemon: failed to create task for container: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: error during container init: open sysctl net.ipv4.ip_unprivileged_port_start file: reopen fd 8: permission denied: unknown
というエラーが出て起動できない.
一時的な対処法
containerd.ioのバージョンを1.7.29から1.7.28にダウングレードすることで一時的に解決
ooo@ctf:~# apt install containerd.io=1.7.28-1~ubuntu.24.04~noble
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following packages will be DOWNGRADED:
containerd.io
0 upgraded, 0 newly installed, 1 downgraded, 0 to remove and 0 not upgraded.
Need to get 31.9 MB of archives.
After this operation, 119 kB disk space will be freed.
Do you want to continue? [Y/n] y
Get:1 https://download.docker.com/linux/ubuntu noble/stable amd64 containerd.io amd64 1.7.28-1~ubuntu.24.04~noble [31.9 MB]
Fetched 31.9 MB in 0s (82.8 MB/s)
dpkg: warning: downgrading containerd.io from 1.7.29-1~ubuntu.24.04~noble to 1.7.28-1~ubuntu.24.04~noble
(Reading database ... 21097 files and directories currently installed.)
Preparing to unpack .../containerd.io_1.7.28-1~ubuntu.24.04~noble_amd64.deb ...
Unpacking containerd.io (1.7.28-1~ubuntu.24.04~noble) over (1.7.29-1~ubuntu.24.04~noble) ...
Setting up containerd.io (1.7.28-1~ubuntu.24.04~noble) ...
Processing triggers for man-db (2.12.0-4build2) ...
しかしながら,これはあくまで一時的な対処法であり,根本的な解決にはならない.
Github上などで行われた様々な議論
この問題については,Github上などで様々な議論が行われていた.
これらの議論の中から問題への対処法は大きく3つに分けられる
- containerd.ioのバージョンを1.7.28-1にダウングレードする
- AppArmorの設定を変更する
- Proxmox VEホストマシンを8.xから9.xにアップグレードする
このうち,1については自身で検証ができており,2についても他の方が記事として執筆してくださっている.
1についてはアップデートを止めてしまい,根本的な対策にならない.2については,上記記事にも記載されているが,
という注意書きがあり,セキュリティ上のリスクがあることが示唆されている.
そのため,今回は3のProxmox VEホストマシンを8.xから9.xにアップグレードした場合の挙動を確認した.
なぜアップグレードが必要なのか
議論の中で下記のコメントがあり
sadly lxc-pve 6.0.5-3 isnt available on proxmox 8.4
edit:
Hello world, this is for the next sorry sucker who finds this issue on here.
My solution was to update Proxmox to 9, thankfully no issues with my upgrade. But as of today the 19th of November, PVE 9.1 came out and some scripts, for example the > post-install script, don't support anything but 8.x and 9.0. Therefore you may have some issues with other things today.
Also I want to mention this problem with Docker in an LXC was not limited to Debian or Ubuntu but also affected my systems running Alpine.
After manually starting Docker on each container again I'm back in business.
こちらについて調査をしたところ,下記2記事がヒットした.
これらのトラブルは既にProxmox側で認知されており,6.0.5-2以降に更新することで解決する.しかし,Proxmox VE 8.4ではlxc-pveパッケージの最新版が6.0.0-1であり,問題が解決しない.
root@vm:~# apt list --installed
Listing... Done
aardvark-dns/oldstable,now 1.4.0-3 amd64 [installed,automatic]
adduser/oldstable,now 3.134 all [installed]
apparmor/oldstable,now 3.0.8-3 amd64 [installed]
...
lxc-pve/stable,now 6.0.0-1 amd64 [installed]
とのため,Proxmoxホストマシンを9.xにアップグレードすることで,lxc-pveパッケージが6.0.5-3に更新可能であると考えられる.
実際にtrixieリポジトリを追加し,apt updateを実行すると,lxc-pveパッケージが6.0.5-3に更新可能であることが確認できた.
root@vm:~# apt update
Hit:1 http://security.debian.org bookworm-security InRelease
Hit:2 http://ftp.jp.debian.org/debian bookworm InRelease
Hit:3 https://nvidia.github.io/libnvidia-container/stable/deb/amd64 InRelease
Hit:4 http://ftp.jp.debian.org/debian bookworm-updates InRelease
Hit:5 http://download.proxmox.com/debian/pve bookworm InRelease
Get:6 http://download.proxmox.com/debian/pve trixie InRelease [2,771 B] # trixieリポジトリを取得させている
Get:7 http://download.proxmox.com/debian/pve trixie/pve-no-subscription amd64 Packages [284 kB] # trixieリポジトリを取得させている
Fetched 287 kB in 1s (230 kB/s)
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
80 packages can be upgraded. Run 'apt list --upgradable' to see them.
root@vm:~# apt list --installed
Listing... Done
aardvark-dns/oldstable,now 1.4.0-3 amd64 [installed,automatic]
adduser/oldstable,now 3.134 all [installed]
...
lxc-pve/stable,now 6.0.0-1 amd64 [installed,upgradable to: 6.0.5-3]
以上より,Proxmox VEホストマシンを8.xから9.xにアップグレードすることになった.
Proxmox VEホストマシンのアップグレード手順
本手順はProxmoxの公式Wikiに記載されている手順を参考にし,実施することが可能である.
また当方で実施した手順については,別記事としてまとめました
アップグレード後の挙動
Proxmox VEホストマシンを8.xから9.xにアップグレードした後,LXCコンテナ内でdocker compose upを実行したところ,問題なくDockerコンテナが起動した.

コンテナ内に入り,apt list --installedでcontainerd.ioのバージョンを確認したところ,2.1.5-1で実行されていることが確認できた.
ooo@ctf:~$ apt list --installed
Listing... Done
adduser/noble,now 3.137ubuntu1 all [installed]
apache2-utils/noble-updates,noble-security,now 2.4.58-1ubuntu8.8 amd64 [installed]
apparmor/noble-updates,now 4.0.1really4.0.1-0ubuntu0.24.04.4 amd64 [installed]
apt-utils/noble-updates,now 2.8.3 amd64 [installed]
apt/noble-updates,now 2.8.3 amd64 [installed]
base-files/noble-updates,now 13ubuntu10.3 amd64 [installed]
base-passwd/noble,now 3.6.3build1 amd64 [installed]
bash-completion/noble,now 1:2.11-8 all [installed]
bash/noble,now 5.2.21-2ubuntu4 amd64 [installed]
bind9-dnsutils/noble-updates,noble-security,now 1:9.18.39-0ubuntu0.24.04.2 amd64 [installed]
bind9-host/noble-updates,noble-security,now 1:9.18.39-0ubuntu0.24.04.2 amd64 [installed]
bind9-libs/noble-updates,noble-security,now 1:9.18.39-0ubuntu0.24.04.2 amd64 [installed]
bsdextrautils/noble-updates,now 2.39.3-9ubuntu6.3 amd64 [installed]
bsdutils/noble-updates,now 1:2.39.3-9ubuntu6.3 amd64 [installed]
busybox-static/noble-updates,noble-security,now 1:1.36.1-6ubuntu3.1 amd64 [installed]
ca-certificates/noble,now 20240203 all [installed]
command-not-found/noble,now 23.04.0 all [installed]
console-setup-linux/noble,now 1.226ubuntu1 all [installed]
console-setup/noble,now 1.226ubuntu1 all [installed]
containerd.io/noble,now 2.1.5-1~ubuntu.24.04~noble amd64 [installed]
まとめ
Proxmox VEホストマシンを8.xから9.xにアップグレードすることで,lxc-pveパッケージが6.0.5-3に更新できるようになり,LXCコンテナ内でDockerを正常に起動できるようになった.
今後Proxmox 8.x系にも同様にアップデートを提供してくれる可能性もあるため,アップグレードがリスクであれば,これまで通り一時的な対応を取ることも手である
Discussion