丸太

丸太

さて、ちょっと変です。さまざまなサービスを実行するFedora Linuxサーバーがあります。いくつかの例は次のとおりです。

  • Nginxリバースプロキシ
  • Wireguard VPN(Dockerコンテナ内で実行)
  • SSH
  • Fedoraコックピットユーザーインターフェース

主にDockerコンテナである他の多くのコンテナがありますが、私はいつもSSHやNginxを介してアクセスするので言及していません。

システムが正常に動作しています。ほとんどの場合--ここで問題が発生します。数日間は問題なく実行できますが、時には「停止」することがあります。 SSH接続が機能せず、Nginx経由でプロキシされたホスト型Webサイトはローカルネットワークまたは外部からアクセスできず、Cockpit(Nginxによってプロキシされていない)でも同様です。手動で強制終了してサーバーを再起動すると(電源ボタンを介して)、再び動作する可能性が高くなります。その後、何が起こっているのかを確認するためにシステムログをチェックすると、システムがある時点で停止し、デバッグ情報も記録せず、何も記録しないことがわかります。

奇妙な部分は次のとおりです。この場合、すべてのサービスが中断されても、Wireguardは正常に動作します!動作が停止しません。他のネットワークからローカルアドレス(ルーター設定ページ@など192.168.1.1)にアクセスすることもできるため、VPNは期待どおりに機能します。また、Wireguardを使用せずにSSHポートを転送して直接接続しようとしましたが、成功しませんでした。

私は80%の場合、すべてがうまく機能することを強調したいと思います。 したがって、ファイアウォール、Nginx の構成などの問題ではない可能性が高くなります。パッケージを更新した後、システムは午前4時ごろのように再起動されます。

今後1ヶ月間家を空にする予定なので、今は手動でサーバーにアクセスできません。 (例:このような場合、自宅でサーバーを再起動してくれる他の人が必要で、何が起こっているのか教えられない。必ず必要です(わかっています、賢い動きではありません)。

みんなありがとう

丸太

システムログ

サーバーの最新ログです。午後13時30分にサーバーを再起動しましたが、午前6時1分から午後13時30分までログがありません。

6:01 AM [CROND] - (root) CMDEND (run-parts /etc/cron.hourly)
6:01 AM [run-parts] - (/etc/cron.hourly) finished 0anacron
6:01 AM [run-parts] - (/etc/cron.hourly) starting 0anacron
6:01 AM [CROND] - (root) CMD (run-parts /etc/cron.hourly)
5:59 AM [audit] - SERVICE_STOP pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=pmie_farm_check comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
5:59 AM [systemd] - pmie_farm_check.service: Deactivated successfully.
5:59 AM [audit] - SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=pmie_farm_check comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
5:59 AM [systemd] - Started pmie_farm_check.service - Check and migrate non-primary pmie farm instances.

接続しようとしたときのSSHの詳細出力

$ ssh 192.168.1.240 -v

OpenSSH_9.0p1 Ubuntu-1ubuntu8.5, OpenSSL 3.0.8 7 Feb 2023
debug1: Reading configuration data /home/efiocchi/.ssh/config
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: include /etc/ssh/ssh_config.d/*.conf matched no files
debug1: /etc/ssh/ssh_config line 21: Applying options for *
debug1: Connecting to 192.168.1.240 [192.168.1.240] port 22.
debug1: Connection established.
debug1: identity file /home/efiocchi/.ssh/id_rsa type 0
debug1: identity file /home/efiocchi/.ssh/id_rsa-cert type -1
debug1: identity file /home/efiocchi/.ssh/id_ecdsa type -1
debug1: identity file /home/efiocchi/.ssh/id_ecdsa-cert type -1
debug1: identity file /home/efiocchi/.ssh/id_ecdsa_sk type -1
debug1: identity file /home/efiocchi/.ssh/id_ecdsa_sk-cert type -1
debug1: identity file /home/efiocchi/.ssh/id_ed25519 type -1
debug1: identity file /home/efiocchi/.ssh/id_ed25519-cert type -1
debug1: identity file /home/efiocchi/.ssh/id_ed25519_sk type -1
debug1: identity file /home/efiocchi/.ssh/id_ed25519_sk-cert type -1
debug1: identity file /home/efiocchi/.ssh/id_xmss type -1
debug1: identity file /home/efiocchi/.ssh/id_xmss-cert type -1
debug1: identity file /home/efiocchi/.ssh/id_dsa type -1
debug1: identity file /home/efiocchi/.ssh/id_dsa-cert type -1
debug1: Local version string SSH-2.0-OpenSSH_9.0p1 Ubuntu-1ubuntu8.5
debug1: Remote protocol version 2.0, remote software version OpenSSH_9.0
debug1: compat_banner: match: OpenSSH_9.0 pat OpenSSH* compat 0x04000000
debug1: Authenticating to 192.168.1.240:22 as 'efiocchi'
debug1: load_hostkeys: fopen /home/efiocchi/.ssh/known_hosts2: No such file or directory
debug1: load_hostkeys: fopen /etc/ssh/ssh_known_hosts: No such file or directory
debug1: load_hostkeys: fopen /etc/ssh/ssh_known_hosts2: No such file or directory
debug1: SSH2_MSG_KEXINIT sent
Connection closed by 192.168.1.240 port 22

その他のログ

Wireguard dockerログやNginxログには奇妙なことがないようです。ただし、他のログが必要な場合はお知らせいたします。

ベストアンサー1

おすすめ記事