[debian-users 00761] Bullseyeにアップグレード後、systemdの動作がおかしい
小寺と申します 先日、Debianのアップグレードを行いました。JessieからStretch、Buster を経てBullseyeへという、かなり強引なやり方でしたが、kDEデスクトップを 含め、それなりに普段使いできる状態にはなりました。 が、どうも肝心のsystemdがおかしな状態になっていて、困っています。主 な問題は下記2つです。 ●systemctl statusが機能しない apache2が入っている状態で、下記のようになります。下記のように、 syslogやsshdなどでも同じ結果になります。rootで実行しても同じです。 ------------------------------------------------------------ ~$ systemctl status apache2.service Failed to parse message: そのようなデバイスやアドレスはありません ~$ systemctl status sshd.service Failed to parse message: そのようなデバイスやアドレスはありません ~$ systemctl status syslog.service Failed to parse message: そのようなデバイスやアドレスはありません ------------------------------------------------------------ ●再インストールすると、古い設定ファイルが使われる 試しにsystemdを再インストールすると、設定の途中で奇妙な古いファイル "/usr/bin/apt-listchanges"が使われます。 最初にBullseyeにアップグレードする際にもこのファイルでひっかかったの で気がついたのですが、中身はPython 2.7のスクリプトです。またこのスクリ プトの中では"import anydbm"とされているのですが、anydbm.pyはpython2.7 のツリーにあるだけで、python3系には存在しないようです(現在、 "/usr/bin/apt-listchanges"は別の場所に移動したため、下記では"No such file"になっています)。 さらに、下記では、既存の設定ファイルの内容が理解できていないようです。 これも奇妙というか、何が原因かわからない状態です。 -------------------------------------------- [systemd.conf:29] Unknown command type 'a'. -------------------------------------------- ・再インストールの結果 ------------------------------------------------------------ ~# apt install --reinstall systemd Reading package lists... Done Building dependency tree... Done Reading state information... Done 0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 1 not upgraded. 1 not fully installed or removed. Need to get 4495 kB of archives. After this operation, 0 B of additional disk space will be used. Get:1 http://ftp.debian.org/debian bullseye/main amd64 systemd amd64 247.3-6 [4495 kB] Fetched 4495 kB in 2s (2128 kB/s) /bin/sh: line 1: /usr/bin/apt-listchanges: No such file or directory (Reading database ... 896033 files and directories currently installed.) Preparing to unpack .../systemd_247.3-6_amd64.deb ... Unpacking systemd (247.3-6) over (247.3-6) ... Setting up systemd (247.3-6) ... [home.conf:10] Unknown command type 'Q'. [home.conf:11] Unknown command type 'q'. [journal-nocow.conf:25] Unknown command type 'h'. [journal-nocow.conf:26] Unknown command type 'h'. [journal-nocow.conf:27] Unknown command type 'h'. [systemd.conf:29] Unknown command type 'a'. [systemd.conf:30] Unknown command type 'a'. [systemd.conf:31] Unknown command type 'a'. [systemd.conf:37] Unknown command type 'a'. [systemd.conf:38] Unknown command type 'a'. [systemd.conf:39] Unknown command type 'a'. [var.conf:10] Unknown command type 'q'. Setting up docker-ce (5:20.10.12~3-0~debian-bullseye) ... Job for docker.service failed. See 'systemctl status docker.service' and 'journalctl -xn' for details. invoke-rc.d: initscript docker, action "restart" failed. Failed to parse message: No such device or address dpkg: error processing package docker-ce (--configure): installed docker-ce package post-installation script subprocess returned error exit status 1 Processing triggers for man-db (2.9.4-2) ... Processing triggers for dbus (1.12.20-2) ... Errors were encountered while processing: docker-ce needrestart is being skipped since dpkg has failed E: Sub-process /usr/bin/dpkg returned an error code (1) ------------------------------------------------------------ ※Dockerの設定に失敗しているのは別の問題だと思いますので、無視してくだ さい。 以上につきまして、修復方法など、ご存知でしたらお教え頂ければと思います。 なお、systemctl restartや、systemctl hibernateなどは正常に動いていま す。システムの起動も、もちろん正常に機能しています。 よろしくお願いいたします。 ---*---*---*---*---*---*--- テクスト 小寺 E-mail: odera@text.co.jp Tel: 03-3269-9173 ---*---*---*---*---*---*---
佐々木です.
状況が再現できた・解決できたわけではないのであまりお役に立てませんが.
On Fri, 21 Jan 2022 17:51:51 +0900,
Masao Odera <odera@text.co.jp> wrote:
>
> 先日、Debianのアップグレードを行いました。JessieからStretch、Buster
> を経てBullseyeへという、かなり強引なやり方でしたが、kDEデスクトップを
> 含め、それなりに普段使いできる状態にはなりました。
Jessie からいきなり Bullseye へアップグレードしたのではなく, Jessie →
Stretch → Buster → Bullseye と順に更新したのであれば, 想定されている手
段です.
> が、どうも肝心のsystemdがおかしな状態になっていて、困っています。主
> な問題は下記2つです。
確認として systemctl restart, systemctl hibernate は動作されているという
ことですが, そもそも更新後に kernel の更新と再起動(reboot)はされています
よね? 現状動作している kernel の version は幾つでしょうか?
> ●systemctl statusが機能しない
> syslogやsshdなどでも同じ結果になります。rootで実行しても同じです。
> ------------------------------------------------------------
> ~$ systemctl status apache2.service
> Failed to parse message: そのようなデバイスやアドレスはありません
- snip -
一つ目は dbus と通信できていない場合に見られるメッセージに思えます.
Jessie → Stretch の更新時の注意点として, Stretch 以降のパッケージ群が
PIE を有効にしてビルドされている点があります. もし再起動せずに Jessie の
頃の古いカーネルのまま動いている場合には, daemon program の多くがセグメ
ンテーションフォルトをおこし, 正常に動作しない事が知られています.
https://www.debian.org/releases/stretch/amd64/release-notes/ch-information.ja.html#pie-is-now-default
> ●再インストールすると、古い設定ファイルが使われる
- snip -
> さらに、下記では、既存の設定ファイルの内容が理解できていないようです。
> これも奇妙というか、何が原因かわからない状態です。
> --------------------------------------------
> [systemd.conf:29] Unknown command type 'a'.
> --------------------------------------------
apt-listchanges は不要なら抜いておくのが良いですが, それはそれとして.
エラーで出ている systemd.conf, home.conf, journal-nocow.conf などは
systemd-tmpfiles.service の設定ファイルであり, /usr/lib/tmpfiles.d/ 以下
の設定ファイル群ですね. systemd 本体の設定とは別で, tmpfile を含めたファ
イルのマウントの設定です.
さて, なんでこれが unknown command type 扱いになっているのかな…
というわけで, あまりお役に立てませんが, 参考までに.
> apache2が入っている状態で、下記のようになります。下記のように、
> syslogやsshdなどでも同じ結果になります。rootで実行しても同じです。
> ------------------------------------------------------------
> ~$ systemctl status apache2.service
> Failed to parse message: そのようなデバイスやアドレスはありません
> ~$ systemctl status sshd.service
> Failed to parse message: そのようなデバイスやアドレスはありません
> ~$ systemctl status syslog.service
> Failed to parse message: そのようなデバイスやアドレスはありません
> ------------------------------------------------------------
>
> ●再インストールすると、古い設定ファイルが使われる
> 試しにsystemdを再インストールすると、設定の途中で奇妙な古いファイル
> "/usr/bin/apt-listchanges"が使われます。
> 最初にBullseyeにアップグレードする際にもこのファイルでひっかかったの
> で気がついたのですが、中身はPython 2.7のスクリプトです。またこのスクリ
> プトの中では"import anydbm"とされているのですが、anydbm.pyはpython2.7
> のツリーにあるだけで、python3系には存在しないようです(現在、
> "/usr/bin/apt-listchanges"は別の場所に移動したため、下記では"No such
> file"になっています)。
> さらに、下記では、既存の設定ファイルの内容が理解できていないようです。
> これも奇妙というか、何が原因かわからない状態です。
> --------------------------------------------
> [systemd.conf:29] Unknown command type 'a'.
> --------------------------------------------
>
> ・再インストールの結果
> ------------------------------------------------------------
> ~# apt install --reinstall systemd
> Reading package lists... Done
> Building dependency tree... Done
> Reading state information... Done
> 0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 1 not upgraded.
> 1 not fully installed or removed.
> Need to get 4495 kB of archives.
> After this operation, 0 B of additional disk space will be used.
> Get:1 http://ftp.debian.org/debian bullseye/main amd64 systemd amd64 247.3-6 [4495 kB]
> Fetched 4495 kB in 2s (2128 kB/s)
> /bin/sh: line 1: /usr/bin/apt-listchanges: No such file or directory
> (Reading database ... 896033 files and directories currently installed.)
> Preparing to unpack .../systemd_247.3-6_amd64.deb ...
> Unpacking systemd (247.3-6) over (247.3-6) ...
> Setting up systemd (247.3-6) ...
> [home.conf:10] Unknown command type 'Q'.
> [home.conf:11] Unknown command type 'q'.
> [journal-nocow.conf:25] Unknown command type 'h'.
> [journal-nocow.conf:26] Unknown command type 'h'.
> [journal-nocow.conf:27] Unknown command type 'h'.
> [systemd.conf:29] Unknown command type 'a'.
> [systemd.conf:30] Unknown command type 'a'.
> [systemd.conf:31] Unknown command type 'a'.
> [systemd.conf:37] Unknown command type 'a'.
> [systemd.conf:38] Unknown command type 'a'.
> [systemd.conf:39] Unknown command type 'a'.
> [var.conf:10] Unknown command type 'q'.
> Setting up docker-ce (5:20.10.12~3-0~debian-bullseye) ...
> Job for docker.service failed. See 'systemctl status docker.service' and 'journalctl -xn' for details.
> invoke-rc.d: initscript docker, action "restart" failed.
> Failed to parse message: No such device or address
> dpkg: error processing package docker-ce (--configure):
> installed docker-ce package post-installation script subprocess returned error exit status 1
> Processing triggers for man-db (2.9.4-2) ...
> Processing triggers for dbus (1.12.20-2) ...
> Errors were encountered while processing:
> docker-ce
> needrestart is being skipped since dpkg has failed
> E: Sub-process /usr/bin/dpkg returned an error code (1)
> ------------------------------------------------------------
> ※Dockerの設定に失敗しているのは別の問題だと思いますので、無視してくだ
> さい。
>
> 以上につきまして、修復方法など、ご存知でしたらお教え頂ければと思います。
>
> なお、systemctl restartや、systemctl hibernateなどは正常に動いていま
> す。システムの起動も、もちろん正常に機能しています。
>
> よろしくお願いいたします。
--
Youhei SASAKI <uwabami@gfd-dennou.org>
<uwabami@debian.or.jp>
GPG fingerprint:
4096/RSA: 66A4 EA70 4FE2 4055 8D6A C2E6 9394 F354 891D 7E07
佐々木様 助言を頂き、ありがとうございます。昨日は仕事で遅くなったうえにVNC接 続のトラブルに見舞われ(まだ不調ですが)、返信できませんでした。すみま せん。 ◇ In original message `[debian-users 00762] Re: Bullseyeにアップグレード後、systemdの動作がおかしい' ◇ ◇ Fri, 21 Jan 2022 22:46:29 +0900 ◇ ◇ Youhei SASAKI <uwabami@gfd-dennou.org> wrote ◇ > 佐々木です. > > 状況が再現できた・解決できたわけではないのであまりお役に立てませんが. > > On Fri, 21 Jan 2022 17:51:51 +0900, > Masao Odera <odera@text.co.jp> wrote: > > > > 先日、Debianのアップグレードを行いました。JessieからStretch、Buster > > を経てBullseyeへという、かなり強引なやり方でしたが、kDEデスクトップを > > 含め、それなりに普段使いできる状態にはなりました。 > > Jessie からいきなり Bullseye へアップグレードしたのではなく, Jessie → > Stretch → Buster → Bullseye と順に更新したのであれば, 想定されている手 > 段です. はい。ただ、各段階での動作確認がかなり大雑把なものだったため、どの段 階でsystemdの不具合が起きたのか不明のまま進んでしまったのが残念です。 > > が、どうも肝心のsystemdがおかしな状態になっていて、困っています。主 > > な問題は下記2つです。 > > 確認として systemctl restart, systemctl hibernate は動作されているという > ことですが, そもそも更新後に kernel の更新と再起動(reboot)はされています > よね? 現状動作している kernel の version は幾つでしょうか? はい、カーネルの更新は行いました。再起動は何度も行いました。カーネル のバージョンは 5.10.0-10-amd64 です。 > > ●systemctl statusが機能しない > > syslogやsshdなどでも同じ結果になります。rootで実行しても同じです。 > > ------------------------------------------------------------ > > ~$ systemctl status apache2.service > > Failed to parse message: そのようなデバイスやアドレスはありません > - snip - > 一つ目は dbus と通信できていない場合に見られるメッセージに思えます. > Jessie → Stretch の更新時の注意点として, Stretch 以降のパッケージ群が > PIE を有効にしてビルドされている点があります. もし再起動せずに Jessie の > 頃の古いカーネルのまま動いている場合には, daemon program の多くがセグメ > ンテーションフォルトをおこし, 正常に動作しない事が知られています. > https://www.debian.org/releases/stretch/amd64/release-notes/ch-information.ja.html#pie-is-now-default そうですか。PIEというのを知らなかったので、少し勉強してみます。 > > ●再インストールすると、古い設定ファイルが使われる > - snip - > > さらに、下記では、既存の設定ファイルの内容が理解できていないようです。 > > これも奇妙というか、何が原因かわからない状態です。 > > -------------------------------------------- > > [systemd.conf:29] Unknown command type 'a'. > > -------------------------------------------- > > apt-listchanges は不要なら抜いておくのが良いですが, それはそれとして. > > エラーで出ている systemd.conf, home.conf, journal-nocow.conf などは > systemd-tmpfiles.service の設定ファイルであり, /usr/lib/tmpfiles.d/ 以下 > の設定ファイル群ですね. systemd 本体の設定とは別で, tmpfile を含めたファ > イルのマウントの設定です. > > さて, なんでこれが unknown command type 扱いになっているのかな… > > というわけで, あまりお役に立てませんが, 参考までに. ありがとうございました。なぜapt-listchangesなどという古いファイルが 使われるのか、謎です。grep apt-listchanges /var/lib/dpkg/info/* として も、ひっかかるのはpdksh.preinstというファイルだけで、しかもこれは2015 年のものですから、おそらく関係ないと思われ……という状態です。 > > apache2が入っている状態で、下記のようになります。下記のように、 > > syslogやsshdなどでも同じ結果になります。rootで実行しても同じです。 > > ------------------------------------------------------------ > > ~$ systemctl status apache2.service > > Failed to parse message: そのようなデバイスやアドレスはありません > > ~$ systemctl status sshd.service > > Failed to parse message: そのようなデバイスやアドレスはありません > > ~$ systemctl status syslog.service > > Failed to parse message: そのようなデバイスやアドレスはありません > > ------------------------------------------------------------ > > > > ●再インストールすると、古い設定ファイルが使われる > > 試しにsystemdを再インストールすると、設定の途中で奇妙な古いファイル > > "/usr/bin/apt-listchanges"が使われます。 > > 最初にBullseyeにアップグレードする際にもこのファイルでひっかかったの > > で気がついたのですが、中身はPython 2.7のスクリプトです。またこのスクリ > > プトの中では"import anydbm"とされているのですが、anydbm.pyはpython2.7 > > のツリーにあるだけで、python3系には存在しないようです(現在、 > > "/usr/bin/apt-listchanges"は別の場所に移動したため、下記では"No such > > file"になっています)。 > > さらに、下記では、既存の設定ファイルの内容が理解できていないようです。 > > これも奇妙というか、何が原因かわからない状態です。 > > -------------------------------------------- > > [systemd.conf:29] Unknown command type 'a'. > > -------------------------------------------- > > > > ・再インストールの結果 > > ------------------------------------------------------------ > > ~# apt install --reinstall systemd > > Reading package lists... Done > > Building dependency tree... Done > > Reading state information... Done > > 0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 1 not upgraded. > > 1 not fully installed or removed. > > Need to get 4495 kB of archives. > > After this operation, 0 B of additional disk space will be used. > > Get:1 http://ftp.debian.org/debian bullseye/main amd64 systemd amd64 247.3-6 [4495 kB] > > Fetched 4495 kB in 2s (2128 kB/s) > > /bin/sh: line 1: /usr/bin/apt-listchanges: No such file or directory > > (Reading database ... 896033 files and directories currently installed.) > > Preparing to unpack .../systemd_247.3-6_amd64.deb ... > > Unpacking systemd (247.3-6) over (247.3-6) ... > > Setting up systemd (247.3-6) ... > > [home.conf:10] Unknown command type 'Q'. > > [home.conf:11] Unknown command type 'q'. > > [journal-nocow.conf:25] Unknown command type 'h'. > > [journal-nocow.conf:26] Unknown command type 'h'. > > [journal-nocow.conf:27] Unknown command type 'h'. > > [systemd.conf:29] Unknown command type 'a'. > > [systemd.conf:30] Unknown command type 'a'. > > [systemd.conf:31] Unknown command type 'a'. > > [systemd.conf:37] Unknown command type 'a'. > > [systemd.conf:38] Unknown command type 'a'. > > [systemd.conf:39] Unknown command type 'a'. > > [var.conf:10] Unknown command type 'q'. > > Setting up docker-ce (5:20.10.12~3-0~debian-bullseye) ... > > Job for docker.service failed. See 'systemctl status docker.service' and 'journalctl -xn' for details. > > invoke-rc.d: initscript docker, action "restart" failed. > > Failed to parse message: No such device or address > > dpkg: error processing package docker-ce (--configure): > > installed docker-ce package post-installation script subprocess returned error exit status 1 > > Processing triggers for man-db (2.9.4-2) ... > > Processing triggers for dbus (1.12.20-2) ... > > Errors were encountered while processing: > > docker-ce > > needrestart is being skipped since dpkg has failed > > E: Sub-process /usr/bin/dpkg returned an error code (1) > > ------------------------------------------------------------ > > ※Dockerの設定に失敗しているのは別の問題だと思いますので、無視してくだ > > さい。 > > > > 以上につきまして、修復方法など、ご存知でしたらお教え頂ければと思います。 > > > > なお、systemctl restartや、systemctl hibernateなどは正常に動いていま > > す。システムの起動も、もちろん正常に機能しています。 > > > > よろしくお願いいたします。 > > -- > Youhei SASAKI <uwabami@gfd-dennou.org> > <uwabami@debian.or.jp> > GPG fingerprint: > 4096/RSA: 66A4 EA70 4FE2 4055 8D6A C2E6 9394 F354 891D 7E07 > _______________________________________________ > debian-users mailing list > debian-users@debian.or.jp > https://lists.debian.or.jp/mailman/listinfo/debian-users ---*---*---*---*---*---*--- テクスト 小寺 E-mail: odera@text.co.jp Tel: 03-3269-9173 ---*---*---*---*---*---*---
佐々木です. On Sat, 22 Jan 2022 12:03:00 +0900, Masao Odera <odera@text.co.jp> wrote:
Jessie からいきなり Bullseye へアップグレードしたのではなく, Jessie → Stretch → Buster → Bullseye と順に更新したのであれば, 想定されている手 段です.
はい。ただ、各段階での動作確認がかなり大雑把なものだったため、どの段 階でsystemdの不具合が起きたのか不明のまま進んでしまったのが残念です。
なんでしょうねぇ….
が、どうも肝心のsystemdがおかしな状態になっていて、困っています。主 な問題は下記2つです。
確認として systemctl restart, systemctl hibernate は動作されているという ことですが, そもそも更新後に kernel の更新と再起動(reboot)はされています よね? 現状動作している kernel の version は幾つでしょうか?
はい、カーネルの更新は行いました。再起動は何度も行いました。カーネル のバージョンは 5.10.0-10-amd64 です。
であれば, PIE に起因するエラーではないですね. 失礼しました.
さて, なんでこれが unknown command type 扱いになっているのかな…
というわけで, あまりお役に立てませんが, 参考までに.
ありがとうございました。なぜapt-listchangesなどという古いファイルが 使われるのか、謎です。grep apt-listchanges /var/lib/dpkg/info/* として も、ひっかかるのはpdksh.preinstというファイルだけで、しかもこれは2015 年のものですから、おそらく関係ないと思われ……という状態です。
設定ファイルである /etc/apt/apt.conf.d/20listchanges が残っていませんか? このファイルがあれば, apt で取得した dpkg の処理前の hook として apt-listchanges が実行されます. 閑話休題. 起動時に grub のメニューで single user mode で起動すると, どう いうエラーが出ていますか? -- Youhei SASAKI <uwabami@gfd-dennou.org> <uwabami@debian.or.jp> GPG fingerprint: 4096/RSA: 66A4 EA70 4FE2 4055 8D6A C2E6 9394 F354 891D 7E07
佐々木様 再びのご教示、ありがとうございます。 ◇ In original message `Re: [debian-users 00763] Re: Bullseyeにアップグレード後、systemdの動作がおかしい' ◇ ◇ Sat, 22 Jan 2022 23:02:46 +0900 ◇ ◇ Youhei SASAKI <uwabami@gfd-dennou.org> wrote ◇
佐々木です.
On Sat, 22 Jan 2022 12:03:00 +0900, Masao Odera <odera@text.co.jp> wrote:
Jessie からいきなり Bullseye へアップグレードしたのではなく, Jessie → Stretch → Buster → Bullseye と順に更新したのであれば, 想定されている手 段です.
はい。ただ、各段階での動作確認がかなり大雑把なものだったため、どの段 階でsystemdの不具合が起きたのか不明のまま進んでしまったのが残念です。
なんでしょうねぇ….
はい。やはり一気アップグレードは無謀でした。
が、どうも肝心のsystemdがおかしな状態になっていて、困っています。主 な問題は下記2つです。
確認として systemctl restart, systemctl hibernate は動作されているという ことですが, そもそも更新後に kernel の更新と再起動(reboot)はされています よね? 現状動作している kernel の version は幾つでしょうか?
はい、カーネルの更新は行いました。再起動は何度も行いました。カーネル のバージョンは 5.10.0-10-amd64 です。
であれば, PIE に起因するエラーではないですね. 失礼しました.
いえ、とんでもありません。ただ、下記を実行したところ、 ------------------------------ $ strace systemctl status sshd ------------------------------ 下記の表示が出てきました。 ------------------------------ : getpid() = 49932 sendmsg(3, {msg_name=NULL, msg_namelen=0, msg_iov=[{iov_base="l\1\0\1\5\0\0\0\2\0\0\0\237\0\0\0\1\1o\0-\0\0\0/org/fre"..., iov_len=176}, {iov_base="\0\0\0\0\0", iov_len=5}], msg_iovlen=2, msg_controllen=0, msg_flags=0}, MSG_DONTWAIT|MSG_NOSIGNAL) = 181 recvmsg(3, {msg_name=NULL, msg_namelen=0, msg_iov=[{iov_base="l\4\1\1\v\0\0\0\2\0\0\0\215\0\0\0\1\1o\0\25\0\0\0", iov_len=24}], msg_iovlen=1, msg_controllen=0, msg_flags=MSG_CMSG_CLOEXEC}, MSG_DONTWAIT|MSG_NOSIGNAL|MSG_CMSG_CLOEXEC) = 24 recvmsg(3, {msg_name=NULL, msg_namelen=0, msg_iov=[{iov_base="/org/freedesktop/DBus\0\0\0\2\1s\0\24\0\0\0"..., iov_len=147}], msg_iovlen=1, msg_controllen=0, msg_flags=MSG_CMSG_CLOEXEC}, MSG_DONTWAIT|MSG_NOSIGNAL|MSG_CMSG_CLOEXEC) = 147 recvmsg(3, {msg_namelen=0}, MSG_DONTWAIT|MSG_NOSIGNAL|MSG_CMSG_CLOEXEC) = -1 EAGAIN (リソースが一時的に利用できません) : ------------------------------ ですので、佐々木さんがおっしゃるように、DBUSかunix socketか、いずれ にしてもプロセス間通信がうまく行っていないのだと思います(曖昧な知識で 推測しています)。
さて, なんでこれが unknown command type 扱いになっているのかな…
というわけで, あまりお役に立てませんが, 参考までに.
ありがとうございました。なぜapt-listchangesなどという古いファイルが 使われるのか、謎です。grep apt-listchanges /var/lib/dpkg/info/* として も、ひっかかるのはpdksh.preinstというファイルだけで、しかもこれは2015 年のものですから、おそらく関係ないと思われ……という状態です。
設定ファイルである
/etc/apt/apt.conf.d/20listchanges
が残っていませんか? このファイルがあれば, apt で取得した dpkg の処理前の hook として apt-listchanges が実行されます.
あ〜! ありました。そして取り除いたところ、apt-listchangesは実行さ れなくなりました。一歩前進です。ありがとうございます!
閑話休題. 起動時に grub のメニューで single user mode で起動すると, どう いうエラーが出ていますか?
すみません。いま当該ホストは業務の真っ最中で、リブートできません。リ ブートできる状態になったら試してみます。 よろしくお願いいたします。 ---*---*---*---*---*---*--- テクスト 小寺 E-mail: odera@text.co.jp Tel: 03-3269-9173 ---*---*---*---*---*---*---
小寺と申します 下記の件で、systemctlをstraceで実行してみました。結果は下記です(前半省略)。 ------------------------------------------------------------ ~$ strace systemctl status sshd :略 getpid() = 49932 recvmsg(3, {msg_name=NULL, msg_namelen=0, msg_iov=[{iov_base="l\2\1\1\v\0\0\0\1\0\0\0=\0\0\0\6\1s\0\6\0\0\0", iov_len=24}], msg_iovlen=1, msg_controllen=0, msg_flags=MSG_CMSG_CLOEXEC}, MSG_DONTWAIT|MSG_NOSIGNAL|MSG_CMSG_CLOEXEC) = 24 recvmsg(3, {msg_name=NULL, msg_namelen=0, msg_iov=[{iov_base=":1.133\0\0\5\1u\0\1\0\0\0\10\1g\0\1s\0\0\7\1s\0\24\0\0\0"..., iov_len=67}], msg_iovlen=1, msg_controllen=0, msg_flags=MSG_CMSG_CLOEXEC}, MSG_DONTWAIT|MSG_NOSIGNAL|MSG_CMSG_CLOEXEC) = 67 getpid() = 49932 sendmsg(3, {msg_name=NULL, msg_namelen=0, msg_iov=[{iov_base="l\1\0\1\5\0\0\0\2\0\0\0\237\0\0\0\1\1o\0-\0\0\0/org/fre"..., iov_len=176}, {iov_base="\0\0\0\0\0", iov_len=5}], msg_iovlen=2, msg_controllen=0, msg_flags=0}, MSG_DONTWAIT|MSG_NOSIGNAL) = 181 recvmsg(3, {msg_name=NULL, msg_namelen=0, msg_iov=[{iov_base="l\4\1\1\v\0\0\0\2\0\0\0\215\0\0\0\1\1o\0\25\0\0\0", iov_len=24}], msg_iovlen=1, msg_controllen=0, msg_flags=MSG_CMSG_CLOEXEC}, MSG_DONTWAIT|MSG_NOSIGNAL|MSG_CMSG_CLOEXEC) = 24 recvmsg(3, {msg_name=NULL, msg_namelen=0, msg_iov=[{iov_base="/org/freedesktop/DBus\0\0\0\2\1s\0\24\0\0\0"..., iov_len=147}], msg_iovlen=1, msg_controllen=0, msg_flags=MSG_CMSG_CLOEXEC}, MSG_DONTWAIT|MSG_NOSIGNAL|MSG_CMSG_CLOEXEC) = 147 recvmsg(3, {msg_namelen=0}, MSG_DONTWAIT|MSG_NOSIGNAL|MSG_CMSG_CLOEXEC) = -1 EAGAIN (リソースが一時的に利用できません) getpid() = 49932 ppoll([{fd=3, events=POLLIN}], 1, {tv_sec=24, tv_nsec=999791000}, NULL, 8) = 1 ([{fd=3, revents=POLLIN}], left {tv_sec=24, tv_nsec=997250176}) recvmsg(3, {msg_name=NULL, msg_namelen=0, msg_iov=[{iov_base="l\2\1\1\3044\0\0\323\5\0\0005\0\0\0\5\1u\0\2\0\0\0", iov_len=24}], msg_iovlen=1, msg_controllen=0, msg_flags=MSG_CMSG_CLOEXEC}, MSG_DONTWAIT|MSG_NOSIGNAL|MSG_CMSG_CLOEXEC) = 24 recvmsg(3, {msg_name=NULL, msg_namelen=0, msg_iov=[{iov_base="\6\1s\0\6\0\0\0:1.133\0\0\10\1g\0\5a{sv}\0\0\0\0\0\0"..., iov_len=13556}], msg_iovlen=1, msg_controllen=0, msg_flags=MSG_CMSG_CLOEXEC}, MSG_DONTWAIT|MSG_NOSIGNAL|MSG_CMSG_CLOEXEC) = 13556 openat(AT_FDCWD, "/usr/share/locale/locale.alias", O_RDONLY|O_CLOEXEC) = 4 fstat(4, {st_mode=S_IFREG|0644, st_size=2996, ...}) = 0 read(4, "# Locale name alias data base.\n#"..., 4096) = 2996 read(4, "", 4096) = 0 close(4) = 0 openat(AT_FDCWD, "/usr/share/locale/ja_JP.UTF-8/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (そのようなファイルやディレクトリはありません) openat(AT_FDCWD, "/usr/share/locale/ja_JP.utf8/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (そのようなファイルやディレクトリはありません) openat(AT_FDCWD, "/usr/share/locale/ja_JP/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (そのようなファイルやディレクトリはありません) openat(AT_FDCWD, "/usr/share/locale/ja.UTF-8/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (そのようなファイルやディレクトリはありません) openat(AT_FDCWD, "/usr/share/locale/ja.utf8/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (そのようなファイルやディレクトリはありません) openat(AT_FDCWD, "/usr/share/locale/ja/LC_MESSAGES/libc.mo", O_RDONLY) = 4 fstat(4, {st_mode=S_IFREG|0644, st_size=143521, ...}) = 0 mmap(NULL, 143521, PROT_READ, MAP_PRIVATE, 4, 0) = 0x7fe251cb8000 close(4) = 0 openat(AT_FDCWD, "/usr/lib/x86_64-linux-gnu/gconv/gconv-modules.cache", O_RDONLY) = 4 fstat(4, {st_mode=S_IFREG|0644, st_size=27002, ...}) = 0 mmap(NULL, 27002, PROT_READ, MAP_SHARED, 4, 0) = 0x7fe251cb1000 close(4) = 0 futex(0x7fe251c7167c, FUTEX_WAKE_PRIVATE, 2147483647) = 0 writev(2, [{iov_base="Failed to parse message: \343\201\235\343\201\256\343"..., iov_len=85}, {iov_base="\n", iov_len=1}], 2Failed to parse message: そのようなデバイスやアドレスはありません ) = 86 exit_group(1) = ? +++ exited with 1 +++ ------------------------------------------------------------ とりあえずlocaleに関しては下記のようになっています。 ------------------------------------------------------------ ~$ ls -l /usr/share/locale/ja_JP.UTF-8/LC_MESSAGES/ ?? 16 -rw-r--r-- 1 root root 13005 7? 29 2019 gentoo.mo ------------------------------------------------------------ 何かおわかりになるようでしたらご教示ください。 よろしくお願いいたします。 --- ◇ In original message `[debian-users 00761] Bullseyeにアップグレード後、systemdの動作がおかしい' ◇ ◇ Fri, 21 Jan 2022 17:51:51 +0900 (JST) ◇ ◇ Masao Odera <odera@text.co.jp> wrote ◇
小寺と申します
先日、Debianのアップグレードを行いました。JessieからStretch、Buster を経てBullseyeへという、かなり強引なやり方でしたが、kDEデスクトップを 含め、それなりに普段使いできる状態にはなりました。 が、どうも肝心のsystemdがおかしな状態になっていて、困っています。主 な問題は下記2つです。
●systemctl statusが機能しない apache2が入っている状態で、下記のようになります。下記のように、 syslogやsshdなどでも同じ結果になります。rootで実行しても同じです。 ------------------------------------------------------------ ~$ systemctl status apache2.service Failed to parse message: そのようなデバイスやアドレスはありません ~$ systemctl status sshd.service Failed to parse message: そのようなデバイスやアドレスはありません ~$ systemctl status syslog.service Failed to parse message: そのようなデバイスやアドレスはありません ------------------------------------------------------------
●再インストールすると、古い設定ファイルが使われる 試しにsystemdを再インストールすると、設定の途中で奇妙な古いファイル "/usr/bin/apt-listchanges"が使われます。 最初にBullseyeにアップグレードする際にもこのファイルでひっかかったの で気がついたのですが、中身はPython 2.7のスクリプトです。またこのスクリ プトの中では"import anydbm"とされているのですが、anydbm.pyはpython2.7 のツリーにあるだけで、python3系には存在しないようです(現在、 "/usr/bin/apt-listchanges"は別の場所に移動したため、下記では"No such file"になっています)。 さらに、下記では、既存の設定ファイルの内容が理解できていないようです。 これも奇妙というか、何が原因かわからない状態です。 -------------------------------------------- [systemd.conf:29] Unknown command type 'a'. --------------------------------------------
・再インストールの結果 ------------------------------------------------------------ ~# apt install --reinstall systemd Reading package lists... Done Building dependency tree... Done Reading state information... Done 0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 1 not upgraded. 1 not fully installed or removed. Need to get 4495 kB of archives. After this operation, 0 B of additional disk space will be used. Get:1 http://ftp.debian.org/debian bullseye/main amd64 systemd amd64 247.3-6 [4495 kB] Fetched 4495 kB in 2s (2128 kB/s) /bin/sh: line 1: /usr/bin/apt-listchanges: No such file or directory (Reading database ... 896033 files and directories currently installed.) Preparing to unpack .../systemd_247.3-6_amd64.deb ... Unpacking systemd (247.3-6) over (247.3-6) ... Setting up systemd (247.3-6) ... [home.conf:10] Unknown command type 'Q'. [home.conf:11] Unknown command type 'q'. [journal-nocow.conf:25] Unknown command type 'h'. [journal-nocow.conf:26] Unknown command type 'h'. [journal-nocow.conf:27] Unknown command type 'h'. [systemd.conf:29] Unknown command type 'a'. [systemd.conf:30] Unknown command type 'a'. [systemd.conf:31] Unknown command type 'a'. [systemd.conf:37] Unknown command type 'a'. [systemd.conf:38] Unknown command type 'a'. [systemd.conf:39] Unknown command type 'a'. [var.conf:10] Unknown command type 'q'. Setting up docker-ce (5:20.10.12~3-0~debian-bullseye) ... Job for docker.service failed. See 'systemctl status docker.service' and 'journalctl -xn' for details. invoke-rc.d: initscript docker, action "restart" failed. Failed to parse message: No such device or address dpkg: error processing package docker-ce (--configure): installed docker-ce package post-installation script subprocess returned error exit status 1 Processing triggers for man-db (2.9.4-2) ... Processing triggers for dbus (1.12.20-2) ... Errors were encountered while processing: docker-ce needrestart is being skipped since dpkg has failed E: Sub-process /usr/bin/dpkg returned an error code (1) ------------------------------------------------------------ ※Dockerの設定に失敗しているのは別の問題だと思いますので、無視してくだ さい。
以上につきまして、修復方法など、ご存知でしたらお教え頂ければと思います。
なお、systemctl restartや、systemctl hibernateなどは正常に動いていま す。システムの起動も、もちろん正常に機能しています。
よろしくお願いいたします。
---*---*---*---*---*---*--- テクスト 小寺 E-mail: odera@text.co.jp Tel: 03-3269-9173 ---*---*---*---*---*---*---
_______________________________________________ debian-users mailing list debian-users@debian.or.jp https://lists.debian.or.jp/mailman/listinfo/debian-users
---*---*---*---*---*---*--- テクスト 小寺 E-mail: odera@text.co.jp Tel: 03-3269-9173 ---*---*---*---*---*---*---
participants (2)
-
Masao Odera -
Youhei SASAKI