UPS plugin

    • Hi
      I have a noob question :)
      I have an APC UPS, I installed the plugin, plugged in the UPS and it looks to work.

      But then I have no clue as to how to :
      1. Monitor the data 0 via web interface or someting
      2. Install clients on Windows machines to monitor and/or auto-shutdown the machines.

      I found WinNUT, installed it, configured it like
      MONITOR ups@omv 1 ups ups slave
      where ups/ups is the username/password I set up in the plugin, but it says:
      Can't login to UPS [ups@omv]: Access denied

      Any ideas, suggestions, other tools? Maybe something more needs to be configured server-side?
    • Re: UPS plugin

      "GanJi" wrote:

      Hi
      I have a noob question :)
      I have an APC UPS, I installed the plugin, plugged in the UPS and it looks to work.

      But then I have no clue as to how to :
      1. Monitor the data 0 via web interface or someting
      2. Install clients on Windows machines to monitor and/or auto-shutdown the machines.

      I found WinNUT, installed it, configured it like
      MONITOR ups@omv 1 ups ups slave
      where ups/ups is the username/password I set up in the plugin, but it says:
      Can't login to UPS [ups@omv]: Access denied

      Any ideas, suggestions, other tools? Maybe something more needs to be configured server-side?

      You can only monitor the UPS via remote. I used KNutClient and NUT-Monitor without problems, but i can not confirm that it works with Windows tools because i do not have tested this (i do no use Windows anymore).
      Absolutely no support through PM!

      I must not fear.
      Fear is the mind-killer.
      Fear is the little-death that brings total obliteration.
      I will face my fear.
      I will permit it to pass over me and through me.
      And when it has gone past I will turn the inner eye to see its path.
      Where the fear has gone there will be nothing.
      Only I will remain.

      Litany against fear by Bene Gesserit
    • Re: UPS plugin

      is there a issue witht he current nut plugin as since its upgrade mines gone crazy and has sent me 500+ email notifications saying the ups keeps been unreachable and then reachable a second later it didn't do this before.
      OMV 3.0.58 - 64 bit - Nut, SABnzbd, Sonarr, Couchpotato
      HP N40L Microserver, 8gb Ram, 5 x 3TB HDD Raid5, 1 x 120GB 2.5" SSD (OS)
    • Re: UPS plugin

      "chclark" wrote:

      is there a issue witht he current nut plugin as since its upgrade mines gone crazy and has sent me 500+ email notifications saying the ups keeps been unreachable and then reachable a second later it didn't do this before.

      I do not know anything about such issues.
      Absolutely no support through PM!

      I must not fear.
      Fear is the mind-killer.
      Fear is the little-death that brings total obliteration.
      I will face my fear.
      I will permit it to pass over me and through me.
      And when it has gone past I will turn the inner eye to see its path.
      Where the fear has gone there will be nothing.
      Only I will remain.

      Litany against fear by Bene Gesserit
    • Re: UPS plugin

      "votdev" wrote:

      "chclark" wrote:

      is there a issue witht he current nut plugin as since its upgrade mines gone crazy and has sent me 500+ email notifications saying the ups keeps been unreachable and then reachable a second later it didn't do this before.

      I do not know anything about such issues.



      Hmm ill keep a eye on it for now ive disabled the notification setting as its locked out my Hotmail for today.
      OMV 3.0.58 - 64 bit - Nut, SABnzbd, Sonarr, Couchpotato
      HP N40L Microserver, 8gb Ram, 5 x 3TB HDD Raid5, 1 x 120GB 2.5" SSD (OS)
    • Re: UPS plugin

      "chclark" wrote:

      "votdev" wrote:

      "chclark" wrote:

      is there a issue witht he current nut plugin as since its upgrade mines gone crazy and has sent me 500+ email notifications saying the ups keeps been unreachable and then reachable a second later it didn't do this before.

      I do not know anything about such issues.


      Hmm ill keep a eye on it for now ive disabled the notification setting as its locked out my Hotmail for today.

      Please take some time to digg into the problem if you have the knowledge to do this. If you find out something please open a new bugreport. I can not fix anything if i am not able to reproduce the problem, because of that the project requires the help of its users whenever possible.
      Absolutely no support through PM!

      I must not fear.
      Fear is the mind-killer.
      Fear is the little-death that brings total obliteration.
      I will face my fear.
      I will permit it to pass over me and through me.
      And when it has gone past I will turn the inner eye to see its path.
      Where the fear has gone there will be nothing.
      Only I will remain.

      Litany against fear by Bene Gesserit
    • Re: UPS plugin

      OK I'll hop onto this thread, since I also have problems with the UPS plugin.

      My driver configuration looks like that:

      Source Code

      1. driver=usbhid-ups
      2. port=auto


      So nothing fancy here. If I do start the UPS deamon I get several mails, and the last one always tells me, that communications cannot be established.

      So I tried a few commands via ssh:

      Source Code

      1. root@ax-iscsi-san-1:~# upsdrvctl start
      2. Network UPS Tools - UPS driver controller 2.4.3
      3. Network UPS Tools - Generic HID driver 0.34 (2.4.3)
      4. USB communication driver 0.31
      5. Can't claim USB device [051d:0002]: could not detach kernel driver from interface 0: Operation not permitted
      6. Driver failed to start (exit status=1)


      Whereas:

      Source Code

      1. root@ax-iscsi-san-1:~# upsdrvctl -u root start
      2. Network UPS Tools - UPS driver controller 2.4.3
      3. Network UPS Tools - Generic HID driver 0.34 (2.4.3)
      4. USB communication driver 0.31
      5. Using subdriver: APC HID 0.95


      Works pretty well...

      Any ideas?

      I should also mention that I see loads of these messages:

      Source Code

      1. [348680.611902] usb 2-1.2: usbfs: process 19149 (usbhid-ups) did not claim interface 0 before use


      And one more addition:
      This happens:

      Source Code

      1. [349105.857960] upsdrvctl[23431]: segfault at 0 ip 00007fec61e2e2d0 sp 00007fff7240dc28 error 4 in libc-2.11.3.so[7fec61d25000+159000]
      2. [349108.905238] upsdrvctl[23475]: segfault at 0 ip 00007f808f3702d0 sp 00007fffb8437238 error 4 in libc-2.11.3.so[7f808f267000+159000]
      3. [349116.071947] upsdrvctl[23491]: segfault at 0 ip 00007fa8559f62d0 sp 00007fff55b6bb58 error 4 in libc-2.11.3.so[7fa8558ed000+159000]


      if I force the user to be root in ups.conf

      Source Code

      1. [general]
      2. user=root
      3. [ups]
      4. driver=usbhid-ups
      5. port=auto


      EDIT:

      I found a solution for my problem. The version of nut (2.4.3 in squeeze) is too old to support my UPS (APC SmartUPS 1500). I tested it with the packages from wheezy, which install fine on squeeze( don't do this on your OMV installation, it will break many of the scripts!!!!) and now the UPS works as expected.

      I'm currently building nut 2.6.5 packages for debian squeeze, which should not break any of the scripts from OMV. Stay tuned.

      EDIT 2:

      As promised: docs.google.com/folder/d/0Bxzg…tU3MzSXc/edit?usp=sharing

      For OMV you only need the packages nut, libnutscan1 and libupsclient1. Install via ssh (dpkg -i). Any missing dependencies can be installed via apt-get from the original debian squeeze repositories.
    • Re: UPS plugin

      "hennoa" wrote:

      OK I'll hop onto this thread, since I also have problems with the UPS plugin.

      My driver configuration looks like that:

      Source Code

      1. driver=usbhid-ups
      2. port=auto


      So nothing fancy here. If I do start the UPS deamon I get several mails, and the last one always tells me, that communications cannot be established.

      So I tried a few commands via ssh:

      Source Code

      1. root@ax-iscsi-san-1:~# upsdrvctl start
      2. Network UPS Tools - UPS driver controller 2.4.3
      3. Network UPS Tools - Generic HID driver 0.34 (2.4.3)
      4. USB communication driver 0.31
      5. Can't claim USB device [051d:0002]: could not detach kernel driver from interface 0: Operation not permitted
      6. Driver failed to start (exit status=1)


      Whereas:

      Source Code

      1. root@ax-iscsi-san-1:~# upsdrvctl -u root start
      2. Network UPS Tools - UPS driver controller 2.4.3
      3. Network UPS Tools - Generic HID driver 0.34 (2.4.3)
      4. USB communication driver 0.31
      5. Using subdriver: APC HID 0.95


      Works pretty well...

      Any ideas?

      I should also mention that I see loads of these messages:

      Source Code

      1. [348680.611902] usb 2-1.2: usbfs: process 19149 (usbhid-ups) did not claim interface 0 before use


      And one more addition:
      This happens:

      Source Code

      1. [349105.857960] upsdrvctl[23431]: segfault at 0 ip 00007fec61e2e2d0 sp 00007fff7240dc28 error 4 in libc-2.11.3.so[7fec61d25000+159000]
      2. [349108.905238] upsdrvctl[23475]: segfault at 0 ip 00007f808f3702d0 sp 00007fffb8437238 error 4 in libc-2.11.3.so[7f808f267000+159000]
      3. [349116.071947] upsdrvctl[23491]: segfault at 0 ip 00007fa8559f62d0 sp 00007fff55b6bb58 error 4 in libc-2.11.3.so[7fa8558ed000+159000]


      if I force the user to be root in ups.conf

      Source Code

      1. [general]
      2. user=root
      3. [ups]
      4. driver=usbhid-ups
      5. port=auto


      EDIT:

      I found a solution for my problem. The version of nut (2.4.3 in squeeze) is too old to support my UPS (APC SmartUPS 1500). I tested it with the packages from wheezy, which install fine on squeeze( don't do this on your OMV installation, it will break many of the scripts!!!!) and now the UPS works as expected.

      I'm currently building nut 2.6.5 packages for debian squeeze, which should not break any of the scripts from OMV. Stay tuned.

      EDIT 2:

      As promised: docs.google.com/folder/d/0Bxzg…tU3MzSXc/edit?usp=sharing

      For OMV you only need the packages nut, libnutscan1 and libupsclient1. Install via ssh (dpkg -i). Any missing dependencies can be installed via apt-get from the original debian squeeze repositories.



      I don't think that running a deamon as root when unnecessary is a good idea. The problem with the interface is related to the ownership of the USB device. In fact the installation process of nut under openmediavault for some reason doesn't install the necessary udev rules file.

      Source Code

      1. $ sudo cp /lib/udev/rules.d/52-nut-usbups.rules /etc/udev/rules.d/
      2. $ sudo upsdrvctl start


      Done that everything is fine with my Eaton Protection Station. Do I have to file a bug?
    • Re: UPS plugin

      I have three systems all with the same UPS (Cyberpower CP1350) and two work great (Dell PowerEdge T410 and the system in my signature). The other one will not work (Dell PowerEdge 2900). I used your tip and the third now works! I didn't upgrade nut or change how the daemon runs either. I guess I don't understand why the other two work without the file being in /etc/udev/rules.d/?? Udev bug?? Glad it works now and thanks!!
      omv 4.1.12 arrakis | 64 bit | 4.15 proxmox kernel | omvextrasorg 4.1.11
      omv-extras.org plugins source code and issue tracker - github

      Please read this before posting a question and this and this for docker questions.
      Please don't PM for support... Too many PMs!
    • Re: UPS plugin

      Sorry guys, when I try to install nut i get this error through ssh:

      Source Code

      1. Reinitializing monit daemon
      2. monit: No daemon process found
      3. 'collectd' trying to restart
      4. 'collectd' stop: /etc/init.d/collectd
      5. Stopping statistics collection and monitoring daemon: collectd'collectd' start: /etc/init.d/collectd
      6. Starting statistics collection and monitoring daemon: collectd.
      7. [ ok ] Stopping Network UPS Tools: (driver(s) failed) upsd upsmon.
      8. invoke-rc.d: unknown initscript, /etc/init.d/ups-monitor not found.
      9. dpkg: errore nell'elaborare openmediavault-nut (--remove):
      10. il sottoprocesso vecchio script di post-removal ha restituito lo stato di errore 100
      11. Elaborazione dei trigger per openmediavault...
      12. configured to not write apport reports
      13. update-rc.d: using dependency based boot sequencing
      14. update-rc.d: error: no runlevel symlinks to modify, aborting!
      15. Updating file permissions ...
      16. Updating locale files ...
      Display All



      it seems that the problem consists in:
      invoke-rc.d: unknown initscript, /etc/init.d/ups-monitor not found.

      the file ups-monitor indeed doesn't exist in /etc/init.d



      If i try to install the plugin (v. 0.4.4) through the webinf I get this error log in the popup message:

      Source Code

      1. Reading package lists...
      2. Building dependency tree...
      3. Reading state information...
      4. The following extra packages will be installed:
      5. nut nut-client nut-server
      6. Suggested packages:
      7. nut-monitor nut-snmp nut-ipmi nut-xml
      8. Recommended packages:
      9. bash-completion
      10. The following NEW packages will be installed:
      11. nut nut-client nut-server
      12. 0 upgraded, 3 newly installed, 1 reinstalled, 0 to remove and 314 not upgraded.
      13. 1 not fully installed or removed.
      14. Need to get 0 B/1880 kB of archives.
      15. After this operation, 4014 kB of additional disk space will be used.
      16. WARNING: The following packages cannot be authenticated!
      17. nut-client nut-server nut openmediavault-nut
      18. debconf: unable to initialize frontend: Dialog
      19. debconf: (Dialog frontend will not work on a dumb terminal, an emacs shell buffer, or without a controlling terminal.)
      20. debconf: falling back to frontend: Readline
      21. debconf: unable to initialize frontend: Readline
      22. debconf: (This frontend requires a controlling tty.)
      23. debconf: falling back to frontend: Teletype
      24. dpkg-preconfigure: unable to re-open stdin:
      25. Authentication warning overridden.
      26. Selecting previously deselected package nut-client.
      27. (Reading database ... 35021 files and directories currently installed.)
      28. Unpacking nut-client (from .../nut-client_2.6.5-4_amd64.deb) ...
      29. Selecting previously deselected package nut-server.
      30. Unpacking nut-server (from .../nut-server_2.6.5-4_amd64.deb) ...
      31. Selecting previously deselected package nut.
      32. Unpacking nut (from .../archives/nut_2.6.5-4_all.deb) ...
      33. Selecting previously deselected package openmediavault-nut.
      34. Preparing to replace openmediavault-nut 0.4.4 (using .../openmediavault-nut_0.4.4_all.deb) ...
      35. Unpacking replacement openmediavault-nut ...
      36. Reinitializing monit daemon
      37. monit: No daemon process found
      38. 'collectd' trying to restart
      39. 'collectd' stop: /etc/init.d/collectd
      40. Stopping statistics collection and monitoring daemon: collectd'collectd' start: /etc/init.d/collectd
      41. Starting statistics collection and monitoring daemon: collectd.
      42. Stopping Network UPS Tools: (driver(s) failed) upsd upsmon.
      43. invoke-rc.d: unknown initscript, /etc/init.d/ups-monitor not found.
      44. dpkg: warning: subprocess old post-removal script returned error exit status 100
      45. dpkg - trying script from the new package instead ...
      46. update-rc.d: error: no runlevel symlinks to modify, aborting!
      47. update-rc.d: using dependency based boot sequencing
      48. Reinitializing monit daemon
      49. monit: No daemon process found
      50. 'collectd' trying to restart
      51. 'collectd' stop: /etc/init.d/collectd
      52. Stopping statistics collection and monitoring daemon: collectd'collectd' start: /etc/init.d/collectd
      53. Starting statistics collection and monitoring daemon: collectd.
      54. Stopping Network UPS Tools: (driver(s) failed) upsd upsmon.
      55. invoke-rc.d: unknown initscript, /etc/init.d/ups-monitor not found.
      56. dpkg: error processing /var/cache/apt/archives/openmediavault-nut_0.4.4_all.deb (--unpack):
      57. subprocess new post-removal script returned error exit status 100
      58. configured to not write apport reports
      59. update-rc.d: error: no runlevel symlinks to modify, aborting!
      60. update-rc.d: using dependency based boot sequencing
      61. Reinitializing monit daemon
      62. monit: No daemon process found
      63. 'collectd' trying to restart
      64. 'collectd' stop: /etc/init.d/collectd
      65. Stopping statistics collection and monitoring daemon: collectd'collectd' start: /etc/init.d/collectd
      66. Starting statistics collection and monitoring daemon: collectd.
      67. .
      68. Stopping Network UPS Tools: (driver(s) failed) upsd upsmon.
      69. invoke-rc.d: unknown initscript, /etc/init.d/ups-monitor not found.
      70. dpkg: error while cleaning up:
      71. subprocess new post-removal script returned error exit status 100
      72. Processing triggers for openmediavault ...
      73. update-rc.d: error: no runlevel symlinks to modify, aborting!
      74. update-rc.d: using dependency based boot sequencing
      75. Updating file permissions ...
      76. Updating locale files ...
      77. .
      78. .
      79. Errors were encountered while processing:
      80. /var/cache/apt/archives/openmediavault-nut_0.4.4_all.deb
      81. E: Sub-process /usr/bin/dpkg returned an error code (1)
      82. Done ...
      Display All







      any idea to solve? Thanks in advance for your help!
    • Re: UPS plugin

      I'm running 0.4 versino of OMV, thanks tekkbebe for your speedy reply!

      Source Code

      1. ii openmediavault 0.4.31 Open network attached storage solution
      2. ii openmediavault-keyring 0.2 GnuPG archive keys of the OpenMediaVault archive
      3. ii openmediavault-lvm2 0.4.2 OpenMediaVault Logical Volume Manager (LVM2) plugin
      4. ii openmediavault-netatalk 0.4.7 OpenMediaVault netatalk (AppleTalk Protocol Suite) plugin
      5. iHR openmediavault-nut 0.4.4 OpenMediaVault Network UPS Tools (NUT) plugin
      6. ii openmediavault-omvpluginsorg 0.4.1+0~1355675019.3~1.gbpe45741 OMV-Plugins.org Package Repositories for OpenMediaVault
      7. ii openmediavault-transmissionbt 0.4+0~1355673075.3~1.gbpf0d8e8 OpenMediaVault Transmission (BitTorrent client) plugin
      8. ii openmediavault-virtualbox 0.4.2.1+0~1355672768.12~1.gbp589fd4 OpenMediaVault VirtualBox plugin