Ubuntu Server 20.04 每周死机两次

Ubuntu Server 20.04 每周死机两次

我的 ubuntu 服务器(20.04 headless)几乎每周都会冻结两次。

第一次,journalctl 中的最后一条消息是

systemd:今日消息已完成。

第二次是来自 jellyfin 的。奇怪的是(我认为),计算机并没有真正崩溃。它冻结了,风扇继续旋转。为了让它重新工作,我总是必须按住电源按钮将其关闭,然后再将其打开。也许这很明显,但我也看到很多帖子,用户仍然能够通过 ssh 进入机器。事实并非如此。尽管我的 LAN 交换机上的灯闪烁(亮起),但路由器/调制解调器显示它处于离线状态。

我在用着:

  • 中央处理器:英特尔酷睿 i5-6500(4)
  • 内存:16GB,交换空间:4GB

有谁知道如何相应地解决这个问题?

输出:$ journaclctl -b -1 -e

Sep 06 19:53:58 vind-media-server jellyfin[5074]: [19:53:58] [INF] Executing Scan Media Library
Sep 06 19:53:58 vind-media-server jellyfin[5074]: [19:53:58] [INF] Stopping directory watching for path /mnt/hdd/
Sep 06 19:53:58 vind-media-server jellyfin[5074]: [19:53:58] [INF] Stopping directory watching for path /mnt/hdd/
Sep 06 19:53:58 vind-media-server jellyfin[5074]: [19:53:58] [INF] Stopping directory watching for path /mnt/hdd/
Sep 06 19:53:58 vind-media-server jellyfin[5074]: [19:53:58] [INF] Stopping directory watching for path /mnt/hdd/
Sep 06 19:53:58 vind-media-server jellyfin[5074]: [19:53:58] [INF] Validating media library
Sep 06 19:54:07 vind-media-server jellyfin[335115]: [matroska,webm @ 0x55b5c247b600] Could not find codec parameters for stream 3 (Subtitle: hdmv_pgs_subtitle (pgssub)): unspecified size
Sep 06 19:54:07 vind-media-server jellyfin[335115]: Consider increasing the value for the 'analyzeduration' and 'probesize' options
Sep 06 19:54:07 vind-media-server jellyfin[335115]: [matroska,webm @ 0x55b5c247b600] Could not find codec parameters for stream 4 (Subtitle: hdmv_pgs_subtitle (pgssub)): unspecified size
Sep 06 19:54:07 vind-media-server jellyfin[335115]: Consider increasing the value for the 'analyzeduration' and 'probesize' options
Sep 06 19:54:07 vind-media-server jellyfin[335115]: [matroska,webm @ 0x55b5c247b600] Could not find codec parameters for stream 5 (Subtitle: hdmv_pgs_subtitle (pgssub)): unspecified size
Sep 06 19:54:07 vind-media-server jellyfin[335115]: Consider increasing the value for the 'analyzeduration' and 'probesize' options
Sep 06 19:54:07 vind-media-server jellyfin[335115]: [matroska,webm @ 0x55b5c247b600] Could not find codec parameters for stream 6 (Subtitle: hdmv_pgs_subtitle (pgssub)): unspecified size
Sep 06 19:54:07 vind-media-server jellyfin[335115]: Consider increasing the value for the 'analyzeduration' and 'probesize' options
Sep 06 19:54:18 vind-media-server jellyfin[5074]: [19:54:18] [INF] Scan Media Library Completed after 0 minute(s) and 19 seconds
Sep 06 19:54:18 vind-media-server jellyfin[5074]: [19:54:18] [INF] ExecuteQueuedTasks
Sep 06 19:54:18 vind-media-server jellyfin[5074]: [19:54:18] [INF] Watching directory /mnt/hdd/
Sep 06 19:54:18 vind-media-server jellyfin[5074]: [19:54:18] [INF] Watching directory /mnt/hdd/
Sep 06 19:54:19 vind-media-server jellyfin[5074]: [19:54:19] [INF] Watching directory /mnt/hdd/
Sep 06 19:54:19 vind-media-server jellyfin[5074]: [19:54:19] [INF] Watching directory /mnt/hdd/
Sep 06 19:54:23 vind-media-server jellyfin[5074]: [19:54:23] [WRN] Slow HTTP Response from DONT/Items/6d43d5be1bcbfcf47c0a00a573543faf/Images/Primary?fillHeight=670&fillWidth=446&quality=96&tag=97f0105f1268e219>
Sep 06 19:54:23 vind-media-server jellyfin[5074]: [19:54:23] [WRN] Slow HTTP Response from DONT/Items/fc45e94a2764bf3d5bdb53dfdfdc701c/Images/Primary?fillHeight=670&fillWidth=446&quality=96&tag=b465bdd42db9a771>
Sep 06 19:54:24 vind-media-server jellyfin[5074]: [19:54:24] [WRN] Slow HTTP Response from DONT/Items/90a6e3463d797f491b6b2cca511d4922/Images/Primary?fillHeight=1440&fillWidth=960&quality=96&tag=d09daa02958181b>
Sep 06 19:54:24 vind-media-server jellyfin[5074]: [19:54:24] [WRN] Slow HTTP Response from DONT/Items/90a6e3463d797f491b6b2cca511d4922/Images/Backdrop/0?maxWidth=3840&tag=1182e96a248b54b0ed77dd3e18a425ba&qualit>
Sep 06 19:54:24 vind-media-server jellyfin[5074]: [19:54:24] [WRN] Slow HTTP Response from DONT/Items/685c6bb9649da6cba69b39772a767696/Images/Primary?fillHeight=670&fillWidth=446&quality=96&tag=58a3ee89ce80b31e>
Sep 06 19:54:50 vind-media-server jellyfin[5074]: [19:54:50] [INF] WS 193.29.106.188 closed
Sep 06 19:55:14 vind-media-server sshd[334989]: Received disconnect from IP port PORT:11: disconnected by user
Sep 06 19:55:14 vind-media-server sshd[334989]: Disconnected from user death IP port PORT
Sep 06 19:55:14 vind-media-server systemd[1]: session-633.scope: Succeeded.
Sep 06 19:55:14 vind-media-server sshd[334843]: pam_unix(sshd:session): session closed for user death
Sep 06 19:55:14 vind-media-server systemd-logind[930]: Session 633 logged out. Waiting for processes to exit.
Sep 06 19:55:14 vind-media-server systemd-logind[930]: Removed session 633.
Sep 06 20:09:01 vind-media-server CRON[335497]: pam_unix(cron:session): session opened for user root by (uid=0)
Sep 06 20:09:01 vind-media-server CRON[335498]: (root) CMD (  [ -x /usr/lib/php/sessionclean ] && if [ ! -d /run/systemd/system ]; then /usr/lib/php/sessionclean; fi)
Sep 06 20:09:01 vind-media-server CRON[335497]: pam_unix(cron:session): session closed for user root
Sep 06 20:09:09 vind-media-server systemd[1]: Starting Clean php session files...
Sep 06 20:09:10 vind-media-server systemd[1]: phpsessionclean.service: Succeeded.
Sep 06 20:09:10 vind-media-server systemd[1]: Finished Clean php session files.
Sep 06 20:17:01 vind-media-server CRON[335698]: pam_unix(cron:session): session opened for user root by (uid=0)
Sep 06 20:17:01 vind-media-server CRON[335699]: (root) CMD (   cd / && run-parts --report /etc/cron.hourly)
Sep 06 20:17:01 vind-media-server CRON[335698]: pam_unix(cron:session): session closed for user root
Sep 06 20:39:01 vind-media-server CRON[336116]: pam_unix(cron:session): session opened for user root by (uid=0)
Sep 06 20:39:01 vind-media-server CRON[336117]: (root) CMD (  [ -x /usr/lib/php/sessionclean ] && if [ ! -d /run/systemd/system ]; then /usr/lib/php/sessionclean; fi)
Sep 06 20:39:01 vind-media-server CRON[336116]: pam_unix(cron:session): session closed for user root
Sep 06 20:39:09 vind-media-server systemd[1]: Starting Clean php session files...
Sep 06 20:39:10 vind-media-server systemd[1]: phpsessionclean.service: Succeeded.
Sep 06 20:39:10 vind-media-server systemd[1]: Finished Clean php session files.
Sep 06 20:55:05 vind-media-server systemd[1]: Starting Message of the Day...
Sep 06 20:55:10 vind-media-server 50-motd-news[336477]:  * Super-optimized for small spaces - read how we shrank the memory
Sep 06 20:55:10 vind-media-server 50-motd-news[336477]:    footprint of MicroK8s to make it the smallest full K8s around.
Sep 06 20:55:10 vind-media-server 50-motd-news[336477]:    https://ubuntu.com/blog/microk8s-memory-optimisation
Sep 06 20:55:10 vind-media-server systemd[1]: motd-news.service: Succeeded.
Sep 06 20:55:10 vind-media-server systemd[1]: Finished Message of the Day.

Pastebin.com

应该是崩溃的 dmesg 日志文件:

Pastebin.com

过去几天,我每天只需重启一次就能避免任何冻结。这证明这不是某种热问题。

谢谢@托马斯·沃德提示。我已应用此命令中建议的更改: https://askubuntu.com/a/45009/1028839。不幸的是,我再也找不到冻结时的旧日志了。我将再次重新启动以使更改生效,然后等待下一次冻结。

正常运行时间:6 天 3 小时 53 分钟

看起来这就是解决办法。非常感谢@托马斯·沃德。如果您愿意提交答案,我可以将其标记为解决方案。

更新

在重启过程中出现死机后,我决定将这些问题归咎于硬件。我用 ssd 替换了硬盘,切换到 debian(无关)并更新了 bios。将来会添加有关此问题的信息。不过可能需要一些时间。

正常运行时间:9 天,13 小时,37 分钟

我认为现在可以肯定地说该问题已经得到解决。

遇到类似问题的用户请注意:尝试“禁用” 5% 的 RAM,如编辑 4 中所述。如果这不起作用,请尝试切换主板上的 SATA 端口或换一根新的 SATA 电缆。就我而言,由于计算机运行时 HDD 直接发生故障/断开连接,因此无法显示日志。

相关内容