[Nut-upsuser] Multi UPS on Debian

Arnaud Quette aquette.dev at gmail.com
Mon Apr 4 08:19:25 UTC 2011


Hi Márk,

2011/4/4 Márk Csaba <markcs at gwyll.eu>

>   Hello,
>
> i have a server which supposed to control three Eaton UPS connected by USB
> cables. Each UPS is Eaton NV 2000H. (eaton_1, eaton_2, eaton_3)
> The connection is fine with each UPS, if it is configured alone.
> If i configure two or all three, the connections broke up.
>
> After nut started, tried to start upsdrv manually (eaton_1.
> The log:
>
> Apr  4 00:43:46 mail blazer_usb[10799]: Startup successful
> Apr  4 00:43:47 mail upsd[10752]: Connected to UPS [eaton_2]:
> blazer_usb-eaton_2
> Apr  4 00:43:50 mail upsmon[10760]: Communications with UPS
> eaton_2 at localhost established
> Apr  4 00:43:50 mail upsmon[10760]: Poll UPS [eaton_3 at localhost] failed -
> Driver not connected
> Apr  4 00:43:55 mail upsmon[10760]: Poll UPS [eaton_3 at localhost] failed -
> Driver not connected
> Apr  4 00:43:56 mail blazer_usb[10799]: Got disconnected by another driver:
> Device or resource busy
> Apr  4 00:43:56 mail kernel: [83482.924512] usb 4-2: usbfs: process 10799
> (blazer_usb) did not claim interface 0 before use
> Apr  4 00:44:00 mail blazer_usb[10804]: Startup successful
> Apr  4 00:44:00 mail upsd[10752]: Connected to UPS [eaton_3]:
> blazer_usb-eaton_3
> Apr  4 00:44:00 mail upsmon[10760]: Poll UPS [eaton_2 at localhost] failed -
> Driver not connected
> Apr  4 00:44:00 mail upsmon[10760]: Communications with UPS
> eaton_2 at localhost lost
> Apr  4 00:44:00 mail upsmon[10760]: Communications with UPS
> eaton_3 at localhost established
> Apr  4 00:44:05 mail upsmon[10760]: Poll UPS [eaton_2 at localhost] failed -
> Driver not connected
> Apr  4 00:44:10 mail blazer_usb[10804]: Got disconnected by another driver:
> Device or resource busy
> Apr  4 00:44:10 mail kernel: [83496.177686] usb 4-2: usbfs: process 10804
> (blazer_usb) did not claim interface 0 before use
> ups.conf:
> maxstartdelay = 70
> norating
> novendor
> subdriver = cypress
> [eaton_1]
>        driver = blazer_usb
>         port   = "002"
>         desc   = "Eaton NV 2000H"
>         vendorid = 0665
>         productid = 5161
>         bus    = "003"
>
> [eaton_2]
>         driver = blazer_usb
>         port   = "002"
>         desc   = "Eaton NV 2000H"
>         vendorid = 0665
>         productid = 5161
>         bus    = "004"
>
> [eaton_3]
>         driver = blazer_usb
>         port   = "003"
>         desc   = "Eaton NV 2000H"
>         vendorid = 0665
>         productid = 5161
>         bus    = "004"
> upsmon.conf contains the appropriate MONITOR lines.
>
> lsusb:
> Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
> Bus 004 Device 003: ID 0665:5161 Cypress Semiconductor USB to Serial
> Bus 004 Device 002: ID 0665:5161 Cypress Semiconductor USB to Serial
> Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
> Bus 003 Device 002: ID 0665:5161 Cypress Semiconductor USB to Serial
> Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
> Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
> Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
> The log with all UPS’s configured:
> Apr  4 00:52:51 mail blazer_usb[11305]: Startup successful
> Apr  4 00:52:55 mail blazer_usb[11307]: Startup successful
> Apr  4 00:52:55 mail blazer_usb[11307]: Communications with UPS lost:
> status read failed!
> Apr  4 00:52:57 mail blazer_usb[11307]: Got disconnected by another driver:
> Device or resource busy
> Apr  4 00:52:57 mail kernel: [84023.476349] usb 4-2: usbfs: process 11307
> (blazer_usb) did not claim interface 0 before use
> Apr  4 00:53:06 mail upsd[11314]: listening on 192.168.x.y port 3493
> Apr  4 00:53:06 mail upsd[11314]: listening on 192.168.xy.yx port 3493
> Apr  4 00:53:06 mail upsd[11314]: listening on 127.0.0.1 port 3493
> Apr  4 00:53:06 mail upsd[11314]: Connected to UPS [eaton_1]:
> blazer_usb-eaton_1
> Apr  4 00:53:06 mail upsd[11314]: Can't connect to UPS [eaton_2]
> (blazer_usb-eaton_2): No such file or directory
> Apr  4 00:53:06 mail upsd[11314]: Can't connect to UPS [eaton_3]
> (blazer_usb-eaton_3): No such file or directory
> Apr  4 00:53:06 mail upsd[11315]: Startup successful
> Apr  4 00:53:06 mail upsmon[11317]: Startup successful
> Apr  4 00:53:06 mail upsd[11315]: User admin at 127.0.0.1 logged into UPS
> [eaton_1]
> Apr  4 00:53:06 mail upsd[11315]: User admin at 127.0.0.1 logged into UPS
> [eaton_2]
> Apr  4 00:53:06 mail upsmon[11319]: Poll UPS [eaton_2 at localhost] failed -
> Driver not connected
> Apr  4 00:53:06 mail upsmon[11319]: Communications with UPS
> eaton_2 at localhost lost
> Apr  4 00:53:06 mail upsd[11315]: User admin at 127.0.0.1 logged into UPS
> [eaton_3]
> Apr  4 00:53:06 mail upsmon[11319]: Poll UPS [eaton_3 at localhost] failed -
> Driver not connected
> Apr  4 00:53:06 mail upsmon[11319]: Communications with UPS
> eaton_3 at localhost lost
> Apr  4 00:53:11 mail upsd[11315]: mainloop: Interrupted system call
> Apr  4 00:53:11 mail upsd[11315]: Signal 15: exiting
> Apr  4 00:53:11 mail upsmon[11319]: Signal 15: exiting
> Apr  4 00:53:11 mail upsmon[11317]: upsmon parent: read
> Apr  4 00:53:13 mail blazer_usb[11305]: Signal 15: exiting
> Maybe i’ve miss something, but i can’t figure it out. Could someone point
> me to the right way?
>
>

your issue is quite probably related to the USB matching system:
you well used the "bus" in configuration, but the port is something totaly
arbitrary that is not taken into account for differentiating units...
thus, "eaton_2" and "eaton_3" are considered to be the same, and the 2
drivers instances simply connect to the same one (ie the first found on Bus
4).
Which will result in drivers battling to get exclusive access on the device
(see the above "Got disconnected" messages).

To be able to differentiate these 2, you will have to change the Bus of one,
or to use the serial number (which is, when available, a better
discriminant), using "serial" in ups.conf.

cheers,
Arnaud
-- 
Linux / Unix Expert R&D - Eaton - http://powerquality.eaton.com
Network UPS Tools (NUT) Project Leader - http://www.networkupstools.org/
Debian Developer - http://www.debian.org
Free Software Developer - http://arnaud.quette.free.fr/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/nut-upsuser/attachments/20110404/01772ee8/attachment-0001.htm>


More information about the Nut-upsuser mailing list