[Workaround] Server not shutting down if up for more hours

If none of the more specific forums is the right place to ask

[Workaround] Server not shutting down if up for more hours

Postby csabix » 2018-02-26 14:18

Hello all


I have this problem (and another one which I'll post in a separate thread) for quite some time.
In august I set up a Debian Stretch server. From the first day, the server doesn't shut down but reboots. Since then, I did install all updates hoping that there will be a kernel fix or something.
The interesting fact is that if I cold start the server or I reboot it, for a few hours after, I can shut it down with poweroff command and by pressing the (hardware) power button.
I need it to be able to shut down because it is not used during the night (wasted electricity) and it only raises the statistical chance of being hacked.

Did any of you encounter this problem and if so, how did you solve it?
Thank you!
Last edited by csabix on 2018-04-26 17:00, edited 1 time in total.
csabix
 
Posts: 194
Joined: 2007-09-23 21:15
Location: Sf Gheorghe

Re: Server not shutting down if up for more hours

Postby TonyT » 2018-02-26 23:31

what happens if you shutdown using either of these commands (as root or sudo):
halt
or
shutdown -h now

Also, use:
poweroff --verbose
to see what glitches may exist.
TonyT
 
Posts: 545
Joined: 2006-09-04 11:57

Re: Server not shutting down if up for more hours

Postby csabix » 2018-02-27 17:11

Have tried all those three possibilities (used poweroff without --verbose option because it is not a valid option).
All render the same effect: if the computer has been started recently, it can be shut down. If it's running for more hours, it reboots.
I forgot to mention that reboot looks like a complete shutdown: lights go off, HDD spins down and PSU fan stops for a second. Then, all wakes up.
It crossed my mind that it might be a hardware issue but since it appeared the same day I installed Stretch...
csabix
 
Posts: 194
Joined: 2007-09-23 21:15
Location: Sf Gheorghe

Re: Server not shutting down if up for more hours

Postby GarryRicketson » 2018-02-27 17:39

Maybe some search foo :
What is the proper way to shutdown or reboot a Debian 9 server

Hint:
systemctl command to issue poweroff/reboot. As stated in the manpages of reboot and shutdown they are "a legacy command available for compatibility only." and the systemctl method will be the only one safe.
User avatar
GarryRicketson
 
Posts: 5117
Joined: 2015-01-20 22:16
Location: Durango, Mexico

Re: Server not shutting down if up for more hours

Postby csabix » 2018-02-27 18:21

Done that way before posting on this forum :)

As I said, the command itself is not the issue since it works right after cold start.
csabix
 
Posts: 194
Joined: 2007-09-23 21:15
Location: Sf Gheorghe

Re: Server not shutting down if up for more hours

Postby debiman » 2018-02-27 18:41

could be an ACPI issue - i've heard about this, machines rebooting instead of shutting down.
also websearch your machine specs + your issue.

also please look at 'dmesg' and 'journalctl' for hints as to what might be going on, and include the results in your searches.
User avatar
debiman
 
Posts: 2900
Joined: 2013-03-12 07:18

Re: Server not shutting down if up for more hours

Postby csabix » 2018-02-27 19:15

Both dmessg and journalctl were checked.
The machine was running Jessie without issues.
csabix
 
Posts: 194
Joined: 2007-09-23 21:15
Location: Sf Gheorghe

Re: Server not shutting down if up for more hours

Postby TonyT » 2018-02-28 11:39

csabix wrote:Have tried all those three possibilities (used poweroff without --verbose option because it is not a valid option).

Sure it is!
https://linux.die.net/man/8/poweroff

Have you tried poweroff -f ?
TonyT
 
Posts: 545
Joined: 2006-09-04 11:57

Re: Server not shutting down if up for more hours

Postby csabix » 2018-02-28 13:14

Code: Select all
poweroff: unrecognized option '--verbose'


--verbose is for reboot, not poweroff. The page from the link you gave says: "Outputs slightly more verbose messages when REBOOTING"

poweroff -f reboots it, too.

I'll load some live distro to completely eliminate any hardware issue then I'll come back with the results.
csabix
 
Posts: 194
Joined: 2007-09-23 21:15
Location: Sf Gheorghe

Re: Server not shutting down if up for more hours

Postby csabix » 2018-04-05 06:10

I have some results.
I tested it with a live cd (Slax). It ran from morning to evening and it could be shut down.
I also tested to see if it can shut down after running Debian Stretch for 16 hours. And it does stop. Seems like the limit is somewhere beyond a full day, so it will not be an issue since it shuts down every night.
csabix
 
Posts: 194
Joined: 2007-09-23 21:15
Location: Sf Gheorghe


Return to General Questions

Who is online

Users browsing this forum: No registered users and 6 guests

fashionable