日志

日志

好吧,这有点奇怪。我有一个运行各种服务的 Fedora Linux 服务器。一些例子是:

  • Nginx 反向代理
  • Wireguard VPN(在 Docker 容器内运行)
  • SSH
  • Fedora 驾驶舱用户界面

还有很多其他主要是 docker 容器,但我总是通过 SSH 或 Nginx 访问它们,所以我没有提及它们。

系统工作正常大多数时候——这就是问题所在。它可能运行几天没有问题,但有时会“挂起”。 SSH 连接不起作用,通过 Nginx 代理的托管网站既无法从本地网络访问,也无法从外部访问,Cockpit 也是如此(不由 Nginx 代理)。如果我手动硬关闭并重新启动服务器(通过电源按钮),它将很有可能再次工作。如果我随后检查系统日志以查看发生了什么,我会发现它们只是在某个时刻停止并且没有记录任何内容,甚至没有记录调试信息。

这是奇怪的部分:当发生这种情况时,尽管所有服务都挂起,Wireguard 工作正常!它永远不会停止工作:我还可以从其他网络访问本地地址(例如路由器的配置页面@ 192.168.1.1),因此VPN按预期工作。我还尝试过转发 SSH 端口并直接连接到它而不使用 Wireguard,但没有成功。

我想强调的是,80% 的时间里,一切都运行良好。 因此,我相信这不太可能是防火墙、Nginx 配置或类似问题。更新软件包后,系统会在凌晨 4:00 左右照常重新启动。

我现在无法手动访问服务器,因为我还要离开家一个月(即,如果发生这种情况,我需要家里的其他人为我重新启动服务器,并且我无法告诉您显示的内容在屏幕上,因为没有),但我真的需要它尽可能快地工作,因为它上面有我的许多大学笔记(我知道,这不是明智之举)。

谢谢你们

日志

系统日志

这些是服务器的最新日志。我在下午 13:30 重新启动服务器,从上午 6:01 到下午 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 日志似乎没有什么奇怪的。但如果您需要其他日志,我可以提供。

相关内容