I click shutdown in the WebGUI but the machine restarts

Status
Not open for further replies.

wreuel

Dabbler
Joined
Oct 26, 2012
Messages
47
Hey Guys,

I'm here again, the problem now is pretty funny, when I click on the WebGUI Shutdownd the machine restarts, anyone have any idea what this is? And how can I solve?
 

ben

FreeNAS GUI Developer
Joined
May 24, 2011
Messages
373
What happens if you enter 'poweroff now' at the console or web shell?
 

wreuel

Dabbler
Joined
Oct 26, 2012
Messages
47
I entered 'poweroff now' in the web shell and system called me to use 'shutdown' then i used 'shutdown -h now' and the server showed in the monitor 'please enter any key for to reboot' then i pressed any key and the machine restarted...

When the machine restart, in your main menu I selected the option 11 which is the option for shutdown, and the machine turned off usually

And now? What can I do?!?
 

ben

FreeNAS GUI Developer
Joined
May 24, 2011
Messages
373
Uh, shutdown -p is the poweroff one, but that's still interesting. After a normal shutdown and then boot, does the shutdown button in the webUI still reboot the system? (Grasping at straws here. My best guess would be that this is something hardware specific.) For your own purposes, check if 'shutdown -p now' does shut down the system properly, and if it does, I guess use that from the web shell from now on instead of the GUI button.
 

praecorloth

Contributor
Joined
Jun 2, 2011
Messages
159
(Grasping at straws here. My best guess would be that this is something hardware specific.)

True facts right here. I've built a number of machines recently that power back on after shutdown. I can tell you it's not FreeNAS or even *nix specific. I've seen it in Ubuntu, Windows XP, Windows 7, and FreeNAS. I have no idea what's up with it. I know it's not the Power On After Power Loss setting, because often I use the power supply power switch to turn these machines off once and for all. After it has had a moment to sit in the off state, I can turn that power back on and the computer remains off until I hit the actual power button. So weird. I had a theory that maybe I have the power button plugged in to the motherboard backwards, but that seems silly and I'm too lazy to test it.
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
I've seen machine not turn off completely(they sit at the "you can turn off your computer now" screen) or reboot even if you choose shutdown. Back when I started noticing this problem with certain machines in 2002 my research led me to the ACPI specification. When your motherboard manucfacturer customizes the BIOS for your particular motherboard sometimes the ACPI spec is not followed precisely. This causes the odd failure to shutdown and rebooting when trying to shutdown issues. At least, this is based on my research years ago. I could be completely off base, but I do know one of my problem machines fixed itself after a BIOS update in 2004.
 

ProtoSD

MVP
Joined
Jul 1, 2011
Messages
3,348
I had a theory that maybe I have the power button plugged in to the motherboard backwards, but that seems silly and I'm too lazy to test it.

Switches don't have any polarity, this won't make any difference.

I've seen this before also, I think it is a setting in the BIOS, but I don't think its available in all BIOS's and I don't remember what setting it is. I'm sure if you google it you'll turn up some info.
 

ProtoSD

MVP
Joined
Jul 1, 2011
Messages
3,348
I've seen machine not turn off completely(they sit at the "you can turn off your computer now" screen) or reboot even if you choose shutdown. Back when I started noticing this problem with certain machines in 2002 my research led me to the ACPI specification. When your motherboard manucfacturer customizes the BIOS for your particular motherboard sometimes the ACPI spec is not followed precisely. This causes the odd failure to shutdown and rebooting when trying to shutdown issues. At least, this is based on my research years ago. I could be completely off base, but I do know one of my problem machines fixed itself after a BIOS update in 2004.

Yes, you're correct, this seems to ring a bell as to what the cause is.
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
I remember now! Win XP machine... if you had ACPI disabled in the BIOS and installed XP you couldn't enable it later and get a proper shutdown. It had to be enabled during XP installation. Alot of friends stupidly disabled ACPI thinking it was bad for their overclock then were upset when the PC would not turn off. Well, duh!

So yeah, check your BIOS for ACPI and enable it if possible. There's different versions too, so if you can choose a version I'd just go with whichever is highest.
 

joeschmuck

Old Man
Moderator
Joined
May 28, 2011
Messages
10,994
What is odd is using the GUI to select shutdown results in a reboot yet using the console results in an actual shutdown, if I read the postings properly. I wouldn't think that was an ACPI issue. I'm curious what 'shutdown -p now' results in, I suspect it will shutdown. Something else I'm curious of, is there any Wake-On-Lan action possibly going on or wake-on-usb. I have a computer which will power on based on pressing any USB/PS2 keyboard key, maybe there is an UPS plugged into a USB port causing it? There are a many things we don't know about the system being used. I tried to locate the user manual for the MB but no luck on the internet for me.
 

ben

FreeNAS GUI Developer
Joined
May 24, 2011
Messages
373
Oh, one clarification: 'poweroff now' is the wrong command, it should just have been 'poweroff' or 'shutdown -p now' (that's why it suggested 'shutdown' instead). (I checked the man page.)
 

joeschmuck

Old Man
Moderator
Joined
May 28, 2011
Messages
10,994
Oh, one clarification: 'poweroff now' is the wrong command, it should just have been 'poweroff' or 'shutdown -p now' (that's why it suggested 'shutdown' instead). (I checked the man page.)
I've never used 'poweroff' before so I just tried it and sure enough it works great on FreeNAS 8.3.0-Release. I'm using that command from now on vice 'shutdown -p now'. Thanks Ben!
 

ben

FreeNAS GUI Developer
Joined
May 24, 2011
Messages
373
On more mutable systems than FreeNAS, I like to alias 'poweroff' to 'gtfo', 'dirtnap', or the like. Makes shutting down just a little more fun.
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
On more mutable systems than FreeNAS, I like to alias 'poweroff' to 'gtfo', 'dirtnap', or the like. Makes shutting down just a little more fun.

OOO. That sounds like fun! I'll have to read up on "alias"es :D
 

wreuel

Dabbler
Joined
Oct 26, 2012
Messages
47
while the discussion rolling here, did some testing, and after I reset the bios, turned off the machine using the main menu via the keyboard that was attached to it the "Shutdownd" of WebGUI is functioning normally, without problems, and Wake-On-Lan also. :cool:
 

joeschmuck

Old Man
Moderator
Joined
May 28, 2011
Messages
10,994
Glad to see it's working properly. Hope you are out of the woods with problems because unfortunately you are having more than your fair share.
 
Status
Not open for further replies.
Top