Sami Mäntysaari
2015-Jul-03 12:45 UTC
[Nut-upsuser] upsd: ERR ACCESS-DENIED with PowerWalker UPS
Hello, I'm having problems when trying to execute an deep battery test. UPS Model: PowerWalker VI 1000. root at HP-Opreon:/# upscmd PowerWalker at localhost test.battery.start.deep Username (root): admin Password: Unexpected response from upsd: ERR ACCESS-DENIED /etc/hosts.allow: <code> # /etc/hosts.allow: list of hosts that are allowed to access the system. # See the manual pages hosts_access(5) and hosts_options(5). # # Example: ALL: LOCAL @some_netgroup # ALL: .foobar.edu EXCEPT terminalserver.foobar.edu # # If you're going to protect the portmapper use the name "rpcbind" for the # daemon name. See rpcbind(8) and rpc.mountd(8) for further information. # upsd : admin at localhost : ALLOW </code> /etc/nut/upsd.users: <code> [ups_admin] password = mypass1 upsmon master [admin] password = mypass2 actions = set actions = fsd instcmds = all </code> upscmd -l PowerWalker at localhost: <code> Instant commands supported on UPS [PowerWalker]: beeper.toggle - Toggle the UPS beeper load.off - Turn off the load immediately load.on - Turn on the load immediately shutdown.return - Turn off the load and return when power is back shutdown.stayoff - Turn off the load and remain off shutdown.stop - Stop a shutdown in progress test.battery.start - Start a battery test test.battery.start.deep - Start a deep battery test test.battery.start.quick - Start a quick battery test test.battery.stop - Stop the battery test </code> Best Regards, Sami M?ntysaari
Charles Lepple
2015-Jul-03 14:09 UTC
[Nut-upsuser] upsd: ERR ACCESS-DENIED with PowerWalker UPS
On Jul 3, 2015, at 8:45 AM, Sami M?ntysaari <sm at sami-mantysaari.com> wrote:> root at HP-Opreon:/# upscmd PowerWalker at localhost test.battery.start.deep > Username (root): admin > Password: > Unexpected response from upsd: ERR ACCESS-DENIEDDid you reload the upsd after editing the configuration files? `upsd -c reload` as root. Also, check syslog for further details on the error. -- Charles Lepple clepple at gmail
Charles Lepple
2015-Jul-04 13:16 UTC
[Nut-upsuser] upsd: ERR ACCESS-DENIED with PowerWalker UPS
[please keep the list CC'd] On Jul 4, 2015, at 8:09 AM, Sami M?ntysaari <sm at sami-mantysaari.com> wrote:> I have reloaded it, but still the same result. > > Any ideas?Not sure. Can you provide any additional details about the OS and version of NUT?> snip from syslog: > <code> > Jul 4 15:04:25 HP-Opreon kernel: [66083.548290] usb 2-1: usbfs: > USBDEVFS_CONTROL failed cmd blazer_usb rqt 33 rq 9 len 8 ret -110 > Jul 4 15:06:31 HP-Opreon blazer_usb[1143]: Signal 15: exiting > Jul 4 15:06:31 HP-Opreon upsd[1145]: Can't connect to UPS [PowerWalker] > (blazer_usb-PowerWalker): No such file or directory > Jul 4 15:06:31 HP-Opreon upsmon[1078]: Poll UPS [PowerWalker at localhost] > failed - Driver not connected > Jul 4 15:06:31 HP-Opreon upsmon[1078]: Communications with UPS > PowerWalker at localhost lost > Jul 4 15:06:36 HP-Opreon upsmon[1078]: Poll UPS [PowerWalker at localhost] > failed - Driver not connected > Jul 4 15:06:38 HP-Opreon blazer_usb[12941]: Startup successful > Jul 4 15:06:40 HP-Opreon upsd[1145]: Connected to UPS [PowerWalker]: > blazer_usb-PowerWalker > Jul 4 15:06:41 HP-Opreon upsmon[1078]: Communications with UPS > PowerWalker at localhost established > Jul 4 15:07:29 HP-Opreon upsd[1145]: mainloop: Interrupted system call > Jul 4 15:07:29 HP-Opreon upsd[1145]: SIGHUP: reloading configuration > </code> > > 3.7.2015, 17:09, Charles Lepple kirjoitti: >> On Jul 3, 2015, at 8:45 AM, Sami M?ntysaari <sm at sami-mantysaari.com> wrote: >> >>> root at HP-Opreon:/# upscmd PowerWalker at localhost test.battery.start.deep >>> Username (root): admin >>> Password: >>> Unexpected response from upsd: ERR ACCESS-DENIED >> Did you reload the upsd after editing the configuration files? `upsd -c reload` as root. >> >> Also, check syslog for further details on the error. >> >-- Charles Lepple clepple at gmail
Charles Lepple
2015-Jul-04 16:20 UTC
[Nut-upsuser] upsd: ERR ACCESS-DENIED with PowerWalker UPS
On Jul 3, 2015, at 8:45 AM, Sami M?ntysaari <sm at sami-mantysaari.com> wrote:> /etc/hosts.allow: > <code> > # /etc/hosts.allow: list of hosts that are allowed to access the system. > # See the manual pages hosts_access(5) and > hosts_options(5). > # > # Example: ALL: LOCAL @some_netgroup > # ALL: .foobar.edu EXCEPT terminalserver.foobar.edu > # > # If you're going to protect the portmapper use the name "rpcbind" for the > # daemon name. See rpcbind(8) and rpc.mountd(8) for further information. > # > > upsd : admin at localhost : ALLOW > </code>I started looking into this a bit more. There are a few debug statements we could add to the upsd source code, but to be honest, my personal preference is to use a kernel-level firewall and/or bind to the localhost interface, rather than use tcp_wrappers and hosts.allow. By default, upsd will listen to localhost:3943 (unless you add additional LISTEN statements to upsd.conf, or compile in a different listening address). So commenting out the "upsd:..." line in /etc/hosts.allow should work. If your upsd.conf had extra LISTEN statements, you will need to completely restart upsd (the "upsd -c reload" only works for basic configuration changes). -- Charles Lepple clepple at gmail