Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    Apcupsd 3.14.10 on pfSense 2.1.5 (amd64)

    Scheduled Pinned Locked Moved pfSense Packages
    21 Posts 5 Posters 8.9k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • D
      dbaio
      last edited by

      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.

      –
      Danilo G. Baio (dbaio)

      1 Reply Last reply Reply Quote 0
      • P
        PARC
        last edited by

        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>

        1 Reply Last reply Reply Quote 0
        • D
          dbaio
          last edited by

          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.

          –
          Danilo G. Baio (dbaio)

          1 Reply Last reply Reply Quote 0
          • D
            dbaio
            last edited by

            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>
            

            –
            Danilo G. Baio (dbaio)

            1 Reply Last reply Reply Quote 0
            • P
              PARC
              last edited by

              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

              1 Reply Last reply Reply Quote 0
              • D
                dbaio
                last edited by

                @PARC:

                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

                Thank you for your time.

                I submitted a PR and I asked for build the new binaries (3.14.12).

                Best Regards.

                –
                Danilo G. Baio (dbaio)

                1 Reply Last reply Reply Quote 0
                • M
                  mk96
                  last edited by

                  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

                  1 Reply Last reply Reply Quote 0
                  • M
                    mk96
                    last edited by

                    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

                    1 Reply Last reply Reply Quote 0
                    • S
                      sensemann
                      last edited by

                      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?

                      1 Reply Last reply Reply Quote 0
                      • D
                        dbaio
                        last edited by

                        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

                        –
                        Danilo G. Baio (dbaio)

                        1 Reply Last reply Reply Quote 0
                        • S
                          sensemann
                          last edited by

                          hi, I tryd to change "net" to "pcnet" - but it doesnt help. I guess there`s a bug between pfSende web-GUI and apcaccess…

                          1 Reply Last reply Reply Quote 0
                          • D
                            dbaio
                            last edited by

                            @sensemann:

                            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.

                            https://forum.pfsense.org/index.php?topic=89901.0

                            –
                            Danilo G. Baio (dbaio)

                            1 Reply Last reply Reply Quote 0
                            • P
                              PARC
                              last edited by

                              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

                              1 Reply Last reply Reply Quote 0
                              • First post
                                Last post
                              Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.