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

    NUT package (2.8.0 and below)

    Scheduled Pinned Locked Moved UPS Tools
    1.2k Posts 128 Posters 4.1m 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.
    • P
      pigbrother
      last edited by

      dennypaged, oktornotor, thanks for answers.
      Agreed,  the UPS is doing it's job. I'm just trying to avoid annoying mail reports (at the night time especially).
      Another SMART UPSes connected  to same power input do not have any complains about power conditions.

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

        Denny (or whoever else wants to lend a hand!),

        Running pfSense 2.4.1 as a firewall and router, with NUT 2.7.4_5.  I have the pfSense box, a FreeNAS server, and another FreeNAS server (Replication target) all on a CyberPower CP1000AVRLCD UPS.  (My switch is also on that, a 16-port Netgear item.)  I currently have my FreeNAS server as the master, and both the backups box and pfSense are "seeing" the master no problem.  When I pull the cord on the UPS, I get three nice e-mail notifications (one from each of the boxes), and all boxes shutdown in an orderly fashion when ordered to by the master (tested both Battery Low and On Battery, the latter with a 10 second timer in my tests).

        The problem is : none of the boxes start back up when I plug the UPS back in!  I'm sure this is something dumb, because I'm not that knowledgeable at all - but what I CAN say is, the blue LED is lit on the UPS (but the display itself is blank).  As in, it's not shut down.  If I press it, it goes completely dark, and if I press it again, it lights up again, along with the LCD display and all - and, voila, most of the boxes start up.  That is, both FreeNAS boxes start up - the pfSense one needs to be started manually.  All three boxes have Always On setting in the BIOS for waking up after power loss.

        Any ideas…?  I think it would make more sense to have the box doing the routing (pfSense) also being the master, but I'm not 100% sure how to configure that.  But the better question is - do I need to?  Would that fix anything?

        Thanks in advance, and thanks also both for all your work on this package, and for the continued support you offer to us plebes on this forum! =)

        Cheers!

        pfSense Rig : SuperMicro X8SIL-F with X3430 Xeon CPU, Shuriken cooler | 12 Gb ECC RAM | Kingston 64GB SSD | Antec VP450 P/S | Silverstone ML03B Case

        1 Reply Last reply Reply Quote 0
        • dennypageD
          dennypage
          last edited by

          Can you clarify what you mean by “the pfSense one needs to be started manually”?

          Traveling, so expect delayed responses…

          Thanks.

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

            Thanks for the quick reply - far from "delayed"!

            I mean I have to physically push the power button on the pfSense box.

            Enjoy your travels!

            pfSense Rig : SuperMicro X8SIL-F with X3430 Xeon CPU, Shuriken cooler | 12 Gb ECC RAM | Kingston 64GB SSD | Antec VP450 P/S | Silverstone ML03B Case

            1 Reply Last reply Reply Quote 0
            • B
              bdf0506
              last edited by

              @SilverJS:

              Thanks for the quick reply - far from "delayed"!

              I mean I have to physically push the power button on the pfSense box.

              Enjoy your travels!

              This is kind of a known issue…what should happen is that the master should shut down the UPS before the UPS fully drains. In your case, the master is your free NAS so you likely need to look there.

              I reported this issue back in June or so. Now that 2.4 is out I believe a bug fix for the nut package for pfSense can be released to fix this on the pfSense side. But I don’t think this will help you out, as it sounds like the freeNAS isn’t shutting down the UPS prior to fully draining it.

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

                @bdf0506:

                This is kind of a known issue…what should happen is that the master should shut down the UPS before the UPS fully drains. In your case, the master is your free NAS so you likely need to look there.

                I reported this issue back in June or so. Now that 2.4 is out I believe a bug fix for the nut package for pfSense can be released to fix this on the pfSense side. But I don’t think this will help you out, as it sounds like the freeNAS isn’t shutting down the UPS prior to fully draining it.

                Oh!  So the UPS NEEDS to be shut down too? Too easy - FreeNAS has a setting for that in the UPS settings.  I'll tick that box, try again and report.

                pfSense Rig : SuperMicro X8SIL-F with X3430 Xeon CPU, Shuriken cooler | 12 Gb ECC RAM | Kingston 64GB SSD | Antec VP450 P/S | Silverstone ML03B Case

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

                  And THERE it is!!  As soon as I instructed the UPS to shut down in my settings, everything worked perfectly.  All boxes shutdown properly, UPS shut down, and when I plugged the UPS back in, all three computers spun right back up.  The very first time I went through the whole cycle, comms with the UPS couldn't be re-established for some reason (got a flurry of e-mails from all three boxes), but I've tested it a few times since and it's always worked.  The one I'm most worried about is the pfSense box - as long as IT comes back online while I'm away, I can VPN in and restart or whatnot, and do what I need to do, and it always has, regardless of UPS comms status.  So, all seems well.

                  The one scenario I haven't tested yet is a power race, but that'll have to wait - the little one is up…=)

                  Thanks for your help!!

                  pfSense Rig : SuperMicro X8SIL-F with X3430 Xeon CPU, Shuriken cooler | 12 Gb ECC RAM | Kingston 64GB SSD | Antec VP450 P/S | Silverstone ML03B Case

                  1 Reply Last reply Reply Quote 0
                  • F
                    fr3ddie
                    last edited by

                    @bdf0506:

                    This is kind of a known issue…what should happen is that the master should shut down the UPS before the UPS fully drains. In your case, the master is your free NAS so you likely need to look there.

                    I reported this issue back in June or so. Now that 2.4 is out I believe a bug fix for the nut package for pfSense can be released to fix this on the pfSense side.

                    Hello,
                    I'd like to report I have the same issue: UPS brand is Eaton, fully supported by usbhid driver and "upsdrvctl shutdown" works perfectly on a Debian Jessie but not with pfSense NUT package.

                    I've tried to dig the init script in /usr/local/etc/rc.d/nut modifying it with no luck.

                    Can I solve it or is it a bug in the pfSense package? If it is a bug, do the maintainer of the package has any forecast about its resolution?

                    Thank you

                    1 Reply Last reply Reply Quote 0
                    • dennypageD
                      dennypage
                      last edited by

                      Sorry again for the delay. Had a few real-life things come up.

                      For a temporary work-around, please see reply #250.

                      1 Reply Last reply Reply Quote 0
                      • dennypageD
                        dennypage
                        last edited by

                        PRs are in, one for mainline pfSense and one for the NUT package, both of which are required to address the power kill issue. The mainline PR needs to go into a pfSense release cycle, so 2.4.2 is the earliest possible, but I expect 2.4.3 is more likely at this point.

                        1 Reply Last reply Reply Quote 0
                        • w0wW
                          w0w
                          last edited by

                          So does the latest beta 2.4.3 have these PR's?

                          1 Reply Last reply Reply Quote 0
                          • dennypageD
                            dennypage
                            last edited by

                            Hey w0w,

                            I’m traveling…  I don’t recall seeing merge notifications, but I get a lot of email. You should be able to check the PRs in the main pfSense and FreeBSD repos to see if they’re still outstanding. If not I’ll check it when I get home.

                            Thanks,
                            Denny

                            1 Reply Last reply Reply Quote 0
                            • F
                              fox983
                              last edited by

                              @dennypage:

                              @endy66:

                              But i found a Problem with the override values. As i said above, i have set the following to the additional ups.conf field in pfSense:

                              
                              ignorelb
                              override.battery.charge.low = 50
                              override.battery.runtime.low = 1200
                              
                              

                              BUT These values are added on top of the ups.conf file, which means in my case, they are ignored. When i edit the ups.conf manually from ssh / Shell, and set thes override values at the bottom of the file and restart the daemon, the everything works and also the Monitoring in pfsense Show the new values. Is this a bug? Problem is, after reboot or restart the daemon, These values are not the anymore…

                              The section entitled "Additional configuration lines for ups.conf" in Advanced settings is for global directives. The values you are trying to set are UPS specific arguments. UPS specific arguments should be entered in the section above that says "Extra Arguments to driver"

                              Sorry this isn't clear. I'll have a look at clarifying.

                              Hello and thanks for the great work.
                              I'm working with pfSense and NUT  2.7.4_5 package. The "bug" still remains, if I edit (via webpage) the "Extra Arguments to driver (optional)" with

                              ignorelb
                              override.battery.charge.low = 30

                              all works correctly, it adds the 2 lines AFTER

                              [myups]
                              driver=usbhid-ups
                              port=auto

                              in "/usr/local/etc/nut/ups.conf" file.
                              But if I edit the "Additional configuration lines for ups.conf", which it seems to be more correct (http://networkupstools.org/docs/man/ups.conf.html), it adds the lines at beginning of the file, and it doesn't work.
                              All other configuration settings (upsmon.conf, upsd.conf, upsd.users) add lines at the end of the files (checked via ssh), as it should be I think…

                              1 Reply Last reply Reply Quote 0
                              • dennypageD
                                dennypage
                                last edited by

                                @fox983:

                                The "bug" still remains, if I edit (via webpage) the "Extra Arguments to driver (optional)" with

                                ignorelb
                                override.battery.charge.low = 30

                                all works correctly, it adds the 2 lines AFTER

                                [myups]
                                driver=usbhid-ups
                                port=auto

                                in "/usr/local/etc/nut/ups.conf" file.
                                But if I edit the "Additional configuration lines for ups.conf", which it seems to be more correct (http://networkupstools.org/docs/man/ups.conf.html), it adds the lines at beginning of the file, and it doesn't work.

                                Not sure what "bug" you are referring to…

                                The directives you are trying to use are not global directives, but are UPS specific directives.
                                It's easy to overlook this at the beginning of the ups.conf manual page:

                                "The file begins with global directives, and then each UPS has a section which contains a number of directives that set parameters for that UPS."

                                In other words, the general format of ups.conf looks like this:

                                global_directive1
                                global_directive2
                                global_directive3
                                
                                [ups1]
                                ups_directive1
                                ups_directive2
                                ups_directive3
                                
                                [ups2]
                                ups_directive1
                                ups_directive2
                                ups_directive3
                                
                                

                                All global directives must appear before the first UPS section. So the "Additional configuration lines for ups.conf" in the Advanced section is only for global directives only, and anything put there will appear before the UPS section. The "Extra Arguments to driver" section is for things that apply to your UPS driver, and will be placed in the UPS section.

                                Adding extra driver arguments is somewhat common, but the vast majority of users do not need anything under Advanced settings which is why they are hidden by default.

                                1 Reply Last reply Reply Quote 0
                                • dennypageD
                                  dennypage
                                  last edited by

                                  @dennypage:

                                  You should be able to check the PRs in the main pfSense and FreeBSD repos to see if they’re still outstanding. If not I’ll check it when I get home.

                                  The PR for the NUT package has been merged, but the PR for mainline pfSense is still pending review/testing.

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

                                    Probably a really stupid question, but I want to confirm that this package allow the firewall to shut off in the event of power loss? Even better, could I program it to keep the firewall on battery until it gets to a certain percentage or a certain amount of time passes?

                                    If the UPS model is important, I am looking at a CP850PFCLCD connected via USB but it's not set in stone.

                                    1 Reply Last reply Reply Quote 0
                                    • dennypageD
                                      dennypage
                                      last edited by

                                      @dtallon13:

                                      Probably a really stupid question, but I want to confirm that this package allow the firewall to shut off in the event of power loss? Even better, could I program it to keep the firewall on battery until it gets to a certain percentage or a certain amount of time passes?

                                      Yes to all. This is what NUT does for a living.

                                      By default, NUT will initiate a shutdown when the UPS issues a Low Battery signal. The default values for a Low Battery signal changes from UPS to UPS, but most UPSs are pre-programmed for a pretty low level–around 5% or so. You can override this with the battery.charge.low and battery.runtime.low variables discussed earlier in this thread. See the NUT driver documentation and the ups.conf man page and for more information.

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

                                        @dennypage:

                                        @dtallon13:

                                        Probably a really stupid question, but I want to confirm that this package allow the firewall to shut off in the event of power loss? Even better, could I program it to keep the firewall on battery until it gets to a certain percentage or a certain amount of time passes?

                                        Yes to all. This is what NUT does for a living.

                                        By default, NUT will initiate a shutdown when the UPS issues a Low Battery signal. The default values for a Low Battery signal changes from UPS to UPS, but most UPSs are pre-programmed for a pretty low level–around 5% or so. You can override this with the battery.charge.low and battery.runtime.low variables discussed earlier in this thread. See the NUT driver documentation and the ups.conf man page and for more information.

                                        Awesome sauce! Thanks for tolerating my stupidity :P

                                        1 Reply Last reply Reply Quote 0
                                        • dennypageD
                                          dennypage
                                          last edited by

                                          @dennypage:

                                          The PR for the NUT package has been merged, but the PR for mainline pfSense is still pending review/testing.

                                          Both PRs now merged. Note that both a new version of pfSense (presumably 2.4.3) and a new version of the NUT package (2.7.4_6) are required for power kill to function.

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

                                            Ok, I think I broke it. I have two identical units (CP850PFCLCD), and both of them work with my Windows system but neither work with the firewall. So here's my settings:

                                            And this is all it does:

                                            Am I missing something obvious?

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