CentOS auto restart

General support questions
Post Reply
kceiw
Posts: 5
Joined: 2017/03/10 15:18:25

CentOS auto restart

Post by kceiw » 2017/03/10 15:28:13

Hi,

I have seen this problems months in CentOS. I set up a home server and it's not running any GUI.
But every a few weeks (2 to 3 weeks), it's not responsive. Even if I try keyboard on the machine, it's not responsive either.

I looked at the log. The last thing it did is looking for hardware and starting services. It looks much like it's restarting the OS or the kernel. I have encrypted the whole disk. So, if it's restarting or re-initializing, it will need my input to for the password. Hence the no responsiveness.

My question then is how do I disable auto restarting? Is there any policy or audit or something in CentOS 7 that re-initialize or re-start something from time to time?

I am new to CentOS and I only setup NFS, Samba, Emby and OpenHAB on the system. I don't think any of them will try to restart the system.

Thanks,

User avatar
TrevorH
Site Admin
Posts: 33218
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: CentOS auto restart

Post by TrevorH » 2017/03/10 16:01:29

There's nothing that CentOS does that would automatically restart your system. Can you post say 10 or 20 lines of /var/log/messages on either side of the restart like grep -B20 -A10 "Linux version" /var/log/messages (amend the messages filename to reflect when it last did this).
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

kceiw
Posts: 5
Joined: 2017/03/10 15:18:25

Re: CentOS auto restart

Post by kceiw » 2017/03/11 23:57:09

Thanks @TrevorH for your reply.
Below is the info you need. Note that the log entries aren't in order. The log (not pasted here) shows that it's doing something like "stopping user-988.slice", "Removed slice user-988.slice" before showing "Linux version" in the time order.
A relative comprehensive log (one hour before the line "Linux version" until I restart the machine) is at this link https://gist.github.com/kceiw/9275d11f3 ... 6e3473fc5d
I powered down the machine and restarted it on Mar 10 06:44.

I am not familiar with those "stopping user-988.slice" and "Removed slice user-988.slice".
And the log shows that it's doing initialization some point before I restart the machine.

Please help me to understand what's going wrong with the machine and how I can troubleshoot it.

Thanks,
Mar 10 04:28:01 localserver systemd: Starting Session 1539 of user pcp.¬
Mar 10 04:28:01 localserver systemd: Removed slice user-988.slice.¬
Mar 10 04:28:01 localserver systemd: Stopping user-988.slice.¬
Mar 10 04:30:01 localserver systemd: Created slice user-0.slice.¬
Mar 10 04:30:01 localserver systemd: Starting user-0.slice.¬
Mar 10 04:30:01 localserver systemd: Started Session 1540 of user root.¬
Mar 10 04:30:01 localserver systemd: Starting Session 1540 of user root.¬
Mar 10 04:30:01 localserver systemd: Removed slice user-0.slice.¬
Mar 10 04:30:01 localserver systemd: Stopping user-0.slice.¬
Mar 10 04:40:01 localserver systemd: Created slice user-0.slice.¬
Mar 10 04:40:01 localserver systemd: Starting user-0.slice.¬
Mar 10 04:40:01 localserver systemd: Started Session 1541 of user root.¬
Mar 10 04:40:01 localserver systemd: Starting Session 1541 of user root.¬
Mar 10 04:40:01 localserver systemd: Removed slice user-0.slice.¬
Mar 10 04:40:01 localserver systemd: Stopping user-0.slice.¬
Mar 9 22:44:51 localserver rsyslogd: [origin software="rsyslogd" swVersion="7.4.7" x-pid="1116" x-info="http://www.rsyslog.com"] start¬
Mar 9 22:44:05 localserver journal: Runtime journal is using 8.0M (max allowed 291.0M, trying to leave 436.6M free of 2.8G available → current limit 291.0M).¬
Mar 9 22:44:05 localserver kernel: CPU0 microcode updated early to revision 0x29, date = 2013-06-12¬
Mar 9 22:44:05 localserver kernel: Initializing cgroup subsys cpuset¬
Mar 9 22:44:05 localserver kernel: Initializing cgroup subsys cpu¬
Mar 9 22:44:05 localserver kernel: Initializing cgroup subsys cpuacct¬
Mar 9 22:44:05 localserver kernel: Linux version 3.10.0-327.36.3.el7.x86_64 (builder@kbuilder.dev.centos.org) (gcc version 4.8.5 20150623 (Red Hat 4.8.5-4) (GCC) ) #1 SMP Mon Oct 24 16:09:20 UTC 2016¬
Mar 9 22:44:05 localserver kernel: Command line: BOOT_IMAGE=/vmlinuz-3.10.0-327.36.3.el7.x86_64 root=/dev/mapper/luks-b13a0541-006c-401f-932c- ac84e4378a36 ro rd.luks.uuid=luks-b13a0541-006c-401f-932c-ac84e4378a36 rd.luks.uuid=luks-dccc6e13-59cf-4616-9a84-112e7660d64e rhgb quiet LANG=en_US.UTF-8¬
Mar 9 22:44:05 localserver kernel: e820: BIOS-provided physical RAM map:¬
Mar 9 22:44:05 localserver kernel: BIOS-e820: [mem 0x0000000000000000-0x000000000009d7ff] usable¬
Mar 9 22:44:05 localserver kernel: BIOS-e820: [mem 0x000000000009d800-0x000000000009ffff] reserved¬
Mar 9 22:44:05 localserver kernel: BIOS-e820: [mem 0x00000000000e0000-0x00000000000fffff] reserved¬
Mar 9 22:44:05 localserver kernel: BIOS-e820: [mem 0x0000000000100000-0x00000000a6e3efff] usable¬
Mar 9 22:44:05 localserver kernel: BIOS-e820: [mem 0x00000000a6e3f000-0x00000000a6ebefff] reserved¬
Mar 9 22:44:05 localserver kernel: BIOS-e820: [mem 0x00000000a6ebf000-0x00000000a6fbefff] ACPI NVS¬
Mar 9 22:44:05 localserver kernel: BIOS-e820: [mem 0x00000000a6fbf000-0x00000000a6ffefff] ACPI data¬
Mar 9 22:44:05 localserver kernel: BIOS-e820: [mem 0x00000000a6fff000-0x00000000a6ffffff] usable¬
Mar 9 22:44:05 localserver kernel: BIOS-e820: [mem 0x00000000a7000000-0x00000000af9fffff] reserved¬
Mar 9 22:44:05 localserver kernel: BIOS-e820: [mem 0x00000000e0000000-0x00000000efffffff] reserved¬
Mar 9 22:44:05 localserver kernel: BIOS-e820: [mem 0x00000000feb00000-0x00000000feb03fff] reserved¬
Mar 9 22:44:05 localserver kernel: BIOS-e820: [mem 0x00000000fec00000-0x00000000fec00fff] reserved¬
Mar 9 22:44:05 localserver kernel: BIOS-e820: [mem 0x00000000fed10000-0x00000000fed19fff] reserved¬
Mar 9 22:44:05 localserver kernel: BIOS-e820: [mem 0x00000000fed1c000-0x00000000fed1ffff] reserved¬
Mar 9 22:44:05 localserver kernel: BIOS-e820: [mem 0x00000000fee00000-0x00000000fee00fff] reserved¬

User avatar
TrevorH
Site Admin
Posts: 33218
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: CentOS auto restart

Post by TrevorH » 2017/03/12 00:21:09

So what that shows is that your machine isn't shutting down, it's just restarting with no warning. That would usually be a power problem or a kernel panic. I'd start by checking out the hardware to make sure it's ok - run memtest86+ for a few hours, maybe a day. See what it says.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

kceiw
Posts: 5
Joined: 2017/03/10 15:18:25

Re: CentOS auto restart

Post by kceiw » 2017/03/18 03:04:34

Thanks for your reply. I'll check the hardware then. I'll post if I find anything.

SIGBUS
Posts: 14
Joined: 2007/05/28 15:39:06

Re: CentOS auto restart

Post by SIGBUS » 2017/03/22 14:21:41

There's also a possibility that this is a problem with the power supply. I've experienced random reboots from bad PSUs before. This is especially likely with consumer-grade power supplies that often have cheap capacitors which eventually fail and deliver severe ripple in their DC outputs.

kceiw
Posts: 5
Joined: 2017/03/10 15:18:25

Re: CentOS auto restart

Post by kceiw » 2017/04/15 19:35:28

I ran memtest86+ but it didn't report any problems.
I uninstall most desktop related packages including xorg-x11 and gnome, since I only use it as a server.
After all of them, the problem is not solved. it still reboots somehow. Or it hangs. And I have to manually power off the machine and start again.
This is a Gateway laptop. It is plugged to an external power and also using the battery.

I don't know how to continue to investigate the problem now.

Thanks,
Mao

hlinder
Posts: 1
Joined: 2017/01/18 18:22:02

Re: CentOS auto restart

Post by hlinder » 2017/04/21 21:53:25

Have you enabled kdump to get the vmcore to analyze?

kceiw
Posts: 5
Joined: 2017/03/10 15:18:25

Re: CentOS auto restart

Post by kceiw » 2017/05/04 13:44:39

It seems like the battery is faulted.

I unplugged the battery and so far the machine doesn't reboot yet.

It's strange that with battery and AC plugged in, a faulted battery still causes reboot. Shouldn't it get power from external AC?

Post Reply