Bug #2842

NutUPS - Dashboard error when configured as slave

Added by Nicola Rauso about 5 years ago. Updated about 5 years ago.

Status:CLOSEDStart date:
Priority:NormalDue date:
Assignee:-% Done:

100%

Category:nethserver-nut
Target version:v6.5
Security class: Resolution:
Affected version:v6.5-final NEEDINFO:No

Description

When NutUPS is configured as slave and the master is unreachable, trying to access Server Manager you receive an error:

Nethgui:

    500 - Internal server error [1366796122]

and in /var/log/messages you have:

httpd-admin: [EXCEPTION] Symfony\Component\Process\Exception\ProcessTimedOutException 0: The process "/usr/bin/upsc UPS@192.168.XX.45" 
exceeded the timeout of 60 seconds. (in /usr/share/nethesis/Symfony/Component/Process/Process.php:1197)

even if ups service is disabled

# config show ups
ups=service
    Device=auto
    Master=192.168.XX.45
    Mode=slave
    Model=usbhid-ups
    Notify=disabled
    Password=8867XXXXXXX7766
    TCPPort=3493
    Ups=UPS
    User=upsmon
    access=private
    status=disabled

(see attachment)

ups1.png - ups slave configuration (17 KB) Nicola Rauso, 08/27/2014 05:48 AM


Related issues

Related to NethServer 6 - Feature #1760: NUT UPS configuration CLOSED

Associated revisions

Revision 806f9e9a
Added by Giacomo Sanchietti about 5 years ago

Dashboard: avoid ups timeout. Refs #2842

Revision aa00c32f
Added by Davide Principi about 5 years ago

Dashboard Nut: fix nut port number. Refs #2842

Revision 0862a65a
Added by Davide Principi about 5 years ago

Expand /etc/sysconfig/ups template on *update and *save event. Refs #2842

Revision 07f9b27f
Added by Davide Principi about 5 years ago

Nut UI module: set 1 second timeout to upsc command. Refs #2842

History

#1 Updated by Nicola Rauso about 5 years ago

  • Tracker changed from Feature to Bug
  • Affected version set to v6.5-final

#2 Updated by Nicola Rauso about 5 years ago

package version:
  • nethserver-nut-1.0.8-1.ns6.noarch

#3 Updated by Nicola Rauso about 5 years ago

Would be helpful if Dashboard could highlight the error.
Maybe the timeout has a too high value: we could lower it to a few seconds.

#4 Updated by Davide Principi about 5 years ago

  • Category set to nethserver-nut
  • Status changed from NEW to TRIAGED
  • Target version set to v6.5
  • % Done changed from 0 to 20

#5 Updated by Giacomo Sanchietti about 5 years ago

  • Status changed from TRIAGED to ON_DEV
  • Assignee set to Giacomo Sanchietti
  • % Done changed from 20 to 30

#6 Updated by Giacomo Sanchietti about 5 years ago

  • Status changed from ON_DEV to MODIFIED
  • % Done changed from 30 to 60

I can't reproduce the bug, even if the service is configured with a non-existing server or with a server accepting connections but not returning any information.

But I updated the widget code:
  • do not execute any upsc query if the service is disabled
  • execute upsc on a remote server only if the server is reachable

#7 Updated by Giacomo Sanchietti about 5 years ago

  • Status changed from MODIFIED to ON_QA
  • Assignee deleted (Giacomo Sanchietti)
  • % Done changed from 60 to 70
Package in nethserver-testing:
  • nethserver-nut-1.0.8-1.0git806f9e9a.ns6.noarch.rpm
Test case
  • Check the bug is not reproducible

#8 Updated by Davide Principi about 5 years ago

  • Assignee set to Davide Principi

#9 Updated by Davide Principi about 5 years ago

  • Status changed from ON_QA to TRIAGED
  • Assignee deleted (Davide Principi)
  • % Done changed from 70 to 20

FAILED

  • Event nethserver-nut-save fails
  • Could not connect to (a properly working) master

#10 Updated by Davide Principi about 5 years ago

  • Status changed from TRIAGED to ON_DEV
  • Assignee set to Davide Principi
  • % Done changed from 20 to 30

#11 Updated by Davide Principi about 5 years ago

  • Status changed from ON_DEV to MODIFIED
  • Assignee deleted (Davide Principi)
  • % Done changed from 30 to 60

Test case

  • Check the bug is not reproducible
  • Check /etc/sysconfig/ups is expanded, and reflects the master/slave setting

#12 Updated by Davide Principi about 5 years ago

  • Status changed from MODIFIED to ON_QA
  • % Done changed from 60 to 70

In nethserver-testing:
nethserver-nut-1.0.8-3.0git0862a65a.ns6.noarch.rpm
nethserver-nut-1.0.8-4.0git07f9b27f.ns6.noarch.rpm

#13 Updated by Davide Principi about 5 years ago

#14 Updated by Giacomo Sanchietti about 5 years ago

  • Assignee set to Giacomo Sanchietti

#15 Updated by Giacomo Sanchietti about 5 years ago

  • Status changed from ON_QA to VERIFIED
  • Assignee deleted (Giacomo Sanchietti)
  • % Done changed from 70 to 90

Bug is not reproducible and the template is expanded.

Note: The command service ups restart exits with status code 1 even if the service is correctly restarted.

#16 Updated by Giacomo Sanchietti about 5 years ago

  • Status changed from VERIFIED to CLOSED
  • % Done changed from 90 to 100
Package released in nethserver-updates:
  • nethserver-nut-1.0.10-1.ns6.noarch.rpm

Also available in: Atom PDF