Blog History

October 3, 2018

APCUPSD connection refused (FreePBX)

So after racking everything and plugging in the APC UPS USB into the PBX, I then went to the System Admin module and configured the UPS settings and tried:

apcaccess status
Error contacting apcupsd @ localhost:3551: Connection refused

Shows the APC connected on dev002:

Bus 001 Device 002: ID 051d:0003 American Power Conversion UPS 

cat /proc/bus/usb/devices
T:  Bus=01 Lev=01 Prnt=01 Port=01 Cnt=01 Dev#=  2 Spd=12   MxCh= 0
D:  Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
P:  Vendor=051d ProdID=0003 Rev= 1.06
S:  Manufacturer=American Power Conversion
S:  Product=Smart-UPS C 1000 FW:UPS 10.0 / ID=1005
S:  SerialNumber=
C:* #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=  2mA
I:* If#= 0 Alt= 0 #EPs= 2 Cls=03(HID  ) Sub=00 Prot=00 Driver=usbhid
E:  Ad=81(I) Atr=03(Int.) MxPS=  64 Ivl=20ms
E:  Ad=01(O) Atr=03(Int.) MxPS=  64 Ivl=10ms

but for some reason it wouldn't show up under

ls -l /dev/usb/hiddev002

only hiddev0. Still confused by this since it states above it's dev 002.

Whatever....moving on.

So I changed it to:

Unfortunately, even after running through Linux section @ and double checking everything, still connection refused.

Of course I tried restarting many times, but when shutting down it always failed.

sudo /etc/init.d/apcupsd restart
Shutting down UPS monitoring:                              [FAILED]
Starting UPS monitoring:                                   [  OK  ]

Even though the daemon was running

ps -ef | grep apcuspd
root     24146 22788  0 16:49 pts/0    00:00:00 grep apcuspd

Thought I'd check out the log

cat /var/log/
2018-10-03 13:27:40 -0600  apcupsd FATAL ERROR in smartsetup.c at line 172
PANIC! Cannot communicate with UPS via serial port.
Please make sure the port specified on the DEVICE directive is correct,
and that your cable specification on the UPSCABLE directive is correct.
2018-10-03 13:27:40 -0600  apcupsd error shutdown completed

So not sure why it's trying to comm over serial, but out of options and just for the heck of it, I toggled the UPS Type from APCSmart ---> USB

apcaccess status
APC      : 001,027,0677
VERSION  : 3.14.10 (13 September 2011) redhat
CABLE    : USB Cable
UPSMODE  : Stand Alone
MODEL    : Smart-UPS C 1000
BCHARGE  : 100.0 Percent
TIMELEFT :  83.0 Minutes
MBATTCHG : 5 Percent
MINTIMEL : 2 Minutes
MAXTIME  : 0 Seconds
ALARMDEL : 30 seconds
BATTV    : 27.2 Volts
TONBATT  : 0 seconds
CUMONBATT: 0 seconds
STATFLAG : 0x07000008 Status Flag
MANDATE  : 2014-07-24
NOMBATTV :  24.0 Volts
FIRMWARE : UPS 10.0 / ID=1005

So this has to be a bug, right? It is a Smart UPS....and FreePBX shows it as one, but it won't talk to it as one. Strange.

No comments:

Post a Comment