[Nut-upsuser] Blazer_usb Permissions problem: Input/output error

Paul Barber p at barbz.com.au
Mon Oct 15 06:46:11 UTC 2012


On 11/10/2012 2:46 PM, Paul Barber wrote:
> Arnaud Quette <aquette.dev <at> gmail.com> writes:
>
>>
>> Hi Paul
>> 2012/8/19 Paul Barber <p <at> barbz.com.au>
>> Hi all,
>> I have an eaton ENV800HA connected for a freebsd 9.0 box with nut 2.6.5
> installed (on the supported list).
>> The UPS is connected using the Blazer_USB driver (not sure how to check its
> version).
>> When I kick off upsd it detects the UPS no problems and I get all my
> information:
>> battery.charge: 100battery.voltage: 13.60battery.voltage.high:
> 13.00battery.voltage.low: 10.40battery.voltage.nominal: 12.0device.type:
> upsdriver.name: blazer_usbdriver.parameter.pollinterval: 2driver.parameter.port:
> /dev/ugen1.5driver.version: 2.6.5-Unversioned directorydriver.version.internal:
> 0.09input.current.nominal: 3.0input.frequency: 50.2input.frequency.nominal:
> 50input.voltage: 245.0input.voltage.fault: 244.5input.voltage.nominal:
> 240output.voltage: 245.0ups.beeper.status: enabledups.delay.shutdown:
> 30ups.delay.start: 180ups.load: 4ups.productid: 5161ups.status:
> OLups.temperature: 25.0ups.type: offline / line interactiveups.vendorid: 0665
>> However after a random amount of time I get the following error:
>> blazer_usb[4466]: Permissions problem: Input/output error
>>
>> Followed by:
>> upsd[4468]: Can't connect to UPS [EatonUPS] (blazer_usb-EatonUPS): No such
> file or directoryupsmon[4566]: Poll UPS [EatonUPS <at> localhost] failed -
> Driver not connectedupsmon[4566]: Communications with UPS EatonUPS <at>
> localhost lostupssched-cmd: Communications with the UPS EatonUPS <at> localhost
> are lostupsmon[4566]: Poll UPS [EatonUPS <at> localhost] failed - Driver not
> connected
>> Ive tried the basics and chmod 777'd the ugen1.5 port (not a problem it if
> works for a while) but worth a shot.
>> After doing some reading on here I ran /usr/local/libexec/nut/./blazer_usb -u
> root -DDD -a EatonUPS which on its first run worked for 72 seconds, but 330
> seconds on the second run before ending with:
>>
>> 327.930857   send: Q1 328.193486   read: (247.0 247.0 247.0 004 50.0 13.6 25.0
> 00001001 329.940841   send: Q1 330.177471   read: (247.0 247.0 247.0 004 50.0
> 13.6 25.0 00001001 331.950574   send: Q1 332.193457   read: (247.0 247.0 247.0
> 004 50.0 13.6 25.0 00001001 338.860148   send: Unknown error 338.860204
>   Permissions problem: Input/output error
>> Ive also found the following message in the log when I start upsd:
>> root: Unknown USB device: vendor 0x0665 product 0x5161 bus uhub2
>>
>>
>>
>> is this msg different from the one when you initially plug your UPS USB cord?
>>
>>
>>   Any ideas where to go from here?
>>
>>
>> good question!blazer_usb will reconnect upon certain error, like your IO
> one.but the thing is that device permissions must allow that.
>> Ie, on Linux, udev is in charge of setting the permissions for NUT on all
> known devices.thus, upon any kind of disconnection/reconnection, NUT will be
> able to establish again the communication.you should dig around
> this...cheers,Arnaud-- Linux / Unix / Opensource Engineering Expert - Eaton -
> http://opensource.eaton.comNetwork UPS Tools (NUT) Project Leader -
> http://www.networkupstools.org
>> Debian Developer - http://www.debian.orgFree Software Developer -
> http://arnaud.quette.fr
>>
>> _______________________________________________
>> Nut-upsuser mailing list
>> Nut-upsuser <at> lists.alioth.debian.org
>> http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/nut-upsuser
> Had a bit more of a play with this and still couldn't make it work.
>
> Ive tried this now also on openindiana with the latest nut - same issue works
> for 5 minutes then drops out with stale data errors (at the same time as the
> permission errors in BSD).
>
> Ive played with the polling times out to 30 seconds and this hasn't made a
> difference.
>
> Also when it does go to stale data it wont also detect again (I had the same
> problems on free bsd)
>
> For example:
> paul at indy:/opt/nut/bin# ./blazer_usb -u root -DDD -a trust
> Network UPS Tools - Megatec/Q1 protocol USB driver 0.09 (2.6.5)
>     0.000000     debug level is '3'
>     0.093158     Checking device (0665/5161) (/dev/usb/665.5161/0)
>     0.100375     - VendorID: 0665
>     0.100413     - ProductID: 5161
>     0.100433     - Manufacturer: INNO TECH
>     0.100455     - Product: USB to Serial
>     0.100475     - Serial Number: 20100826
>     0.100493     - Bus: /dev/usb
>     0.100513     Trying to match device
>     0.100533     Device matches
>     0.100601     Trying megatec protocol...
>     0.101337     send: Q1
>     0.351941     read: (248.5 248.5 248.5 003 50.0 13.6 25.0 00001001
>     0.352107     Status read in 1 tries
>     0.352139     Supported UPS detected with megatec protocol
>     0.352710     send: F
>     0.511933     read: #240.0 003 12.00 50.0
>     0.511997     Ratings read in 1 tries
>     0.512731     send: I
>     0.571931     read: I
>     0.571972     blazer_vendor: short reply
>     0.571994     Vendor information read 1 failed
>     0.572876     send: I
>     0.641968     read: I
>     0.642009     blazer_vendor: short reply
>     0.642031     Vendor information read 2 failed
>     0.642748     send: I
>     0.701980     read: I
>     0.702021     blazer_vendor: short reply
>     0.702042     Vendor information read 3 failed
>     0.702066     Vendor information unavailable
>     0.702087     No values provided for battery high/low voltages in ups.conf
>     0.702120     Using 'guestimation' (low: 10.400000, high: 13.000000)!
>     0.702142     Battery runtime will not be calculated (runtimecal not set)
>     0.702718     send: Q1
>     0.961973     read: (248.5 248.5 249.0 003 50.0 13.6 25.0 00001001
>     0.962584     dstate_init: sock /var/ups/blazer_usb-trust open on fd 7
>     0.963367     send: Q1
>     1.211876     read: (249.0 248.5 248.5 003 50.0 13.6 25.0 00001001
>     2.962548     send: Q1
>     3.231991     read: (248.5 248.5 248.5 003 50.0 13.6 25.0 00001001
>     4.952462     send: Q1
>     5.211943     read: (248.5 249.0 248.5 003 50.0 13.6 25.0 00001001
>     6.942513     send: Q1
>     7.201996     read: (249.0 248.5 248.5 003 50.0 13.6 25.0 00001001
> ^C
>
> Then after it drops out:
>
> paul at indy:/opt/nut/bin# ./blazer_usb -u root -DDD -a trust
> Network UPS Tools - Megatec/Q1 protocol USB driver 0.09 (2.6.5)
>     0.000000     debug level is '3'
>     3.972638     Checking device (0000/0000) (/dev/usb/665.5161/0)
>     8.949923     Failed to open device, skipping. (Invalid argument)
>     8.983461     No supported devices found. Please check your device
> availability with 'lsusb'
> and make sure you have an up-to-date version of NUT. If this does not help,
> try running the driver with at least 'subdriver', 'vendorid' and 'productid'
> options specified. Please refer to the man page for details about these options
> (man 8 blazer).
>
> Any suggestions where to next? Im considering tossing the UPS and buying an APC.
>
> Paul
>
>
>
>
> _______________________________________________
> Nut-upsuser mailing list
> Nut-upsuser at lists.alioth.debian.org
> http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/nut-upsuser
Sorry Arnaud,

I swapped over to openindiana 151a6 as I was having less USB issues with 
other devices; My problem with this is more stale data (moving away from 
bsd fixed the permission error).

This is set with a 30 second polling interval at the driver (not upsmon).

Running blazer_usb -ddd drops out anywhere from 30 minutes to 4 hours - 
it does a send but just stops and never gets a read back.
/1.951518     dstate_init: sock /var/ups/blazer_usb-eaton open on fd 7/
/   1.952147     send: Q1/
/   2.201114     read: (246.0 246.0 246.0 010 50.2 13.6 25.0 00001001/
/  31.952338     send: Q1/
/  32.221149     read: (246.5 246.5 246.5 010 50.2 13.6 25.0 00001001/
/  61.952325     send: Q1/
/…/
/1951.954098     send: Q1/
/1952.231155     read: (244.1 244.1 244.1 011 50.0 13.6 25.0 00001001/
/1986.588222     send: Q1/


When I run the full package my mileage varies as above - anywhere from 
30 minutes to 4 hours.

/paul at indy:/opt/nut/script$ sudo ./nut start/
/paul at indy:/opt/nut/script$ Broadcast Message from paul (???) on indy 
Mon Oct 15 06:29:39.../
/Communications with UPS eaton at localhost established//
//...//
/
/paul at indy:/opt/nut$ ./bin/upsc eaton at localhost/
/battery.charge: 100/
/battery.voltage: 13.60/
/battery.voltage.high: 13.00/
/battery.voltage.low: 10.40/
/battery.voltage.nominal: 12.0/
/device.type: ups/
/driver.name: blazer_usb/
/driver.parameter.pollinterval: 30/
/driver.parameter.port: auto/
/driver.version: 2.6.5/
/driver.version.internal: 0.09/
/input.current.nominal: 3.0/
/input.frequency: 50.0/
/input.frequency.nominal: 50/
/input.voltage: 248.5/
/input.voltage.fault: 248.5/
/input.voltage.nominal: 240/
/output.voltage: 248.5/
/ups.beeper.status: enabled/
/ups.delay.shutdown: 30/
/ups.delay.start: 180/
/ups.load: 10/
/ups.productid: 5161/
/ups.status: OL/
/ups.temperature: 25.0/
/ups.type: offline / line interactive/
/ups.vendorid: 0665/
/paul at indy:/opt/nut$ /
/…./
/Oct 15 13:32:41 indy upsd[1513]: [ID 702911 daemon.notice] Data for UPS 
[eaton] is stale - check driver//
//Oct 15 13:32:45 indy upsmon[1516]: [ID 702911 daemon.error] Poll UPS 
[eaton at localhost] failed - Data stale//
//Oct 15 13:32:45 indy upsmon[1516]: [ID 702911 daemon.notice] 
Communications with UPS eaton at localhost lost//
//Oct 15 13:32:49 indy upsmon[28220]: [ID 702911 daemon.error] Poll UPS 
[eaton at localhost] failed - Data stale//
//Oct 15 13:32:49 indy upsmon[28220]: [ID 702911 daemon.notice] 
Communications with UPS eaton at localhost lost//
//...//
/
/Stop the service &//
//Oct 15 13:34:00 indy blazer_usb[1511]: [ID 702911 daemon.notice] Parse 
error on sock: Invalid ctx buffer//
//Oct 15 13:34:09 indy upsmon[28220]: [ID 702911 daemon.error] Poll UPS 
[eaton at localhost] failed - Server disconnected/


Nothing shows up in the logs other than what is here - permissions for 
the device are drwxr-xr-x   3 root root   3 2012-10-14 18:18 665.5161/0

Ill keep testing and see if I can break it where i cant find the device 
(as per last time) but that was on openindiana 151a5 so not sure if 
somethings been fixed in a6.

Paul

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/nut-upsuser/attachments/20121015/5f395ea8/attachment.html>


More information about the Nut-upsuser mailing list