Can not configure my UPS

Status
Not open for further replies.

Heracles

Wizard
Joined
Feb 2, 2018
Messages
1,401
Hi,

Some time ago, I started to use FreeNAS. At first, it was in a highly not recommended setup. VM, 4G RAM, with Desktop drives, etc. I changed all that and my hardware is now as described below.

The problem is the UPS. I can not get it to communicate properly with FreeNAS. In some cases, it says it is always OL, even after I unplugged it from the wall. With some other settings, it says it is OB or LB despite it is plugged in and the brand new battery I put in have been charged for well over 24 hours. I have only 1 USB cable, so I can not test with a different cable to see if it is the source of the problem. I do have 3 serial (RJ-45 to DB-9) cables and can not get it right with any of them.

From genericups-1 to 2 ; from 9 to 12 ; From /dev/cuau0 to USB, no config is working. The result of one of my first test was an unbootable FreeNAS because UPS service was shutting down the server even before the boot up process was complete. I had to go in single user mode and move /usr/local/libexec/nut to a different name. It allowed me to boot up and reach the WebUI to disable the UPS service, prevent it to start at boot up and try to reconfigure it properly. Of course, I put back the directory under its regular name after that.

When I try a new config in the UPS menu and start the UPS service, most of the time, the server goes down immediately because it thinks UPS is either OB or LB. The only setup where it does not do so (genericups-2) is the one where UPS says it is still OL after being unplugged. UPSC can not be used if the UPS service is not running, but starting UPS service shut down the server... It is pretty hard to debug... :smile:

When I try to plug the UPS over USB, I receive error message in dmesg about USB_ERR_TIMEOUT and USB_ERR_Stalled. Despite the message is about timeout, it is immediately received as soon as I plug the cable.

Any idea what to do to get that UPS properly detected so my FreeNAS server can be safe ?

Thanks for your help,

Heracles

+-+-+-Start Description-+-+-+
Server: Dell T-110

OS:
root@freenas:~ # uname -a
FreeBSD freenas.jb.lan 11.1-STABLE FreeBSD 11.1-STABLE #0 r321665+4bd3ee42941(freenas/11.1-stable): Thu Jan 18 15:45:01 UTC 2018 root@gauntlet:/freenas-11-releng/freenas/_BE/objs/freenas-11-releng/freenas/_BE/os/sys/FreeNAS.amd64 amd64

CPU:
root@freenas:~ # sysctl hw.ncpu
hw.ncpu: 4
root@freenas:~ # sysctl hw.model
hw.model: Intel(R) Core(TM) i3-2100 CPU @ 3.10GHz

RAM: 8 Gig (2x 4G)
root@freenas:~ # dmidecode -t memory
# dmidecode 3.1
Scanning /dev/mem for entry point.
SMBIOS 2.7 present.

Handle 0x0026, DMI type 16, 23 bytes
Physical Memory Array
Location: System Board Or Motherboard
Use: System Memory
Error Correction Type: Multi-bit ECC
Maximum Capacity: 32 GB
Error Information Handle: No Error
Number Of Devices: 4

Handle 0x0028, DMI type 17, 34 bytes
Memory Device
Array Handle: 0x0026
Error Information Handle: No Error
Total Width: 128 bits
Data Width: 64 bits
Size: 4096 MB
Form Factor: DIMM
Set: None
Locator: DIMM A1
Bank Locator: BANK 1
Type: DDR3
Type Detail: Synchronous Unbuffered (Unregistered)
Speed: 1333 MT/s
Manufacturer: 80AD000080AD
Serial Number: 1C6605E9
Asset Tag: 011133
Part Number: HMT351U7BFR8A-H9
Rank: Unknown
Configured Clock Speed: 1333 MT/s

Disks : 6 of them
root@freenas:~ # smartctl -i /dev/ada0
smartctl 6.6 2017-11-05 r4594 [FreeBSD 11.1-STABLE amd64] (local build)
Copyright (C) 2002-17, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Model Family: Seagate IronWolf
Device Model: ST1000VN002-2EY102
Serial Number: Z9C482NA
LU WWN Device Id: 5 000c50 0a5b783eb
Firmware Version: SC60
User Capacity: 1,000,204,886,016 bytes [1.00 TB]
Sector Sizes: 512 bytes logical, 4096 bytes physical
Rotation Rate: 5900 rpm
Form Factor: 3.5 inches
Device is: In smartctl database [for details use: -P show]
ATA Version is: ATA8-ACS T13/1699-D revision 4
SATA Version is: SATA 3.1, 6.0 Gb/s (current: 3.0 Gb/s)
Local Time is: Fri Feb 2 09:54:42 2018 EST
SMART support is: Available - device has SMART capability.
SMART support is: Enabled

Zpool:
root@freenas:~ # zpool status
pool: freenas-boot
state: ONLINE
scan: scrub repaired 0 in 0 days 00:01:08 with 0 errors on Wed Jan 31 03:46:08 2018
config:
NAME STATE READ WRITE CKSUM
freenas-boot ONLINE 0 0 0
da0p2 ONLINE 0 0 0

errors: No known data errors

pool: vCloud
state: ONLINE
scan: resilvered 171G in 0 days 00:57:13 with 0 errors on Fri Feb 2 10:24:42 2018
config:
NAME STATE READ WRITE CKSUM
vCloud ONLINE 0 0 0
raidz2-0 ONLINE 0 0 0
gptid/b6e68312-07ae-11e8-8de1-bc305be5d3f0 ONLINE 0 0 0
gptid/16489e9d-07be-11e8-9281-bc305be5d3f0 ONLINE 0 0 0
gptid/082cf4ad-07ea-11e8-b8b5-bc305be5d3f0 ONLINE 0 0 0
gptid/13975389-0825-11e8-8302-bc305be5d3f0 ONLINE 0 0 0
gptid/da2d7724-07ca-11e8-909c-bc305be5d3f0 ONLINE 0 0 0
gptid/48ecf0c5-07d9-11e8-85bc-bc305be5d3f0 ONLINE 0 0 0

errors: No known data errors

UPS: APC Back-UPS RS 1500
+-+-+-End of Description-+-+-+
 

Nick2253

Wizard
Joined
Apr 21, 2014
Messages
1,633
Can you provide a screenshot of your UPS settings?
 

Heracles

Wizard
Joined
Feb 2, 2018
Messages
1,401
Sure. As of now, it is like this :
UPS.jpg
 

Nick2253

Wizard
Joined
Apr 21, 2014
Messages
1,633
What cable is it hooked up with? USB? When you unplug and plug in the UPS, what messages do you get on the console?
 

Heracles

Wizard
Joined
Feb 2, 2018
Messages
1,401
This is the setting that always says UPS is OL :

root@freenas:~ # upsc ups
device.mfr: APC
device.model: Back-UPS
device.type: ups
driver.name: genericups
driver.parameter.pollinterval: 2
driver.parameter.port: /dev/cuau0
driver.parameter.synchronous: no
driver.parameter.upstype: 2
driver.version: 2.7.4
driver.version.internal: 1.36
ups.mfr: APC
ups.model: Back-UPS
ups.status: OL
 

Heracles

Wizard
Joined
Feb 2, 2018
Messages
1,401
Not USB. This one is with the RJ-45 / DB-9 cable. When plugging over USB, dmesg says :

usb_alloc_device: set address 3 failed (USB_ERR_TIMEOUT, ignored)
usbd_setup_device_desc: getting device descriptor at addr 3 failed, USB_ERR_STALLED
usbd_req_re_enumerate: addr=3, set address failed! (USB_ERR_TIMEOUT, ignored)
usbd_setup_device_desc: getting device descriptor at addr 3 failed, USB_ERR_STALLED
usbd_req_re_enumerate: addr=3, set address failed! (USB_ERR_TIMEOUT, ignored)
usbd_setup_device_desc: getting device descriptor at addr 3 failed, USB_ERR_STALLED
usbd_req_re_enumerate: addr=3, set address failed! (USB_ERR_TIMEOUT, ignored)
usbd_setup_device_desc: getting device descriptor at addr 3 failed, USB_ERR_STALLED
usbd_req_re_enumerate: addr=3, set address failed! (USB_ERR_TIMEOUT, ignored)
usbd_setup_device_desc: getting device descriptor at addr 3 failed, USB_ERR_STALLED
ugen1.3: <Unknown > at usbus1 (disconnected)
 

Nick2253

Wizard
Joined
Apr 21, 2014
Messages
1,633
We are talking about the Back-UPS RS 1500, right? Are you sure that serial communication is supported on that UPS? I couldn't find a detailed manual, but what I did find shows only USB is supported: http://www.apc.com/salestools/ASTE-6Z7V72/ASTE-6Z7V72_R0_EN.pdf And there are no reports of either the RS 1500 or the RS 1000 of being used successfully with anything but a USB driver on NUT's report list.

If you've connected this UPS via serial, and it does not support this communication, you've probably fried the communication board (USB is expecting 0-5V, RS232 allows +/-25V). That would also explain why you get errors right away when connecting via USB.
 

Heracles

Wizard
Joined
Feb 2, 2018
Messages
1,401
Thanks for the reply. Indeed, if I destroyed the communication board, it would explains a lot of things :smile:
I have another RS-1500 that I never plugged in a computer. I will re-do the tests with that one and see if there are improvements.

Thanks a lot for your support,
 

Heracles

Wizard
Joined
Feb 2, 2018
Messages
1,401
It is confirmed : UPS communication board is dead now :smile:
I plugged the console port of another RS-1500 in FreeNAS and instantly, it identified it at ugen 1.3. I re-configured the UPS part in the Web UI and started the service. Server staid up. I unplugged the UPS and the server did a proper shutdown.
Another step toward a robust FreeNAS server thanks to you!
 

Nick2253

Wizard
Joined
Apr 21, 2014
Messages
1,633
You're very welcome. I'm glad I could help. I'm not sure if it's worth it for you to replace the board. You can probably use FreeNAS as your master NUT server, and use that to force all the rest of your machines to shutdown (for the machines on the bad UPS) when the power is lost.
 

Heracles

Wizard
Joined
Feb 2, 2018
Messages
1,401
This is exactly what I am looking at right now :smile:

I have 4 Back-UPS RS-1500. Obviously, I destroyed the board in 2 of them. UPS 1, 2 and 3 are in the same cabinet. When my place was built, I asked for 3 dedicated electrical circuits in that cabinet. UPS 4 is not far but not in the same cabinet.

UPS No1 ; Board destroyed : Dedicated to FreeNAS (T-110), including its external e-SATA drive
UPS No2 ; Board destroyed ; Dedicated to ESXi (T-330)
UPS No3 ; Board OK ; plugged in FreeNAS ; powering my PVR and some network components

UPS No4 ; Board OK, powering my iMac

I will now try to propagate the alert from either my iMac or FreeNAS to my VMs so they shutdown properly. Not sure if I will be able to shutdown ESXi itself, but to shutdown the VMs is the most important part.
 
Status
Not open for further replies.
Top