Error contacting apcupsd @ localhost:3551: Connection refused

Posted 11 May, 2017

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[11841]: Please check your configuration ISCONFIGURED in /etc/default/apcupsd
May 11 15:46:28 rocky systemd[1]: 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

And restart the service :

service apcupsd restart

Now apcaccess works fine 🙂

Show Comments (0)
© SvennD