2

I installed Nut on Ubuntu 16.04 server to connect with my Eaton 5SC-750 following this guide. However, when I unplug the UPS from the wall, the server immediately shuts down, with out displaying any messages at the console.

It appears to me that a Forced ShutDown is being issued instead of executing the script supplied by the guide. Why? and How do I fix it?

I would like it to run on battery for 2 minutes before shutting down. I plan to connect a second server (as a slave in Nut) to this UPS.

Here are the syslog entries from switching-to-battery shutdowns:

Feb  3 14:49:17 Hutch upsmon[1252]: UPS philip@localhost on battery
Feb  3 14:49:17 Hutch upsmon[1252]: Signal 10: User requested FSD
Feb  3 14:49:17 Hutch upsd[1235]: Client monuser@::1 set FSD on UPS [philip]
Feb  3 14:49:17 Hutch upsmon[1252]: Executing automatic power-fail shutdown
Feb  3 14:49:17 Hutch upsmon[1252]: Auto logout and shutdown proceeding 

Config file contents (minus comments):

nut.conf

MODE=standalone

ups.conf

[philip]
    driver = usbhid-ups
    port = auto
    desc = "Eaton 5SC750 UPS"

upsd.conf

LISTEN 127.0.0.1 3493
LISTEN ::1 3493
LISTEN 203.192.151.2 3493

upsd.users

[admin]
   password = ********
   actions = SET
   instcmds = ALL

[monuser]
    password = *********
    instcmds = ALL
    upsmon master

[monuserc]
    password = ********
    upsmon slave

[monuserv]
    password = ********
    upsmon slave

upsmon.conf

[monuser]
    password = ********
    #actions = SET FSD
    instcmds = ALL
    upsmon master

[monuserslave]
    password = ********
    upsmon slave

MINSUPPLIES 1
SHUTDOWNCMD "/sbin/shutdown -P now"
NOTIFYCMD /etc/nut/notifycmd
POLLFREQ 5
POLLFREQALERT 5
HOSTSYNC 15
DEADTIME 15
POWERDOWNFLAG /etc/killpower
NOTIFYFLAG ONLINE      SYSLOG+WALL
NOTIFYFLAG ONBATT      SYSLOG+WALL+EXEC
NOTIFYFLAG LOWBATT     SYSLOG+WALL+EXEC
NOTIFYFLAG FSD SYSLOG+WALL
NOTIFYFLAG COMMOK      SYSLOG+WALL
NOTIFYFLAG COMMBAD     SYSLOG+WALL
NOTIFYFLAG SHUTDOWN    SYSLOG+WALL
NOTIFYFLAG REPLBATT    SYSLOG+WALL
NOTIFYFLAG NOCOMM      SYSLOG+WALL
NOTIFYFLAG NOPARENT    SYSLOG+WALL
FINALDELAY 5

/etc/nut/notifycmd

#!/bin/bash
#
# NUT NOTIFYCMD script

PATH=/sbin:/usr/sbin:/bin:/usr/bin:/usr/local/sbin:/usr/local/bin

trap "exit 0" SIGTERM

if [ "$NOTIFYTYPE" = "ONLINE" ]
then
    echo $0: power restored | wall
    # Cause all instances of this script to exit.
    killall -s SIGTERM `basename $0`
fi

if [ "$NOTIFYTYPE" = "ONBATT" ]
then
    echo $0: 2 minutes till system powers down... | wall
    # Loop with one second interval to allow SIGTERM reception.
    let "n = 120"
    while [ $n -ne 0 ]
    do
            sleep 1
            let "n--"
    done
    echo $0: commencing shutdown | wall
    upsmon -c fsd
fi

Thanks

1 Answers1

0

This question is more than three years old, but for anybody who experiences the same problem: have you checked whether your UPS maybe has one or more outputs that are not backed up by the battery? In my case, I managed to choose the single outlet that has surge protection only for the NUT server and when simulating a power outage, it of course shut off immediately, and the slaves stayed on. After finding out and changing around the plugs, everything worked well.

reus
  • 1