Ubuntu 服务器随机重启

Ubuntu 服务器随机重启

昨天,我的一台 Ubuntu 服务器突然重启。服务器突然重启,9 分钟后才恢复。

服务器的配置和日志文件如下所示。

配置文件:/etc/apt/apt.conf.d/20auto-upgrades

root@node1227:~# cat /etc/apt/apt.conf.d/20auto-upgrades
APT::Periodic::Update-Package-Lists "1";
APT::Periodic::Unattended-Upgrade "1";

配置文件:/etc/apt/apt.conf.d/50unattended-upgrades

#Automatically reboot *WITHOUT CONFIRMATION*
#if the file /var/run/reboot-required is found after the upgrade 
#Unattended-Upgrade::Automatic-Reboot "false";

日志: /var/log/unattended-upgrades/unattended-upgrades.log

2023-12-04 11:15:41,738 INFO Initial blacklisted packages: 
2023-12-04 11:15:41,740 INFO Initial whitelisted packages: 
2023-12-04 11:15:41,740 INFO Starting unattended upgrades script
2023-12-04 11:15:41,740 INFO Allowed origins are: o=Ubuntu,a=bionic, o=Ubuntu,a=bionic-security, o=UbuntuESMApps,a=bionic-apps-security, o=UbuntuESM,a=bionic-infra-security
2023-12-04 11:16:25,920 WARNING package grub-common upgradable but fails to be marked for upgrade (E:Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.)
2023-12-04 11:16:27,904 WARNING package grub-common upgradable but fails to be marked for upgrade (E:Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.)***

日志:/var/log/syslog

Dec 04 01:00:26 node1227 dockerd[25797]: time="2020-12-04T07:00:26.322850478Z" level=info msg="NetworkDB stats node1227(d0ca128e3573) - netID:qb8s5t31n5jllj9mr9ihl3rom leaving:false netPeers:8 entries:38 Queue qLen:0 netMsg/s:0"
Dec 04 01:05:26 node1227 dockerd[25797]: time="2020-12-04T07:05:26.522870062Z" level=info msg="NetworkDB stats node1227(d0ca128e3573) - netID:qb8s5t31n5jllj9mr9ihl3rom leaving:false netPeers:8 entries:38 Queue qLen:0 netMsg/s:0"
Dec 04 01:02:12 node1227 systemd-timesyncd[7350]: Network configuration changed, trying to establish connection.
Dec 04 01:02:12 node1227 systemd-networkd[7258]: eno1: Configured
Dec 04 01:02:12 node1227 systemd[1]: Started ntp-systemd-netif.service.
Dec 04 01:02:13 node1227 systemd-timesyncd[7350]: Synchronized to time server 91.189.89.198:123 (ntp.ubuntu.com).
Dec 04 01:00:41 node1227 systemd[1]: Starting Message of the Day...
Dec 04 01:00:42 node1227 50-motd-news[1781]:  * Strictly confined Kubernetes makes edge and IoT secure. Learn how MicroK8s
Dec 04 01:00:42 node1227 50-motd-news[1781]:    just raised the bar for easy, resilient and secure K8s cluster deployment.
Dec 04 01:00:42 node1227 50-motd-news[1781]:    
Dec 04 01:00:42 node1227 systemd[1]: Started Message of the Day.
Dec 04 01:08:24 node1227 kernel: Linux version 4.15.0-197-generic (buildd@lcy02-amd64-110) (gcc version 7.5.0 (Ubuntu 7.5.0-3ubuntu1~18.04)) #208-Ubuntu SMP Tue Nov 1 17:23:37 UTC 2022 (Ubuntu 4.15.0-197.208-generic 4.15.18)
Dec 04 01:08:24 node1227 kernel: Command line: BOOT_IMAGE=/boot/vmlinuz-4.15.0-197-generic root=UUID=8c06793f-85b1-426f-abd5-83a998e3da85 ro
Dec 04 01:08:24 node1227 kernel: KERNEL supported cpus***

如果有人能帮助我们找出该服务器突然重启的确切根本原因,那就太好了,即使该选项Unattended-Upgrade::Automatic-Reboot "false";已被评论。

注意:重启后我们才知道内核版本发生了变化。

相关内容