[Solved]UPS Plugin: usbhid-ups driver loads twice

  • Hai Folks,


    today I updated my OMV installation to 0.5.28 (and installed owncloud manually but I think it's not releated to this issue).


    I have an APC Back-UPS CS 650 with USB connected to my box. Plug-in version: 0.5.4
    Since the update I found that the UPS plugin is not working. Giving the following errors in syslog:

    Code
    Jan  2 13:55:47 freenas usbhid-ups[1926]: Got disconnected by another driver: Device or resource busy
    Jan  2 13:55:47 freenas kernel: [ 1309.672962] usb 4-2: usbfs: process 1926 (usbhid-ups) did not claim interface 0 before use
    Jan  2 13:55:47 freenas kernel: [ 1309.673041] usb 4-2: usbfs: process 1926 (usbhid-ups) did not claim interface 0 before use
    Jan  2 13:55:50 freenas usbhid-ups[4715]: libusb_get_interrupt: error submitting URB: Device or resource busy
    Jan  2 13:55:50 freenas usbhid-ups[4715]: libusb_get_report: error sending control message: Device or resource busy


    I found out that the UPS's driver usbhid-ups had 2 processes running at the same time. This caused nut daemon unable to communicate to the driver (usbhid-ups with the lower PID).
    After I killed the lower PID process nut could communicate with the driver automatically.



    Checking /etc/init.d/nut I found out that the daemon itself starts the driver. (the one with higher PID)
    I think the daemons behaviour is fine, but I couldn't find what is starting usbhid-ups driver before /etc/init.d/nut starts. Maybe it has to do something around udev rules?


    (reproduce note: If you just install the plug-in from the webgui you win't notice this until you restart OMV.)


    As a workaround I edited /etc/init.d/nut to pkill usbhid-ups before starting it but it's not an acceptable solution.



    Can somebody say how/where could OMV starts the first instance of usbhid-ups ?

  • Code
    root@freenas:~# dpkg -l | grep openmediavault
    ii  openmediavault                     0.5.28                         Open network attached storage solution
    ii  openmediavault-clamav              0.5.6                          OpenMediaVault ClamAV plugin
    ii  openmediavault-keyring             0.2                            GnuPG archive keys of the OpenMediaVault archive
    ii  openmediavault-mysql               0.5.13                         MySQL plugin for OpenMediaVault.
    ii  openmediavault-nut                 0.5.4                          OpenMediaVault Network UPS Tools (NUT) plugin
    ii  openmediavault-omvextrasorg        0.5.36                         OMV-Extras.org Package Repositories for OpenMediaVault
    ii  openmediavault-transmissionbt      0.5.17                         OpenMediaVault Transmission (BitTorrent client) plugin
    ii  openmediavault-website             0.5.5                          OpenMediaVault website plugin
  • hi tekkbebe,


    It didn't help,
    I ran the commands, rebooted, installed and set up the plugin again. (it could communicate, only 1 usbhid-ups running)
    But after another reboot usbhid-ups got running twice again.

  • Hi fstyle, I retried the plugin 0.5.5 and it's now working properly.


    I even unplugged my openmediavault server from my UPS to test it. I set the server to shutdown when it's running off the UPS for more then 30 seconds and it shutdown right away.


    Good job gang.

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!