Hi Charles, Thanks for your help. Seems to be mostly ok except am getting error access denied. See below. I see from searching this is a common error but so far I can't find a fix. This is how I configured things before make and install. created group nut nut:x:103: created system user ups with group nut. ups:x:123:103::/home/ups:/bin/bash Create statepath directory. sudo mkdir -p /var/state/ups sudo chmod 0770 /var/state/ups sudo chown root:nut /var/state/ups ./configure --prefix=/usr --with-usb --with-user=ups --with-group=nut --with-udev-dir=/etc/udev --with-drivers=blazer_usb Had to enable both these services. They weren't enabled by default. sudo systemctl enable nut-server sudo systemctl enable nut-monitor $ sudo /usr/sbin/upsmon -DD Network UPS Tools upsmon 2.7.4 ?? 0.000000??? fopen /var/run/upsmon.pid: No such file or directory ?? 0.000143??? UPS: defender at localhost (master) (power value 1) ?? 0.000270??? Using power down flag file /etc/killpower ?? 0.000422??? debug level is '2' ?? 0.003814??? Trying to connect to UPS [defender at localhost] ?? 0.004327??? Login on UPS [defender at localhost] failed - got [ERR ACCESS-DENIED] ?? 5.004467??? pollups: defender at localhost ?? 5.004630??? parse_status: [OL] ? 10.004764??? pollups: defender at localhost ? 10.004922??? parse_status: [OL] ? 15.005048??? pollups: defender at localhost ? 15.005208??? parse_status: [OL] ? 20.005319??? pollups: defender at localhost ? 20.005485??? parse_status: [OL] ? 25.005600??? pollups: defender at localhost ? 25.005762??? parse_status: [OL] ^C? 25.379863??? Signal 2: exiting ? 25.379899??? Dropping connection to UPS [defender at localhost] upsmon.pid is in /run directory. upsmon is looking for it in /var/run. /var/state/ups contains blazer_usb-defender, blazer_usb-defender.pid and upsd.pid. Any help would be greatly appreciated. On 17/09/17 02:28, Charles Lepple wrote:> On Sep 15, 2017, at 11:15 PM, MTS <mts5204 at bigpond.com> wrote: >> Hi, >> >> I thought it might be problematic. I am really frustrated I cannot get it working on Solus. >> I use Solus way more than Mint these days and it would be nice to have NUT working. > If you describe the problems you are having when trying to build it, maybe we can help. > > Please use reply-all to keep the list CC'd.
On Sep 17, 2017, at 3:26 AM, MTS <mts5204 at bigpond.com> wrote:> > 0.003814 Trying to connect to UPS [defender at localhost] > 0.004327 Login on UPS [defender at localhost] failed - got [ERR ACCESS-DENIED]The MONITOR line in upsmon.conf needs to match a NUT user in upsd.users. http://networkupstools.org/docs/man/upsmon.conf.html http://networkupstools.org/docs/man/upsd.users.html Looks like you are using this as a master system (UPS is directly connected, and upsmon shuts down that system), so the appropriate NUT user needs "upsmon master" in upsd.users. Note that the NUT users listed in upsd.users do not need to correspond to actual system users - think of them more as roles. If you add a slave system that connects over the network, you might not want it to be able to shut down the master, so you would use a different NUT username with "upsmon slave" privileges.
Hi Charles, I am using the same configs as I have in Linux Mint. What do I need to change here? ups.conf [defender] ??? driver = blazer_usb ??? port = auto ??? pollinterval = 5 ??? desc = "PowerShield Defender 650" upsd ??? default.battery.voltage.high = 13.70 ??? default.battery.voltage.low = 10.40 upsd.users [local_mon] ??? ??? password = ******** ??? ??? allowfrom = localhost ??? ??? actions = set ??? ??? actions = fsd ??? ??? instcmds = all ??? ??? upsmon master upsmon.conf MONITOR??? defender at localhost 1 local_mon *********** master On 17/09/17 22:12, Charles Lepple wrote:> On Sep 17, 2017, at 3:26 AM, MTS <mts5204 at bigpond.com> wrote: >> 0.003814 Trying to connect to UPS [defender at localhost] >> 0.004327 Login on UPS [defender at localhost] failed - got [ERR ACCESS-DENIED] > The MONITOR line in upsmon.conf needs to match a NUT user in upsd.users. > > http://networkupstools.org/docs/man/upsmon.conf.html > > http://networkupstools.org/docs/man/upsd.users.html > > Looks like you are using this as a master system (UPS is directly connected, and upsmon shuts down that system), so the appropriate NUT user needs "upsmon master" in upsd.users. > > Note that the NUT users listed in upsd.users do not need to correspond to actual system users - think of them more as roles. If you add a slave system that connects over the network, you might not want it to be able to shut down the master, so you would use a different NUT username with "upsmon slave" privileges.
Hi Charles, Not getting error re login for upsmon now. When turning off power I am getting the following failed error. Sep 18 10:35:24 solus upsmon[685]:*UPS defender at localhost on battery* Sep 18 10:35:32 solus upssched[1261]:*Failed to connect to parent and failed to create parent: No such file or directory* Sep 18 10:35:44 solus upsmon[685]:*UPS defender at localhost on line power* Is this another permission issue. upssched.conf? root:nut 640 CMDSCRIPT /usr/etc/upsShutdownNow.sh # mandatory fields that must be set before AT commands PIPEFN /var/run/nut/upssched.pipe LOCKFN /var/run/nut/upssched.lock # the timers, here 120 sec after the ONBATT (ups on battery) event AT ONBATT * START-TIMER onbatt 120 # cancel the countdown if power is back AT ONLINE * CANCEL-TIMER onbatt Note I didn't have? /var/run/nut folder so created one. On 17/09/17 22:12, Charles Lepple wrote:> On Sep 17, 2017, at 3:26 AM, MTS <mts5204 at bigpond.com> wrote: >> 0.003814 Trying to connect to UPS [defender at localhost] >> 0.004327 Login on UPS [defender at localhost] failed - got [ERR ACCESS-DENIED] > The MONITOR line in upsmon.conf needs to match a NUT user in upsd.users. > > http://networkupstools.org/docs/man/upsmon.conf.html > > http://networkupstools.org/docs/man/upsd.users.html > > Looks like you are using this as a master system (UPS is directly connected, and upsmon shuts down that system), so the appropriate NUT user needs "upsmon master" in upsd.users. > > Note that the NUT users listed in upsd.users do not need to correspond to actual system users - think of them more as roles. If you add a slave system that connects over the network, you might not want it to be able to shut down the master, so you would use a different NUT username with "upsmon slave" privileges.-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.alioth.debian.org/pipermail/nut-upsuser/attachments/20170918/8bfb8744/attachment.html>
Hi Charles, I finally succeeded in getting a successful shutdown. From upssched.conf: # mandatory fields that must be set before AT commands PIPEFN /var/run/nut/upssched.pipe LOCKFN /var/run/nut/upssched.lock I had to create /var/run/nut directory. Owned by ups, group nut. Then it all worked fine. Seems the only thing left to do is to try and follow the readme instructions in the scripts folder for the nut monitor. It didn't install this, unlike the Linux Mint install which did. On 17/09/17 22:12, Charles Lepple wrote:> On Sep 17, 2017, at 3:26 AM, MTS <mts5204 at bigpond.com> wrote: >> 0.003814 Trying to connect to UPS [defender at localhost] >> 0.004327 Login on UPS [defender at localhost] failed - got [ERR ACCESS-DENIED] > The MONITOR line in upsmon.conf needs to match a NUT user in upsd.users. > > http://networkupstools.org/docs/man/upsmon.conf.html > > http://networkupstools.org/docs/man/upsd.users.html > > Looks like you are using this as a master system (UPS is directly connected, and upsmon shuts down that system), so the appropriate NUT user needs "upsmon master" in upsd.users. > > Note that the NUT users listed in upsd.users do not need to correspond to actual system users - think of them more as roles. If you add a slave system that connects over the network, you might not want it to be able to shut down the master, so you would use a different NUT username with "upsmon slave" privileges.