[Nut-upsuser] NUT UPS Slave Not Shutting Down
Neetish Bhat
neetishbhat at gmail.com
Fri Aug 5 05:51:34 UTC 2016
Hello All,
I'm trying to establish a MASTER SLAVE configuration of UPS using NUT
Driver.
I'm able to shutdown the master after UPS is on BATTERY ( POWER BLACKOUT)
.However I'm trying to shutdown the other SLAVE MACHINES BEFORE MASTER.
But at the remote side ( Slaves ) shutdown after UPS blackout does not
happen.
My configuration in Master are
/usr/etc/upsd.users
[ups_user]
password = admin
instcmds = all
allowfrom = localhost
actions = SET
upsmon master
[ups_slave]
password = admin
instcmds = all
actions = SET
upsmon slave
/usr/etc/ups.conf
[ups_genric]
driver = usbhid-ups
port = auto
ignorelb
override.battery.charge.low = 90
/usr/etc/upsmon.conf
MONITOR ups_genric at 127.0.0.1 1 ups_user pass admin master
SHUTDOWNCMD "/sbin/shutdown -h +0"
POWERDOWNFLAG /etc/nut/killpower
NOTIFYFLAG ONBATT SYSLOG+WALL+EXEC
NOTIFYFLAG ONLINE SYSLOG+WALL+EXEC
NOTIFYCMD "/usr/sbin/upssched"
/usr/etc/upssched.conf
CMDSCRIPT /usr/etc/ups_cmd_file
PIPEFN /usr/etc/upssched.pipe
LOCKFN /usr/etc/upssched.lock
AT ONBATT * START-TIMER onbatt 120
AT ONLINE * CANCEL-TIMER onbatt
/usr/etc/nut.conf
MODE = netserver
/usr/etc/upsd.conf
LISTEN 0.0.0.0 3493
LISTEN ::1 3493
AT SLAVE
/usr/etc/upsmon.conf
MONITOR ups_genric at 192.168.16.116 1 ups_slave pass admin slave
SHUTDOWNCMD "poweroff"
POWERDOWNFLAG poweroff
NOTIFYFLAG ONBATT SYSLOG+WALL+EXEC
NOTIFYFLAG ONLINE SYSLOG+WALL+EXEC
NOTIFYCMD "/usr/bin/upssched"
PS ! The Slave connects with UPS MASTER , when i monitor the upsmon using
upsmon -u root -D -F start
I get the output
root at nsb-3ms_series:~# upsmon -DDDDDDDDD -F -u root
root at nsb-3ms_series:~# upsmon -DDDDDDDDD -F -u root
Network UPS Tools upsmon 1.01-875
0.000000 fopen /var/run/upsmon.pid: No such file or directory
0.009147 UPS: ups_genric at 192.168.16.116 (slave) (power value 1)
0.009583 Using power down flag file poweroff
0.012923 debug level is '9'
0.222854 Trying to connect to UPS [ups_genric at 192.168.16.116]
0.226477 Can not connect to 192.168.16.116 in SSL, continue
uncrypted
0.228872 Login on UPS [ups_genric at 192.168.16.116] failed - got
[ERR ACCESS-DENIED]
0.229423 Current power value: 1
5.230023 pollups: ups_genric at 192.168.16.116
5.230164 get_var: ups_genric at 192.168.16.116 / status
5.231214 parse_status: [OL]
5.231348 parsing: [OL]
5.231415 ups_on_line: ups_genric at 192.168.16.116 (first time)
5.231482 Current power value: 1
5.231543 Minimum power value: 1
10.231707 pollups: ups_genric at 192.168.16.116
10.231831 get_var: ups_genric at 192.168.16.116 / status
10.232861 parse_status: [OB DISCHRG]
10.232975 parsing: [OB]
10.233051 ups_on_batt: ups_genric at 192.168.16.116 (first time)
10.233124 do_notify: ntype 0x0001 (ONBATT)
10.233190 UPS ups_genric at 192.168.16.116 on battery
10.233659 get_var: ups_genric at 192.168.16.116 / battery
10.234684 parsing: [DISCHRG]
10.234801 Current power value: 1
10.234866 Minimum power value: 1
sh: wall: not found
15.235033 pollups: ups_genric at 192.168.16.116
15.235160 get_var: ups_genric at 192.168.16.116 / status
15.236251 parse_status: [OB DISCHRG]
15.236361 parsing: [OB]
15.236433 ups_on_batt: ups_genric at 192.168.16.116 (first time)
15.236503 do_notify: ntype 0x0001 (ONBATT)
15.236569 UPS ups_genric at 192.168.16.116 on battery
15.237040 get_var: ups_genric at 192.168.16.116 / battery
15.238052 parsing: [DISCHRG]
15.238161 Current power value: 1
15.238227 Minimum power value: 1
30.245695 pollups: ups_genric at 192.168.16.116
30.245818 get_var: ups_genric at 192.168.16.116 / status
**35.251855 Poll UPS [ups_genric at 192.168.16.116] failed - Server
disconnected**
35.251973 do_notify: ntype 0x0005 (COMMBAD)
35.252041 Communications with UPS ups_genric at 192.168.16.116 lost
35.252518 Dropping connection to UPS [ups_genric at 192.168.16.116]
35.252709 Current power value: 1
35.252821 Minimum power value: 1
So as you can see, it detects the MASTER and gets status of UPS .
But MASTER shutsdown and slave still remains online.
35.251855 Poll UPS [ups_genric at 192.168.16.116] failed - Server
disconnected
Please help me
--
*Regards Neetish *
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/nut-upsuser/attachments/20160805/e534f7bf/attachment.html>
More information about the Nut-upsuser
mailing list