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

    Apcupsd Failing (USB Device)

    Scheduled Pinned Locked Moved pfSense Packages
    17 Posts 4 Posters 3.7k 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.
    • bmeeksB
      bmeeks
      last edited by

      @arrmo:

      Hi,

      This is very likely me, but I just can't get it working … :(. Has anyone been able to get apcupsd working with a USB device (in pfSense v2.2)?

      I have tried all the options I can think of for the Type / Device (blank, /dev/ugen2.3, etc.) ... but no luck. I have the cable set to usb, but it doesn't seem to find the device. (though I can see it it dmesg).

      Suggestions?

      Thanks!

      This is not an answer to your precise question about apcupsd, but I do have an APC USB UPS connecting just fine using the NUT package.  Have you tried NUT, or do you especially need the apcupsd package?

      Bill

      1 Reply Last reply Reply Quote 0
      • arrmoA
        arrmo
        last edited by

        It's a good answer actually … :). Thanks!

        Nope, nut would be fine as well. Just tried it, but when I try to start it I get the following - have you seen this?
        starting usbhid-ups
        /usr/local/etc/rc.d/nut.sh: /usr/local/libexec/nut/upsdrvctl: not found
        usbhid-ups failed to start

        Thanks again.

        1 Reply Last reply Reply Quote 0
        • bmeeksB
          bmeeks
          last edited by

          @arrmo:

          It's a good answer actually … :). Thanks!

          Nope, nut would be fine as well. Just tried it, but when I try to start it I get the following - have you seen this?
          starting usbhid-ups
          /usr/local/etc/rc.d/nut.sh: /usr/local/libexec/nut/upsdrvctl: not found
          usbhid-ups failed to start

          Thanks again.

          No, I had no issues at all with NUT.  That error indicates to me that something did not install correctly.  The same underlying issue might also be impacting apcupsd.  What version of pfSense are you running?

          Bill

          1 Reply Last reply Reply Quote 0
          • arrmoA
            arrmo
            last edited by

            Hi,

            Yep, thinking the same thing. I'm running v2.2 of pfSense … perhaps an issue with v2.2?

            Thanks!

            1 Reply Last reply Reply Quote 0
            • bmeeksB
              bmeeks
              last edited by

              @arrmo:

              Hi,

              Yep, thinking the same thing. I'm running v2.2 of pfSense … perhaps an issue with v2.2?

              Thanks!

              Yep. The installation path (or at least the path that the error message indicated) does not appear correct for 2.2 unless proper symlinks are in place.  It should be /usr/pbi/{package_name-arch}/…

              Do you see a symlink for /usr/local/libexec that points to a folder similar to what I indicated above?  You will need to run this command from the console or a SSH session –

              ls -l /usr/local
              

              Bill

              1 Reply Last reply Reply Quote 0
              • arrmoA
                arrmo
                last edited by

                Hi,

                /usr/local/libexec exists (doesn't look to be a symlink though). The only thing inside the directory is ipsec.

                Thoughts?

                Thanks!

                1 Reply Last reply Reply Quote 0
                • bmeeksB
                  bmeeks
                  last edited by

                  @arrmo:

                  Hi,

                  /usr/local/libexec exists (doesn't look to be a symlink though). The only thing inside the directory is ipsec.

                  Thoughts?

                  Thanks!

                  My guess is the packages are not installing correctly on 2.2.  In the past there were some issues with the PBI infrastructure in the 2.2-ALPHA snapshots, but I thought those had been fixed.  You could try posting this in the 2.2-ALPHA snapshot feedback forum to see if one of the developers notices, or enter a bug in the bug tracker at https://redmine.pfsense.org

                  Bill

                  1 Reply Last reply Reply Quote 0
                  • arrmoA
                    arrmo
                    last edited by

                    Will post the info - thanks!

                    1 Reply Last reply Reply Quote 0
                    • chpalmerC
                      chpalmer
                      last edited by

                      Hi

                      Any luck with this issue?  I dont see any tickets on Redmine.

                      Triggering snowflakes one by one..
                      Intel(R) Core(TM) i5-4590T CPU @ 2.00GHz on an M400 WG box.

                      1 Reply Last reply Reply Quote 0
                      • arrmoA
                        arrmo
                        last edited by

                        Hi,

                        No luck, but no posting either - I was waiting for things to stabilize a bit, then retest (and post then if needed). Are things stable enough for that?

                        Thanks!

                        1 Reply Last reply Reply Quote 0
                        • arrmoA
                          arrmo
                          last edited by

                          Hi,

                          Neither NUT nor APCUPSD seem to be working … any thoughts of what to check (and what to post to the bug tracker)?

                          Thanks!

                          1 Reply Last reply Reply Quote 0
                          • bmeeksB
                            bmeeks
                            last edited by

                            @arrmo:

                            Hi,

                            Neither NUT nor APCUPSD seem to be working … any thoughts of what to check (and what to post to the bug tracker)?

                            Thanks!

                            This may be a factor – I notice on my 2.2-BETA virtual machine I use for package testing that a USB driver error is logged to the console during boot-up.  I have not investigated the error, and I don't currently have a copy of the text, but I have seen it for a long time when booting the VM and watching the console messages scroll by.  It has persisted through many snapshot updates.  The problem occurs early in the boot process.

                            Bill

                            1 Reply Last reply Reply Quote 0
                            • N
                              ndyserinck
                              last edited by

                              Hi Arrmo,

                              I was also stuck on it ^^
                              Regardless, I tried several way (trying make some rules, etc..) and when I checked the apcaccess arguments on internet, I noticed that a NIS serveur is mandatory.

                              In the apcupsd options in pfsense, I didn't activate it. After Y choose "On", listening on 0.0.0.0 and port 3551 it worked for me..

                              Hope this can help you.

                              Best regards

                              1 Reply Last reply Reply Quote 0
                              • arrmoA
                                arrmo
                                last edited by

                                Hi,

                                Are you on v2.2? Only asking because I'm not sure what you mean by "After Y" … :(. I do have the server on 0.0.0.0 / port 3551, this is the default. But I still get the error,

                                : Bogus configuration value (invalid-ups-type)
                                Terminating due to configuration file errors.

                                If I manually edit /usr/pbi/apcupsd-amd64/etc/apcupsd/apcupsd.conf, changing
                                UPSTYPE BLANK -> UPSTYPE (and nothing after this).

                                Then tried to restart, by
                                /usr/pbi/apcupsd-amd64/etc/rc.d/apcupsd onestart

                                But I get the error message,
                                /usr/pbi/apcupsd-amd64/etc/rc.d/apcupsd: WARNING: /usr/local/etc/apcupsd/apcupsd.conf is not readable.
                                /usr/pbi/apcupsd-amd64/etc/rc.d/apcupsd: WARNING: failed precmd routine for apcupsd

                                So some links are not working?

                                Thanks!

                                1 Reply Last reply Reply Quote 0
                                • N
                                  ndyserinck
                                  last edited by

                                  Hi,

                                  Here is my conf (values are without quotes):

                                  General configuration parameters

                                  • Enable : "Yes"

                                  • UPS Cable : "usb"

                                  • UPS Type / Device : "usb"

                                  • Device : ""

                                  • Poll Time : "5"

                                  • Kill on Power Fail : "No"

                                  • Lock File : ""

                                  Configuration statements for Network Information Server

                                  • Net Server : "On"

                                  • NIS Ip : "0.0.0.0"

                                  • NIS Port : "3551"

                                  Before I set "on" for the NIS, in the /var/log/apcupsd.events, I was able to see "apcupsd 3.14.10 (13 September 2011) freebsd startup succeeded" and if I remove the power cord from the UPS, the log showed "Power failure." with a console alert.

                                  About pfSense, it's installed in 2.1.5-RELEASE (amd64)
                                  And for the "After Y", i mistype ^^. It's "After I choose…"

                                  I attached my /usr/pbi/apcupsd-amd64/etc/apcupsd/apcupsd.conf file on this post. Hope this can help you.

                                  Best Regards

                                  apcupsd.conf.txt

                                  1 Reply Last reply Reply Quote 0
                                  • arrmoA
                                    arrmo
                                    last edited by

                                    Thanks very much for the help - much appreciated!

                                    Your config makes sense - I agree, a bit odd about the server, but glad it works for you. I think my issue is related to links missing in v2.2 … :(.

                                    Thanks again.

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