apcupsd: usb connection silently hangs

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

apcupsd: usb connection silently hangs

Manfred Schwarb
Hi Adam, hi all,

I have an issue that the usb connection to the APC device silently dies
sometimes, so an apcaccess call gives:

APC      : 001,039,0898
DATE     : 2016-06-19 00:53:18 +0000
HOSTNAME :
VERSION  : 3.14.14 (31 May 2016) suse
UPSNAME  : APCUPS
CABLE    : USB Cable
DRIVER   : MODBUS UPS Driver
UPSMODE  : Stand Alone
STARTTIME: 2016-06-17 13:17:26 +0000
...
FIRMWARE : UPS 09.3 / 00.4
END APC  : 2016-06-19 21:59:20 +0000

where the "DATE:" indication is stuck (compare to the "END APC:" indication).

When I then restart apcupsd, I get in the log file:

2016-06-19T21:59:32.474941+00:00 linux apcupsd[3160]: apcupsd exiting, signal 15
2016-06-19T21:59:32.529536+00:00 linux apcupsd[3160]: 204126.326 apcupsd: ModbusUsbComm.cpp:258 WaitIdle: interrupt_read failed: No such device or address
2016-06-19T21:59:32.529766+00:00 linux apcupsd[3160]: 204126.326 apcupsd: modbus.cpp:262 UpdateCi: Failed reading 0/2
2016-06-19T21:59:32.542414+00:00 linux apcupsd[3160]: Communications with UPS lost.
2016-06-19T21:59:32.636078+00:00 linux kernel: [204106.060113] usb 6-2: reset full-speed USB device number 2 using ohci-pci
2016-06-19T21:59:32.838238+00:00 linux apcupsd[3160]: apcupsd shutdown succeeded
2016-06-19T21:59:32.936091+00:00 linux kernel: [204106.360021] usb 6-2: reset full-speed USB device number 2 using ohci-pci
2016-06-19T21:59:33.095213+00:00 linux apcupsd[3160]: Error reading status from apcupsd @ localhost:3551: Connection reset by peer
2016-06-19T21:59:33.125084+00:00 linux apcupsd[3160]: wall: cannot get tty name: Inappropriate ioctl for device
2016-06-19T21:59:33.208444+00:00 linux apcupsd[29159]: 0.000 apcupsd: apcupsd.c:156 Options parsed.
2016-06-19T21:59:33.208719+00:00 linux apcupsd[29159]: apcupsd 3.14.14 (31 May 2016) suse startup succeeded
2016-06-19T21:59:33.208875+00:00 linux apcupsd[29159]: NIS server startup succeeded

sometimes I even get a segfault in libusb at restart of apcupsd.
So I don't pretend apcupsd is at fault, but has anybody any clue?

I'm running apcupsd at log level 49 and did not notice anything special.
Running at higher levels is difficult as it takes normally 24h or so until
it gets stuck.

Any help is appreciated, cheers,
Manfred




------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity planning
reports. http://sdm.link/zohomanageengine
_______________________________________________
Apcupsd-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/apcupsd-users
Reply | Threaded
Open this post in threaded view
|

Re: apcupsd: usb connection silently hangs

Ted Mittelstaedt-5
We have seen these errors before.   Here are some suggestions people
have used that have helped the problem:

1) Use a shorter USB cable
2) Make sure the UPS is plugged into the computer and not into
a USB hub
3) Use a different USB port on the computer
4) Use a USB hub that is powered by it's own AC adapter.
5) Use a different computer for the UPS and slave the first computer
from the second
6) Switch to a serial connection

Ted

On 6/19/2016 3:37 PM, Manfred Schwarb wrote:

> Hi Adam, hi all,
>
> I have an issue that the usb connection to the APC device silently dies
> sometimes, so an apcaccess call gives:
>
> APC      : 001,039,0898
> DATE     : 2016-06-19 00:53:18 +0000
> HOSTNAME :
> VERSION  : 3.14.14 (31 May 2016) suse
> UPSNAME  : APCUPS
> CABLE    : USB Cable
> DRIVER   : MODBUS UPS Driver
> UPSMODE  : Stand Alone
> STARTTIME: 2016-06-17 13:17:26 +0000
> ...
> FIRMWARE : UPS 09.3 / 00.4
> END APC  : 2016-06-19 21:59:20 +0000
>
> where the "DATE:" indication is stuck (compare to the "END APC:" indication).
>
> When I then restart apcupsd, I get in the log file:
>
> 2016-06-19T21:59:32.474941+00:00 linux apcupsd[3160]: apcupsd exiting, signal 15
> 2016-06-19T21:59:32.529536+00:00 linux apcupsd[3160]: 204126.326 apcupsd: ModbusUsbComm.cpp:258 WaitIdle: interrupt_read failed: No such device or address
> 2016-06-19T21:59:32.529766+00:00 linux apcupsd[3160]: 204126.326 apcupsd: modbus.cpp:262 UpdateCi: Failed reading 0/2
> 2016-06-19T21:59:32.542414+00:00 linux apcupsd[3160]: Communications with UPS lost.
> 2016-06-19T21:59:32.636078+00:00 linux kernel: [204106.060113] usb 6-2: reset full-speed USB device number 2 using ohci-pci
> 2016-06-19T21:59:32.838238+00:00 linux apcupsd[3160]: apcupsd shutdown succeeded
> 2016-06-19T21:59:32.936091+00:00 linux kernel: [204106.360021] usb 6-2: reset full-speed USB device number 2 using ohci-pci
> 2016-06-19T21:59:33.095213+00:00 linux apcupsd[3160]: Error reading status from apcupsd @ localhost:3551: Connection reset by peer
> 2016-06-19T21:59:33.125084+00:00 linux apcupsd[3160]: wall: cannot get tty name: Inappropriate ioctl for device
> 2016-06-19T21:59:33.208444+00:00 linux apcupsd[29159]: 0.000 apcupsd: apcupsd.c:156 Options parsed.
> 2016-06-19T21:59:33.208719+00:00 linux apcupsd[29159]: apcupsd 3.14.14 (31 May 2016) suse startup succeeded
> 2016-06-19T21:59:33.208875+00:00 linux apcupsd[29159]: NIS server startup succeeded
>
> sometimes I even get a segfault in libusb at restart of apcupsd.
> So I don't pretend apcupsd is at fault, but has anybody any clue?
>
> I'm running apcupsd at log level 49 and did not notice anything special.
> Running at higher levels is difficult as it takes normally 24h or so until
> it gets stuck.
>
> Any help is appreciated, cheers,
> Manfred
>
>
>
>
> ------------------------------------------------------------------------------
> What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
> patterns at an interface-level. Reveals which users, apps, and protocols are
> consuming the most bandwidth. Provides multi-vendor support for NetFlow,
> J-Flow, sFlow and other flows. Make informed decisions using capacity planning
> reports. http://sdm.link/zohomanageengine
> _______________________________________________
> Apcupsd-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/apcupsd-users
>


------------------------------------------------------------------------------
Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San
Francisco, CA to explore cutting-edge tech and listen to tech luminaries
present their vision of the future. This family event has something for
everyone, including kids. Get more information and register today.
http://sdm.link/attshape
_______________________________________________
Apcupsd-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/apcupsd-users