When installing apcupsd on proxmox (similar to centos) I received this error :
Error contacting apcupsd @ localhost:3551: Connection refused
When running apcaccess. I got more info on the error using checking the service status :
[email protected]:~# service apcupsd status ● apcupsd.service - LSB: Starts apcupsd daemon Loaded: loaded (/etc/init.d/apcupsd) Active: active (exited) since Thu 2017-05-11 15:46:28 CEST; 6s ago Process: 11837 ExecStop=/etc/init.d/apcupsd stop (code=exited, status=0/SUCCESS) Process: 11841 ExecStart=/etc/init.d/apcupsd start (code=exited, status=0/SUCCESS) May 11 15:46:28 rocky apcupsd: Please check your configuration ISCONFIGURED in /etc/default/apcupsd May 11 15:46:28 rocky systemd: Started LSB: Starts apcupsd daemon.
Found it ! In
/etc/default/apcupsd there is a fail-safe variable ISCONFIGURED. This protects you against accidentally shutdowns when you are testing/freshly installing.
Just change the no into a yes; resulting in :
# Defaults for apcupsd initscript # Apcupsd-devel internal configuration APCACCESS=/sbin/apcaccess ISCONFIGURED=yes
And restart the service :
service apcupsd restart
Now apcaccess works fine 🙂