Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

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

If none of the specific sub-forums seem right for your thread, ask here.
Post Reply
Message
Author
csabix
Posts: 194
Joined: 2007-09-23 21:15
Location: Sf Gheorghe
Contact:

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

#1 Post by csabix »

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.

TonyT
Posts: 575
Joined: 2006-09-04 11:57

Re: Server not shutting down if up for more hours

#2 Post by TonyT »

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.

csabix
Posts: 194
Joined: 2007-09-23 21:15
Location: Sf Gheorghe
Contact:

Re: Server not shutting down if up for more hours

#3 Post by csabix »

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...

User avatar
GarryRicketson
Posts: 5644
Joined: 2015-01-20 22:16
Location: Durango, Mexico

Re: Server not shutting down if up for more hours

#4 Post by GarryRicketson »

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.

csabix
Posts: 194
Joined: 2007-09-23 21:15
Location: Sf Gheorghe
Contact:

Re: Server not shutting down if up for more hours

#5 Post by csabix »

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.

User avatar
debiman
Posts: 3063
Joined: 2013-03-12 07:18

Re: Server not shutting down if up for more hours

#6 Post by debiman »

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.

csabix
Posts: 194
Joined: 2007-09-23 21:15
Location: Sf Gheorghe
Contact:

Re: Server not shutting down if up for more hours

#7 Post by csabix »

Both dmessg and journalctl were checked.
The machine was running Jessie without issues.

TonyT
Posts: 575
Joined: 2006-09-04 11:57

Re: Server not shutting down if up for more hours

#8 Post by TonyT »

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 ?

csabix
Posts: 194
Joined: 2007-09-23 21:15
Location: Sf Gheorghe
Contact:

Re: Server not shutting down if up for more hours

#9 Post by csabix »

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
Contact:

Re: Server not shutting down if up for more hours

#10 Post by csabix »

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.

Post Reply