Roger,
Ok, I simplified it somewhat. I start all of the NUT services on the command
line after boot, to verify they are all starting correctly. They appear to be.
Doing this, I found the systemd service unit to somewhat reliably execute the
shutdown. I only tried 5 times, but it worked each time which is a fairly
significant change from previously. Still...hardly conclusive, and I'd
STILL rather use the shutdown script.
So I tried executing the shutdown command from the command line as well, and saw
the same error that I had gotten from the systemd service unit:
-----------------------------------------------------------------------------------------------
rtd at linux-5048:~> sudo /usr/local/ups/sbin/upsdrvctl -u ups start
root's password:
Network UPS Tools - UPS driver controller 2.7.2.6_RTD
Network UPS Tools - Generic HID driver 0.39 (2.7.2.6_RTD)
USB communication driver 0.32
writepid: fopen /var/run/ups/usbhid-ups-rtdups.pid: No such file or directory
Using subdriver: RTD UPS HID v1.0
rtd at linux-5048:~> sudo /usr/local/ups/sbin/upsd -u ups
Network UPS Tools upsd 2.7.2.6_RTD
fopen /var/run/ups/upsd.pid: No such file or directory
/usr/local/ups/etc/upsd.conf is world readable
listening on 127.0.0.1 port 3493
Connected to UPS [rtdups]: usbhid-ups-rtdups
/usr/local/ups/etc/upsd.users is world readable
rtd at linux-5048:~> sudo /usr/local/ups/sbin/upsmon -u ups
Network UPS Tools upsmon 2.7.2.6_RTD
fopen /var/run/ups/upsmon.pid: No such file or directory
UPS: rtdups at localhost (master) (power value 1)
Using power down flag file /etc/killpower
rtd at linux-5048:~> sudo /usr/local/ups/sbin/upsdrvctl shutdown
Network UPS Tools - UPS driver controller 2.7.2.6_RTD
Network UPS Tools - Generic HID driver 0.39 (2.7.2.6_RTD)
USB communication driver 0.32
Can't claim USB device [2a37:5110]: No such file or directory
Driver failed to start (exit status=1)
-----------------------------------------------------------------------------------------------
I executed lsusb to verify the USB device is there, and it is. I tried the
shutdown command again with debug enabled, but it didn't seem to reveal much
more:
-----------------------------------------------------------------------------------------------
rtd at linux-5048:~> sudo /usr/local/ups/sbin/upsdrvctl -DDDDD shutdown
Network UPS Tools - UPS driver controller 2.7.2.6_RTD
0.000000
If you're not a NUT core developer, chances are that you're told to
enable debugging
to see why a driver isn't working for you. We're sorry for the
confusion, but this is
the 'upsdrvctl' wrapper, not the driver you're interested in.
Below you'll find one or more lines starting with 'exec:' followed
by an absolute
path to the driver binary and some command line option. This is what the driver
starts and you need to copy and paste that line and append the debug flags to
that
line (less the 'exec:' prefix).
0.000137 Shutdown UPS: rtdups
0.000160 exec: /usr/local/ups/bin/usbhid-ups -a rtdups -k
Network UPS Tools - Generic HID driver 0.39 (2.7.2.6_RTD)
USB communication driver 0.32
Can't claim USB device [2a37:5110]: No such file or directory
0.007491 Driver failed to start (exit status=1)
-----------------------------------------------------------------------------------------------
I'm sure I'm doing something bone-headed, because this worked just a
couple months ago without near this much trouble.
Rob Groner
Software Engineer Level II
RTD Embedded Technologies, Inc.
ISO 9001 and AS9100 Certified
Ph: +1 814-234-8087
www.rtd.com
-----Original Message-----
From: Nut-upsuser [mailto:nut-upsuser-bounces+rgroner=rtd.com at
lists.alioth.debian.org] On Behalf Of Roger Price
Sent: Saturday, September 05, 2015 5:13 AM
To: nut-upsuser Mailing List <nut-upsuser at lists.alioth.debian.org>
Subject: Re: [Nut-upsuser] UPS/NUT with openSUSE 13.1
On Fri, 4 Sep 2015, Rob Groner wrote:
> Well, I tried the same script method with openSUSE 13.2, and it still did
not execute.
>
> So I tried the system method, and it worked 1 time out of 3 attempts. I
captured the last failure:
> 2015-09-04T11:43:38.825317-04:00 linux-5048 upsdrvctl[1887]: Can't
> claim USB device [2a37:5110]: No such file or directory
> 2015-09-04T11:43:38.825970-04:00 linux-5048 upsdrvctl[1887]: Network
> UPS Tools - Generic HID driver 0.39 (2.7.2.6_RTD)
> 2015-09-04T11:43:38.826243-04:00 linux-5048 upsdrvctl[1887]: USB
> communication driver 0.32
> 2015-09-04T11:43:38.826934-04:00 linux-5048 upsdrvctl[1887]: Driver
> failed to start (exit status=1)
> 2015-09-04T11:43:38.827185-04:00 linux-5048 upsdrvctl[1887]: Network
> UPS Tools - UPS driver controller 2.7.2.6_RTD
I'm confused here - the Bash script, and the systemd service unit, are for
_shutting down_ the system on power failure, but in the trace you are having a
problem _starting_ the driver.
> Is it possible the USB bus is going away before that can execute?
I havn't tested with openSUSE 13.2 so there may be something in it which
prevents the driver from connecting to the UPS. Perhaps with a more detailed
trace using the upsdrvctl -D option it may be possible to see more clearly.
Roger
_______________________________________________
Nut-upsuser mailing list
Nut-upsuser at lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/nut-upsuser