Re: [Nut-upsuser] Ubuntu server won't restart

2011-02-20 Thread Arjen de Korte

Citeren Erik Hjertén e...@hjerten.com:

I'm quite stuck now so any pointers on how to troubleshoot is most  
appreciated.


The first thing to check is whether or not the UPS receives the  
shutdown command. Power your system from an alternative source (this  
is important!) and run the command


/path/to/usbhid-ups -k -a UPS

This signals the UPS to cycle the output (if mains is present) or  
shutdown the output and wait for the power to return (if not). Look at  
the console for messages that are displayed.


If the above works (both with and without mains present), there  
probably is an issue with running this command late in the system halt  
script. This is something the people from Ubuntu should be able to  
help you with. If it doesn't work, come back here for more help.


Best regards, Arjen
--
Please keep list traffic on the list (off-list replies will be rejected)


___
Nut-upsuser mailing list
Nut-upsuser@lists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/nut-upsuser

Re: [Nut-upsuser] Ubuntu server won't restart

2011-02-20 Thread Erik Hjertén

Thanks Arjen, problem solved. Comments below.

Arjen de Korte skrev 2011-02-20 09:23:

Citeren Erik Hjertén e...@hjerten.com:

I'm quite stuck now so any pointers on how to troubleshoot is most 
appreciated.


The first thing to check is whether or not the UPS receives the 
shutdown command. Power your system from an alternative source (this 
is important!) and run the command


/path/to/usbhid-ups -k -a UPS

This signals the UPS to cycle the output (if mains is present) or 
shutdown the output and wait for the power to return (if not). Look at 
the console for messages that are displayed.
This worked as expected although it took about 60 sec for the UPS to 
power off. The server had plenty of time to shutdown gracefully.


I examined the /etc/init.d/ups-monitor script (which is called from 
/etc/init.d/halt) and I noticed a reference to a POWEROFF_WAIT statement 
in /etc/default/nut. If present, the ups-monitor script waits the 
specified amount of time for the UPS to power down. If it doesn't, 
ups-monitor reboots the server.


So I added POWEROFF_WAIT = 75 and now everything seems to work fine.

Is this an appropriate way of solving this?

Again, thanks for your help!

Kind regards
/Erik

___
Nut-upsuser mailing list
Nut-upsuser@lists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/nut-upsuser

[Nut-upsuser] Ubuntu server won't restart

2011-02-19 Thread Erik Hjertén

Hi all

I have a simple setup:
Ubuntu 9.04 server
APC Back-UPS ES-700 connected with USB
nut installed from packages (apt-get install nut). I guess that makes it 
version 2.4.1 ?


The problem:
When issuing: upsmon -c fsd I get a messages that the server will halt, 
and it does. But it won't restart again.


I have set the BIOS to always power on, and this works fine when if I 
just cut the power and turn it back on without the UPS connected.


If I understand this correctly the script /etc/init.d/halt is supposed 
to poweroff the UPS to cut the power to the server rather than letting 
it halt gracefully, and in that way make use of the BIOS power setting? 
I supect that this doesn't happen in my server and now I need help 
trouble shooting this.


My configurations files are as follows:

/etc/nut/nut.conf:
MODE=netserver

/etc/nut/ups.conf
[UPS]
driver = usbhid-ups
port = auto

/etc/nut/upsd.users
[zem_mon]
password = password
allowfrom = localhost
upsmon master

[monuser]
password = password
allowfrom = local
upsmon master

/etc/nut/upsmon.conf
MINSUPPLIES 1
SHUTDOWNCMD /sbin/shutdown -h +0 #also tried /sbin/shutdown -P +0 here
POLLFREQ 5
POLLFREQALERT 5
HOSTSYNC 15
DEADTIME 15
POWERDOWNFLAG /etc/killpower
RBWARNTIME 43200
NOCOMMWARNTIME 300
FINALDELAY 5
MONITOR UPS@localhost 1 zem_mon password master

in /var/log/daemon.log I have:
Feb 19 20:24:25 hactar upsmon[5328]: Signal 10: User requested FSD
Feb 19 20:24:25 hactar upsd[5324]: Client zem_mon@127.0.0.1 set FSD on 
UPS [UPS]

Feb 19 20:24:25 hactar upsmon[5328]: Executing automatic power-fail shutdown
Feb 19 20:24:25 hactar upsmon[5328]: Auto logout and shutdown proceeding
...
Feb 19 20:24:41 hactar upsd[5324]: mainloop: Interrupted system call
Feb 19 20:24:41 hactar upsd[5324]: Signal 15: exiting
Feb 19 20:24:41 hactar usbhid-ups[5322]: Signal 15: exiting

that seems to be UPS related.

Last message in /vat/log/syslog is:
Feb 19 20:24:41 hactar exiting on signal 15
 which seems to be a proper halt?

I'm quite stuck now so any pointers on how to troubleshoot is most 
appreciated.


Kind regards
/Erik Hjertén

___
Nut-upsuser mailing list
Nut-upsuser@lists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/nut-upsuser