Apcupsd 3.14.10 on pfSense 2.1.5 (amd64)
-
LOCKFILE option should have /var/tmp
You have /var/lock which does not exist by default. -
I toggled this setting during my troubleshooting… sadly, changing it back to the /var/tmp default has no effect, but I appreciate the suggestion.
-
Have you tried running this from the command line: /usr/local/etc/rc.d/apcupsd.sh
To see want errors you get?
-
I've been starting and stopping the daemon from the command line. Whether or not it's started or stopped, that command doesn't produce any output, nor does it drop anything into the log:
[2.1.5-RELEASE][admin@pfsense.localdomain]/var/log(20): /usr/local/etc/rc.d/apcupsd.sh stop Stopping APC UPS Daemon... [2.1.5-RELEASE][admin@pfsense.localdomain]/var/log(21): /usr/local/etc/rc.d/apcupsd.sh [2.1.5-RELEASE][admin@pfsense.localdomain]/var/log(22): /usr/local/etc/rc.d/apcupsd.sh start Starting APC UPS Daemon... [2.1.5-RELEASE][admin@pfsense.localdomain]/var/log(23): /usr/local/etc/rc.d/apcupsd.sh Broadcast Message from admin@pfsense.localdomain (no tty) at 21:00 UTC... Communications with UPS lost. [2.1.5-RELEASE][admin@pfsense.localdomain]/var/log(24): cat /var/log/apcupsd.events ... 2014-12-09 20:59:43 +0000 apcupsd exiting, signal 15 2014-12-09 20:59:43 +0000 apcupsd shutdown succeeded 2014-12-09 21:00:09 +0000 apcupsd 3.14.10 (13 September 2011) freebsd startup succeeded 2014-12-09 21:00:14 +0000 Communications with UPS lost.
-
Any contents in this file?
/var/log/apcupsd.events -
I think this is a problem similar with pcnet.
If you use pcnet on the Upstype field, the parameters need to be on same field, not in DEVICE.
Try to do the same.
-
Thanks dbaio… this hadn't occurred to me. All my other apcupsd instances have the conf files configured by hand with net as the UPSTYPE and _<my.netop.ip.here>: <myport>_as the DEVICE.
After making this change, the relevant section in the conf file now looks like so:
... # UPSTYPE net <my.netop.ip.here>: <myport>#DEVICE ...</myport></my.netop.ip.here>
Sadly, after restart, the service still isn't able to consume the UPS data over the network.</myport></my.netop.ip.here>
-
Hi.
I've tried here and "net" doesn't have the simular bug like "pcnet", thanks for trying.
Change your UPS Class and UPS Mode to Share Master and Share and try it again, please.
Regards.
-
Maybe apcaccess uses all settings (standalone | shareslave | sharemaster)
$ apcaccess status <my.netops.ip.here>: <port>[snip] UPSMODE : ShareUPS Master SHARE : ShareUPS STATUS : ONLINE [snip]</port></my.netops.ip.here>
-
Hi Danilo,
Thanks for the suggestion. I gave this a try as well, but sadly those changes didn't work either.
If I can find a similar version of apcupsd I'm going to try installing it on a linux machine behind pfSense to see if this is an issue with this specific version of apcupsd and the net connectivity I'm using.
Cheers,
Greg -
Hi Danilo,
Thanks for the suggestion. I gave this a try as well, but sadly those changes didn't work either.
If I can find a similar version of apcupsd I'm going to try installing it on a linux machine behind pfSense to see if this is an issue with this specific version of apcupsd and the net connectivity I'm using.
Cheers,
GregThank you for your time.
I submitted a PR and I asked for build the new binaries (3.14.12).
Best Regards.
-
Actually same here, after a couple of seconds after system start a broadcast appears:
"Communications with UPS lost"
My config uses PCNET driver,apcupsd.events:
2015-01-08 22:24:48 +0100 apcupsd FATAL ERROR in newups.c at line 103 Mutex lock failure. ERR=Resource deadlock avoided 2015-01-08 22:24:48 +0100 apcupsd FATAL ERROR in newups.c at line 103 Mutex lock failure. ERR=Resource deadlock avoided 2015-01-08 22:24:48 +0100 apcupsd FATAL ERROR in newups.c at line 103 Mutex lock failure. ERR=Resource deadlock avoided 2015-01-08 22:25:28 +0100 apcupsd 3.14.10 (13 September 2011) freebsd startup succeeded 2015-01-08 22:26:28 +0100 Communications with UPS lost. 2015-01-08 22:32:11 +0100 apcupsd exiting, signal 15 2015-01-08 22:32:11 +0100 apcupsd shutdown succeeded 2015-01-08 22:32:25 +0100 apcupsd 3.14.10 (13 September 2011) freebsd startup succeeded 2015-01-08 22:32:25 +0100 apcupsd exiting, signal 15 2015-01-08 22:32:30 +0100 apcupsd 3.14.10 (13 September 2011) freebsd startup succeeded 2015-01-08 22:33:30 +0100 Communications with UPS lost. 2015-01-08 22:35:33 +0100 apcupsd exiting, signal 15 2015-01-08 22:35:38 +0100 apcupsd 3.14.10 (13 September 2011) freebsd startup succeeded 2015-01-08 22:35:38 +0100 apcupsd exiting, signal 15 2015-01-08 22:35:43 +0100 apcupsd 3.14.10 (13 September 2011) freebsd startup succeeded 2015-01-08 22:36:43 +0100 Communications with UPS lost.
On the other installation works fine using serial cable, but this one with this strange issue uses an APC MNC2 card AP9631
-
Seems it is solved by adding the IP of the PFsense box to the powerchute clients in the web interface of the AP9631 NMC card
-
hello,
I ve the same problem.
even with the correct config / IP , in the webinterface and /usr/pbi/apcupsd-amd64/etc/apcupsd/apcupsd.conf it doenst work, I only get this error:
/usr/local/sbin: apcaccess
Error contacting apcupsd @ localhost:3551: Operation timed out
But this is working:
apcaccess -h 192.168.2.1:3551
using apcupsd-3.14.12_1 with pfSense 2.2-R.
Any ideas?
-
The command apcaccess tries to connect through many ways(SNMP, PCNET with auth, PCNET without auth and others), seeing the log you can know how it did.
You need to check your config on the UPS (pcnet) - PowerChute Network Shutdown.
Some tips from apcupsd.com:
UPSCABLE ether UPSTYPE pcnet DEVICE ipaddr:user:passphrase UPSCLASS standalone UPSMODE disable
The DEVICE setting specifies the IP address of the UPS as well as the username and authentication passphrase to use. Note th
at the username and passphrase are not the Web/SNMP login credentials. They are separate settings. The default username on a new card is "apc" and the default passphrase is "admin user phrase". To change the passphrase, log in to the Web UI and go to the UPS tab, then to PowerChute -> Configuration. (This assumes firmware v3.3.1. Other versions may place the setting elsewhere.) The password must be a minimum of 15 characters long. The web UI will silently ignore shorter passwords and does not give an error message. There is no apparent way to change the username.Note that you may leave DEVICE blank and Apcupsd will accept information from any PCNET UPS on the network, however it will be very insecure since an attacker could easily send packets crafted to cause your server to shut down. Using the ipaddr, user, and passphrase will prevent this behavior.
http://www.apcupsd.com/manual/manual.html#powerchute-network-shutdown-driver-pcnet
Also, you can add the IP of pfSense box to the powerchute clients in the web interface like @mk96 saied.
Regards
-
hi, I tryd to change "net" to "pcnet" - but it doesnt help. I guess there`s a bug between pfSende web-GUI and apcaccess…
-
hi, I tryd to change "net" to "pcnet" - but it doesnt help. I guess there`s a bug between pfSende web-GUI and apcaccess…
You were right, it was improved.
-
Hello all,
Just wanted to mention that I noticed a new version of the apcupsd package was available; I uninstalled the previous package and installed the new one. That resolved this issue.
Hooray!
Cheers,
Greg