[Nut-upsuser] mge-shut driver fails almost after every reboot

Panagiotis Kritikakos panagiotis.kritikakos at nikitec.gr
Thu Apr 2 14:50:13 UTC 2015


Hello Arno,

Thanks for the quick reply. FreeNAS is FreeBSD-based.

Yes, I could test a patch.

As I have mentioned, this behavior is not seen at every single reboot 
but after most reboots. Also, some times, the connectivity can be lost 
without even rebooting. That is not very often can have happened a few 
times.

Best regards,
Panagiotis

On 2/4/2015 5:44 μμ, Arnaud Quette wrote:
> Hello Panagiotis
>
> 2015-04-01 16:28 GMT+02:00 Panagiotis Kritikakos 
> <panagiotis.kritikakos at nikitec.gr 
> <mailto:panagiotis.kritikakos at nikitec.gr>>:
>
>     Hello all,
>
>     OS name: FreeNAS 9.3
>     NUT version: 2.7.2
>     NUT installed method: Bundled with FreenNAS 9.3
>     Device: EATON 5SC 1000
>     (http://powerquality.eaton.com/Products-services/Backup-Power-UPS/5SC.aspx?cx=5&wtredirect=www.eaton.com/5SC&GUID=B81251A4-F34E-4373-94B3-B4FB3D0CBCA8)
>
>     Problem description:
>
>     This was originally reported as bug to FreeNAS
>     (https://bugs.freenas.org/issues/8049#change-41087) and was asked
>     to post this upstream, so here it goes.
>
>     The issue with the driver has been seen in FreeNAS 9.3-STABLE.
>     While the serial connection with the UPS (Eaton 5 5SC Serial with
>     mge-shut driver) is working initially, almost after every reboot,
>     the driver is failing with the message "UPS failed - Driver not
>     connected". This was not the case with FreeNAS 9.2 and NUT 2.7.1.
>
>     Additional information:
>
>     ~# /usr/local/libexec/nut/mge-shut -DD -a ups-filesrv01
>     Network UPS Tools - Generic HID driver 0.38 (2.7.2)
>     SHUT communication driver 0.84
>     Warning: This is an experimental driver.
>     Some features may not function correctly.
>
>        0.000000     debug level is '2'
>        0.000901     upsdrv_initups...
>        0.000911     libshut_open: using port /dev/cuau0
>        0.001034     entering shut_synchronise()
>        0.037281     Communication with UPS established
>        0.037289     entering shut_get_descriptor(n 01, 18)
>        0.120208     shut_wait_ack(): ACK received
>        0.371873     shut_wait_ack(): ACK received
>        9.504230     shut_wait_ack(): Nothing received
>        9.589858     shut_wait_ack(): ACK received
>        9.742965     shut_wait_ack(): Nothing received
>        9.867744     shut_wait_ack(): ACK received
>        9.971912     - VendorID: 0463
>        9.971919     - ProductID: ffff
>        9.971923     - Manufacturer: Eaton
>        9.971926     - Product: unknown
>        9.971929     - Serial Number: unknown
>        9.971932     - Bus: serial
>        9.971935     Device matches
>        9.971939     entering shut_get_descriptor(n 21, 9)
>       13.027594     shut_wait_ack(): Nothing received
>       16.028593     shut_wait_ack(): Nothing received
>       16.055659     shut_wait_ack(): Nothing received
>       16.055670     Max tries reached while waiting for ACK, still
>     getting errors
>       16.055674     entering shut_synchronise()
>       16.197941     Unable to get HID descriptor ()
>       16.197949     No matching HID UPS found
>
>     Thank you in advance!
>
>
> The only diff I see between shut in 2.7.1 and 2.7.2 is the following:
>
> --- ../nut-2.7.1/drivers/libshut.c    2013-10-02 14:16:42.000000000 +0200
> +++ drivers/libshut.c    2014-02-25 16:39:34.000000000 +0100
> @@ -312,7 +312,7 @@
>      /* FIXME: add variable baudrate detection */
>      *upsfd = ser_open(device_path);
>      ser_set_speed(*upsfd, device_path, B2400);
> -    setline(*upsfd, 0);
> +    setline(*upsfd, 1);
>
>      /* initialise communication */
>      if (!shut_synchronise(*upsfd))
>
>
> This is tied to the PnP feature, and was reverted with the following 
> commit:
> https://github.com/networkupstools/nut/commit/75b0ce8b952d7c55880f7a019ba61ec05b45e6a7
>
> Never had time to get the complete consideration on this, so I'm still 
> lacking visibility.
> it's still unclear to me why it does not work for you. Is FreeNAS 
> linux based or BSD?
> I've just tested a pristine 2.7.2 on Debian Jessie + 5SC700, and it 
> works fine.
>
> would you be able to test a patch or a git branch?
>
> thanks and cheers,
> Arno
> -- 
> Eaton Data Center Automation - Opensource Leader
> NUT (Network UPS Tools) Project Leader - http://www.networkupstools.org
> Debian Developer - http://www.debian.org
> Free Software Developer - http://arnaud.quette.fr
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/nut-upsuser/attachments/20150402/35b8d002/attachment.html>


More information about the Nut-upsuser mailing list