UPS Repeatedly Gaining and Losing Connection with Server

Status
Not open for further replies.

moo083

Dabbler
Joined
Nov 9, 2015
Messages
28
I tried setting up my UPS today. I can connect to it with:
[mneumark@moonas ~]$ upsc UPS@localhost
battery.charge: 100
battery.charge.low: 10
battery.charge.warning: 50
battery.date: 2001/09/25
battery.mfr.date: 2015/05/08
battery.runtime: 4300
battery.runtime.low: 120
battery.type: PbAc
battery.voltage: 27.3
battery.voltage.nominal: 24.0
device.mfr: American Power Conversion
device.model: Back-UPS RS1000G
device.serial: 3B1519X21319
device.type: ups
driver.name: usbhid-ups
driver.parameter.pollfreq: 30
driver.parameter.pollinterval: 2
driver.parameter.port: auto
driver.parameter.synchronous: no
driver.version: 2.7.3
driver.version.data: APC HID 0.95
driver.version.internal: 0.39
input.sensitivity: medium
input.transfer.high: 147
input.transfer.low: 88
input.voltage: 122.0
input.voltage.nominal: 120
ups.beeper.status: disabled
ups.delay.shutdown: 20
ups.firmware: 868.L3 -P.D
ups.firmware.aux: L3 -P
ups.load: 11
ups.mfr: American Power Conversion
ups.mfr.date: 2015/05/08
ups.model: Back-UPS RS1000G
ups.productid: 0002
ups.realpower.nominal: 600
ups.serial: 3B1519X21319
ups.status: OL
ups.test.result: No test initiated
ups.timer.reboot: 0
ups.timer.shutdown: -1
ups.vendorid: 051d

But I keep getting the following in logs:
Jan 10 15:38:02 moonas upsd[89037]: Data for UPS [ups] is stale - check driver
Jan 10 15:38:07 moonas upsmon[89054]: Poll UPS [ups] failed - Data stale
Jan 10 15:38:07 moonas upsmon[89054]: Communications with UPS ups lost
Jan 10 15:38:09 moonas upsd[89037]: UPS [ups] data is no longer stale
Jan 10 15:38:12 moonas upsmon[89054]: Communications with UPS ups established
Jan 10 15:38:32 moonas upsd[89037]: Data for UPS [ups] is stale - check driver
Jan 10 15:38:37 moonas upsmon[89054]: Poll UPS [ups] failed - Data stale
Jan 10 15:38:37 moonas upsmon[89054]: Communications with UPS ups lost
Jan 10 15:38:41 moonas upsd[89037]: UPS [ups] data is no longer stale
Jan 10 15:38:42 moonas upsmon[89054]: Communications with UPS ups established
Jan 10 15:39:41 moonas upsd[89037]: Data for UPS [ups] is stale - check driver
Jan 10 15:39:41 moonas upsd[89037]: UPS [ups] data is no longer stale
Jan 10 15:40:49 moonas upsd[89037]: Data for UPS [ups] is stale - check driver
Jan 10 15:40:52 moonas upsmon[89054]: Poll UPS [ups] failed - Data stale
Jan 10 15:40:52 moonas upsmon[89054]: Communications with UPS ups lost
Jan 10 15:40:53 moonas upsd[89037]: UPS [ups] data is no longer stale
Jan 10 15:40:57 moonas upsmon[89054]: Communications with UPS ups established
Jan 10 15:41:16 moonas upsd[89037]: Data for UPS [ups] is stale - check driver
Jan 10 15:41:17 moonas upsmon[89054]: Poll UPS [ups] failed - Data stale
Jan 10 15:41:17 moonas upsmon[89054]: Communications with UPS ups lost
Jan 10 15:41:17 moonas upsd[89037]: UPS [ups] data is no longer stale
Jan 10 15:41:22 moonas upsmon[89054]: Communications with UPS ups established
Jan 10 15:54:17 moonas upsd[89037]: Data for UPS [ups] is stale - check driver
Jan 10 15:54:21 moonas upsd[89037]: UPS [ups] data is no longer stale
Jan 10 15:55:17 moonas upsd[89037]: Data for UPS [ups] is stale - check driver
Jan 10 15:55:17 moonas upsd[89037]: UPS [ups] data is no longer stale
Jan 10 15:56:57 moonas upsd[89037]: Data for UPS [ups] is stale - check driver
Jan 10 15:57:01 moonas upsd[89037]: UPS [ups] data is no longer stale
Jan 10 15:57:29 moonas upsd[89037]: Data for UPS [ups] is stale - check driver
Jan 10 15:57:29 moonas upsd[89037]: UPS [ups] data is no longer stale
Jan 10 15:58:01 moonas upsd[89037]: Data for UPS [ups] is stale - check driver
Jan 10 15:58:02 moonas upsmon[89054]: Poll UPS [ups] failed - Data stale
Jan 10 15:58:02 moonas upsmon[89054]: Communications with UPS ups lost
Jan 10 15:58:05 moonas upsd[89037]: UPS [ups] data is no longer stale
Jan 10 15:58:07 moonas upsmon[89054]: Communications with UPS ups established

I know it says check driver but I'm using an APC BR1000G which others are using with this driver successfully. See settings below.

Also, I got an email twice now (not every time it loses connection, just two times in the last few hours) from the NAS with: "COMMBAD - ups"

Any idea?
 

Attachments

  • Screen Shot 2016-01-10 at 4.13.23 PM.png
    Screen Shot 2016-01-10 at 4.13.23 PM.png
    404.3 KB · Views: 523

BigDave

FreeNAS Enthusiast
Joined
Oct 6, 2013
Messages
2,479
I struggled with this for weeks before finally giving up and hooking my UPS to my pfSense box
as Master and setting up the FreeNAS box as a Slave.
You first might try and take the setting: Ports off auto and setting to the actual USB port that's being used.
Another USB port may also give relief.
 

joeschmuck

Old Man
Moderator
Joined
May 28, 2011
Messages
10,972

moo083

Dabbler
Joined
Nov 9, 2015
Messages
28
I did some more research. Ran dmesg, and the last line is:
ugen0.3: <American Power Conversion> at usbus0

So presumably ugen0.3 is the port to use. I just switched it. We'll see if I can go an hour without it complaining.
 

moo083

Dabbler
Joined
Nov 9, 2015
Messages
28
Drat. Still happening. It was fine for a while and then it just exploded into a chorus of:
Broadcast Message from root@moonas.local
(no tty) at 17:40 PST...

Communications with UPS ups lost


Broadcast Message from root@moonas.local
(no tty) at 17:40 PST...

Communications with UPS ups established

about 8 times in a row.

Any other ideas?
 

BigDave

FreeNAS Enthusiast
Joined
Oct 6, 2013
Messages
2,479
Another USB port may also give relief.
Try all four of your 2.0 ports on that motherboard.
That's all I got, sorry!

edit: You might also try setting USB bios configuration to legacy setting if it's not already
that way by default.
Now THAT is all I got!!!
 
Last edited:

moo083

Dabbler
Joined
Nov 9, 2015
Messages
28
I'll do that. I'll let you know if that works or not.
 

BigDave

FreeNAS Enthusiast
Joined
Oct 6, 2013
Messages
2,479
I'll do that. I'll let you know if that works or not.
I edited my post and mentioned about legacy bios configuration for usb, you might check that too :)
 

moo083

Dabbler
Joined
Nov 9, 2015
Messages
28
Okay. I tried switching to the port next to it. It was reported as still ugen0.3 and the issue reoccured about 10 to 20 minutes later. I suspect they are on the same actual port on the board.
Next I tried a port one down from that, and it was reported as ugen1.6:
Jan 11 09:05:06 moonas ugen0.3: <American Power Conversion> at usbus0 (disconnected)
Jan 11 09:05:16 moonas ugen1.6: <vendor 0x051d> at usbus1

Its now 10:22 and there have been no errors so far. I'm not going to say its definitely working yet, but looks promising. I'll give it more time and let you know if that definitely fixed it.

Very odd way to solve a problem though. What the hell causes one port to work while another does not?
 

joeschmuck

Old Man
Moderator
Joined
May 28, 2011
Messages
10,972

moo083

Dabbler
Joined
Nov 9, 2015
Messages
28
Well, still no errors five hours later so I'm going to say this is resolved.

TLDR: If your USB based UPS keeps on disconnecting and reconnecting, try switching to another USB port.
 
Status
Not open for further replies.
Top