
Ubuntu日本語フォーラム
ログインしていません。
"apt update && apt upgrade"を行うと、docker-ceのアップデートでエラーになります。
下記の状況です。
対処法がわかりませんでしょうか。
OS:Xubuntu 20.04
# uname -a
Linux pc17 5.15.0-76-generic #83~20.04.1-Ubuntu SMP Wed Jun 21 20:23:31 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
"apt update && apt upgrade"でのエラー出力
docker-ce (5:24.0.4-1~ubuntu.20.04~focal) を設定しています ...
Job for docker.service failed because the control process exited with error code.
See "systemctl status docker.service" and "journalctl -xe" for details.
invoke-rc.d: initscript docker, action "restart" failed.
● docker.service - Docker Application Container Engine
Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset:
enabled)
Active: activating (auto-restart) (Result: exit-code) since Sun 2023-07-16 2
2:55:10 JST; 12ms ago
TriggeredBy: ● docker.socket
Docs: https://docs.docker.com
Process: 17521 ExecStart=/usr/bin/dockerd -H fd:// --containerd=/run/containe
rd/containerd.sock (code=exited, status=1/FAILURE)
Main PID: 17521 (code=exited, status=1/FAILURE)
7月 16 22:55:10 pc17 systemd[1]: docker.service: Main process exited, code=exite
d, status=1/FAILURE
7月 16 22:55:10 pc17 systemd[1]: docker.service: Failed with result 'exit-code'.
7月 16 22:55:10 pc17 systemd[1]: Failed to start Docker Application Container En
gine.
dpkg: パッケージ docker-ce の処理中にエラーが発生しました (--configure):
installed docker-ce package post-installation script subprocess returned error e
xit status 1
python3-debian (0.1.36ubuntu1.1) を設定しています ...
処理中にエラーが発生しました:
docker-ce
E: Sub-process /usr/bin/dpkg returned an error code (1)
# systemctl status docker.service
● docker.service - Docker Application Container Engine
Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: enabled)
Active: activating (start) since Sun 2023-07-16 23:20:24 JST; 29s ago
TriggeredBy: ● docker.socket
Docs: https://docs.docker.com
Main PID: 20784 (dockerd)
Tasks: 11
Memory: 25.8M
CGroup: /system.slice/docker.service
└─20784 /usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock
7月 16 23:20:24 pc17 systemd[1]: Starting Docker Application Container Engine...
7月 16 23:20:24 pc17 dockerd[20784]: time="2023-07-16T23:20:24.885259081+09:00" level=info msg="Starting up"
7月 16 23:20:24 pc17 dockerd[20784]: time="2023-07-16T23:20:24.887799326+09:00" level=info msg="detected 127.0.0.53 nameserver, assuming sys>
# journalctl -xe
-- A stop job for unit containerd.service has finished.
--
-- The job identifier is 147269 and the job result is done.
7月 16 23:12:27 pc17 systemd[1]: Starting containerd container runtime...
-- Subject: A start job for unit containerd.service has begun execution
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- A start job for unit containerd.service has begun execution.
--
-- The job identifier is 147269.
7月 16 23:12:27 pc17 systemd[20014]: containerd.service: Failed to execute command: No such file or directory
7月 16 23:12:27 pc17 systemd[20014]: containerd.service: Failed at step EXEC spawning /usr/bin/containerd: No such file or directory
-- Subject: Process /usr/bin/containerd could not be executed
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- The process /usr/bin/containerd could not be executed and failed.
--
-- The error number returned by this process is ERRNO.
7月 16 23:12:27 pc17 systemd[1]: containerd.service: Main process exited, code=exited, status=203/EXEC
-- Subject: Unit process exited
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- An ExecStart= process belonging to unit containerd.service has exited.
--
-- The process' exit code is 'exited' and its exit status is 203.
7月 16 23:12:27 pc17 systemd[1]: containerd.service: Failed with result 'exit-code'.
-- Subject: Unit failed
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- The unit containerd.service has entered the 'failed' state with result 'exit-code'.
7月 16 23:12:27 pc17 systemd[1]: Failed to start containerd container runtime.
-- Subject: A start job for unit containerd.service has failed
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- A start job for unit containerd.service has finished with a failure.
--
-- The job identifier is 147269 and the job result is failed.
# 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: exit-code) since Sun 2023-07-16 23:15:09 JST; 3s ago
Docs: https://containerd.io
Process: 20214 ExecStartPre=/sbin/modprobe overlay (code=exited, status=0/SUCCESS)
Process: 20215 ExecStart=/usr/bin/containerd (code=exited, status=203/EXEC)
Main PID: 20215 (code=exited, status=203/EXEC)
7月 16 23:15:09 pc17 systemd[1]: containerd.service: Main process exited, code=exited, status=203/EXEC
7月 16 23:15:09 pc17 systemd[1]: containerd.service: Failed with result 'exit-code'.
7月 16 23:15:09 pc17 systemd[1]: Failed to start containerd container runtime.
# ls /usr/bin/containerd
ls: '/usr/bin/containerd' にアクセスできません: そのようなファイルやディレクトリはありません
オフライン
sudo apt reinstall containerd.io
を実行したら、/usr/bin/containerd が配備されますか?
オフライン
elliptic様、ありがとうございます。
"sudo apt reinstall containerd.io"実行後の/usr/bin/containerdを下記に御報告致します。
$ sudo apt reinstall containerd.io パッケージリストを読み込んでいます... 完了 依存関係ツリーを作成しています 状態情報を読み取っています... 完了 アップグレード: 0 個、新規インストール: 0 個、再インストール: 1 個、削除: 0 個、保留: 1 個。 1 個のパッケージが完全にインストールまたは削除されていません。 28.3 MB のアーカイブを取得する必要があります。 この操作後に追加で 0 B のディスク容量が消費されます。 取得:1 https://download.docker.com/linux/ubuntu focal/stable amd64 containerd.io amd64 1.6.21-1 [28.3 MB] 28.3 MB を 3秒 で取得しました (10.3 MB/s) (データベースを読み込んでいます ... 現在 260087 個のファイルとディレクトリがイン ストールされています。) .../containerd.io_1.6.21-1_amd64.deb を展開する準備をしています ... containerd.io (1.6.21-1) で (1.6.21-1 に) 上書き展開しています ... containerd.io (1.6.21-1) を設定しています ... docker-ce (5:24.0.4-1~ubuntu.20.04~focal) を設定しています ... man-db (2.9.1-1) のトリガを処理しています ... $ ls -l /usr/bin/containerd -rwxr-xr-x 1 root root 52271176 5月 6 04:16 /usr/bin/containerd
オフライン
/usr/bin/containerd が存在する状態で sudo apt upgrade したとき
状況に変化はありますか?
オフライン
"sudo apt upgrade"を実行 した状況は下記でした。
いくつかのソフトがアップグレードされるかと思いましたが、何もアップグレードされていません。
直ったのでしょうかね?
$ sudo apt update $ sudo apt upgrade パッケージリストを読み込んでいます... 完了 依存関係ツリーを作成しています 状態情報を読み取っています... 完了 アップグレードパッケージを検出しています... 完了 Get more security updates through Ubuntu Pro with 'esm-apps' enabled: vlc-bin vlc-plugin-video-output libavformat58 exo-utils libavfilter7 ffmpeg vlc-plugin-samba node-hosted-git-info libswresample3 vlc-plugin-qt libgegl-0.4-0 libzmq5 python2.7-minimal vlc-plugin-skins2 libgegl-common vlc-plugin-visualization vlc-l10n python2.7 libexo-1-0 vlc-plugin-notify libvlc5 libexo-2-0 libmediainfo0v5 libpostproc55 libvlccore9 libvlc-bin node-tar libgsasl7 libavcodec58 libexo-common vlc libavutil56 vlc-data libavdevice58 libswscale5 libopenexr24 libsdl2-2.0-0 libmysofa1 vlc-plugin-video-splitter libpython2.7-minimal vlc-plugin-base libpython2.7-stdlib libavresample4 libexo-helpers Learn more about Ubuntu Pro at https://ubuntu.com/pro # # An OpenSSL vulnerability has recently been fixed with USN-6188-1 & 6119-1: # CVE-2023-2650: possible DoS translating ASN.1 object identifiers. # Ensure you have updated the package to its latest version. # 以下のパッケージは保留されます: android-studio アップグレード: 0 個、新規インストール: 0 個、削除: 0 個、保留: 1 個。
オフライン
原因: アンインストールしたわけでもないのに /usr/bin/containerd が
消失していた。 apt の記録上はインストール済みなので自己修復されずに
呼び出された時点でエラーになった。
対処: 明示的に containerd.io を 強制上書きインストールすることで
あるべきファイルを補った。
#3
containerd.io (1.6.21-1) を設定しています ...
docker-ce (5:24.0.4-1~ubuntu.20.04~focal) を設定しています ...
の時点で、 保留されていた更新が完了し、最新バージョンの docker-ceが
使える状態のはずです。
すべて更新済みで apt upgrade の対象 0個で正常です。
docker-ceについてはこれで解決だと思いますが
なぜファイルが消えたのかは不明なので 他にも壊れたファイルがないか
注意しながら使用してください。
オフライン
elliptic様、ありがとうございます。
"apt reinstall"がわかっても"containerd.io"はわかりにくいと思いますが、どうしてわかるのでしょうか?
オフライン
ファイルがどのパッケージ由来かを調べるには
dpkg -S パス名
を、 パッケージがどんなファイルをインストールするかは
dpkg -L パッケージ名
で調べます。
dpkg -S /usr/bin/containerd dpkg -L containerd.io
この方法はインストール済みのパッケージについてだけ有効です。
未インストールのパッケージについて調べたいときは、apt-file 等のツールを
インストールして使います。
私は Dockerを使ってないので docker.com のリポジトリを
gio cat https://download.docker.com/linux/ubuntu/dists/focal/stable/Contents-amd64 | grep bin/containerd
で検索して containerd.ioパッケージが /usr/bin/containerd のファイルをインストールすることを確認してから
#2 で containerd.ioの再インストールを提案しました。
オフライン
elliptic様、わざわざリポジトリを調べる手間をかけて下さり、ありがとうございます。
dpkgのオプションのみならず、gioという便利なコマンドを知ることができました。
オフライン