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

    System Shuts Down when UPS does a Self Test

    Scheduled Pinned Locked Moved General pfSense Questions
    25 Posts 8 Posters 4.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.
    • A
      alhaunts
      last edited by

      Since upgrading to 2.7.2 CE & NUT 2.8.2, my system shuts down every time the remote UPS does a self test. This from the log:

      Dec 17 08:37:45 shutdown 48371 power-down by root:
      Dec 17 08:37:40 upsmon 98465 Auto logout and shutdown proceeding
      Dec 17 08:37:40 upsmon 98465 Executing automatic power-fail shutdown
      Dec 17 08:37:40 upsmon 98465 UPS UPS@192.168.1.250: administratively OFF or asleep

      Would adding a "DEADTIME 30" entry in SERVICES -> UPS -> SETTINGS -> ADVANCED sort this out?

      S 1 Reply Last reply Reply Quote 0
      • S
        SteveITS Galactic Empire @alhaunts
        last edited by

        @alhaunts I see this if the UPS battery is old/bad at least on APC UPSs. The self test works just fine all along until one day it runs and finds out the battery can't produce enough power, so the test fails but the PC shuts off a second later. It might be your router doesn't use enough power to fail like that but is on long enough to trigger the shutdown?

        Pre-2.7.2/23.09: Only install packages for your version, or risk breaking it. Select your branch in System/Update/Update Settings.
        When upgrading, allow 10-15 minutes to restart, or more depending on packages and device speed.
        Upvote ๐Ÿ‘ helpful posts!

        A 1 Reply Last reply Reply Quote 0
        • A
          alhaunts @SteveITS
          last edited by

          @SteveITS It is an APC UPS, but the battery is pretty fresh and the NAS it is connected directly to stays up as does a 2nd NAS connected remotely. Only the PfSense box shuts down.

          S dennypageD 2 Replies Last reply Reply Quote 0
          • S
            SteveITS Galactic Empire @alhaunts
            last edited by

            @alhaunts yes but it's being told to shut down. The cable is going from the UPS to pfSense? It might not actually lose power so the other stuff stays on but if it has less than "n" minutes remaining it will tell pfSense to shut down.

            Stated another way the UPS may think it has 30 minutes runtime until it actually switches on battery and finds out it has 1 minute.

            I've not used NUT, though, we've only used apcupsd. (or of course a lot of Windows PowerChute installs). Not that that would make a real difference.

            Pre-2.7.2/23.09: Only install packages for your version, or risk breaking it. Select your branch in System/Update/Update Settings.
            When upgrading, allow 10-15 minutes to restart, or more depending on packages and device speed.
            Upvote ๐Ÿ‘ helpful posts!

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

              @alhaunts said in System Shuts Down when UPS does a Self Test:

              It is an APC UPS, but the battery is pretty fresh and the NAS it is connected directly to stays up as does a 2nd NAS connected remotely. Only the PfSense box shuts down.

              The client is being directed to shut down by the server.

              If by "NAS" you mean Synology? As of DSM 7 Synology systems no longer actually shut down, but just enters a quiescent mode. Also, check and make sure that you have not enabled "Customize time" in the UPS configuration.

              J 1 Reply Last reply Reply Quote 0
              • J
                jeff3820 @dennypage
                last edited by

                @dennypage FYI, under control panel, hardware & power, UPS there is a checkbox to enable shutdown when the UPS enters standby mode.

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

                  @jeff3820 said in System Shuts Down when UPS does a Self Test:

                  FYI, under control panel, hardware & power, UPS there is a checkbox to enable shutdown when the UPS enters standby mode.

                  What version of DSM?

                  I'm currently running DSM, 7.2.1-69057, and it does not have that checkbox. It only has "Time before DiskStation enters Standby Mode." For me, and several folk I have worked with, that option went away when upgrading from DSM 6 to DSM 7.

                  Digging through the NUT configuration and scripts generated my DSM, it seemed clear that doesn't ever actually perform a power off. It's not a big issue for me, because the UPS is principally a bridge for a generator, but I did dig into it a fair bit during the DSM 7 beta.

                  Now, you may have a different Synology model than I do... YMMV.

                  J 1 Reply Last reply Reply Quote 0
                  • J
                    jeff3820 @dennypage
                    last edited by

                    @dennypage This NAS is an older DS215j running 7.1.1 update 5

                    NAS UPS.png

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

                      @jeff3820 Interesting. As best as I recall, for me that checkbox went away with the release of DSM 7.0 rather than 7.2. Perhaps I mis-remember. Regardless, the option is gone now.

                      1 Reply Last reply Reply Quote 0
                      • C
                        Chunks
                        last edited by

                        I'm actually experiencing the exact same thing as OP.

                        pfSense (latest NUT, 2.8.2 I think) is acting as slave to my file server (Unraid) which is running NUT 2.8.1. A couple of times now, my APC UPS goes into an apparent "Test" mode, and while my fileserver stays up, my router shuts itself off.

                        I asked in the Unraid forums about this, and they pointed to a bug report that was recently (end of october) fixed with NUT: https://github.com/networkupstools/nut/issues/2104

                        Unfortunately, I'm a little confused by the versioning that's going on here. It seems possible to me, that the PFSense package is using a release from just before this fix? Even though it's labeled as 2.8.2 in the pfsense Package list, I'm not sure if that directly correlates to the underlying NUT version.

                        Maybe we just need an update? I don't know.

                        dennypageD 2 Replies Last reply Reply Quote 0
                        • dennypageD
                          dennypage @Chunks
                          last edited by

                          @Chunks said in System Shuts Down when UPS does a Self Test:

                          I asked in the Unraid forums about this, and they pointed to a bug report that was recently (end of october) fixed with NUT: https://github.com/networkupstools/nut/issues/2104

                          I'll have a look shortly.

                          1 Reply Last reply Reply Quote 1
                          • dennypageD
                            dennypage @Chunks
                            last edited by

                            @Chunks said in System Shuts Down when UPS does a Self Test:

                            Unfortunately, I'm a little confused by the versioning that's going on here. It seems possible to me, that the PFSense package is using a release from just before this fix? Even though it's labeled as 2.8.2 in the pfsense Package list, I'm not sure if that directly correlates to the underlying NUT version.

                            From the NUT support thread:

                            The version of NUT is actually FreeBSD's nut-devel-2023.10.07_1, which is based on git just prior to the 2.8.1 release. You can see this on the Installed Packages screen. The upper level package, pfSense-pkg-nut-2.8.2, is labeled as 2.8.2 because of a mistake being made at the moment of package publication. This is mentioned earlier in this thread. The published package should have been pfSense-pkg-nut-2.8.1_1, but once it was published as 2.8.2 the version number could not be downgraded. It doesn't affect anything other than human perception. If you really want to know more, you can read the discussions in the Redmine and Git PRs.

                            1 Reply Last reply Reply Quote 1
                            • M
                              mtk67
                              last edited by

                              FWIW, I am having the same problem as OP. My pfSense is the ONLY device that is randomly shutting down. I have Synology NAS devices also running NUT client (slave) to the same NUT server that is on a Rasp PI and they stay up the entire time. This started a couple of weeks ago and has happened twice now (I think each time was a Friday). I'm fairly certain this started around the time of the pfSense 23.09-1 release.

                              NUT Server 2.7.4 (on a Rasp Pi)
                              pfSense+ 23.09-1-Release
                              NUT 2.8.2 package on pfSense

                              Is there any way to tell when the NUT server will next run a system test? Maybe I could keep an eye on things and see what occurs.

                              I'm guessing the resolution to this needs to come in the way of a NUT package update or another pfSense patch or update?

                              dennypageD A 2 Replies Last reply Reply Quote 0
                              • dennypageD
                                dennypage @mtk67
                                last edited by

                                @mtk67 with your current configuration, you will need to wait for a NUT update. However if you reverse the situation and run pfSense as the master/primary and Synology as the slave/secondary, it will also solve your issue. FWIW, using Synology as the primary is not best practice--see the NUT support thread for info on this.

                                M 1 Reply Last reply Reply Quote 0
                                • M
                                  mtk67 @dennypage
                                  last edited by

                                  @dennypage Thanks but I didn't say I was running Synology as the primary. They are configured as slaves/clients just like the pfSense is. The primary is on a raspberry pi.

                                  dennypageD 1 Reply Last reply Reply Quote 0
                                  • A
                                    alhaunts @mtk67
                                    last edited by

                                    @mtk67 said in System Shuts Down when UPS does a Self Test:

                                    Is there any way to tell when the NUT server will next run a system test? Maybe I could keep an eye on things and see what occurs.

                                    According to APC, most of their UPS's run a self test every 14 days. Other brands, IDK.

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

                                      @mtk67 said in System Shuts Down when UPS does a Self Test:

                                      Thanks but I didn't say I was running Synology as the primary. They are configured as slaves/clients just like the pfSense is. The primary is on a raspberry pi.

                                      My bad. Yes, running NUT on the pi is a good choice.

                                      It's going to take an update to NUT on pfSense to address the issue. I'm working on that. As a temporary workaround until an update is published, you could have pfSense as the primary.

                                      M 1 Reply Last reply Reply Quote 0
                                      • M
                                        mtk67 @dennypage
                                        last edited by

                                        @dennypage No worries. Just wanted to clarify. I really appreciate the info and the suggestion for a temporary fix. I was beginning to worry that I was having a problem with the power supply on the device running pfSense with the random issues, but glad I found this thread and have a better understanding of what is likely occurring. I look forward to the fix in NUT. I may take your advice on the workaround too. Cheers and Happy New Year.

                                        1 Reply Last reply Reply Quote 1
                                        • S SteveITS referenced this topic on
                                        • N NeVaR referenced this topic on
                                        • N
                                          NeVaR
                                          last edited by NeVaR

                                          I would like also like to point out that I also experienced the same thing. I'm running Synology as the primary but it is running on DSM 6.2 so nothing change on Synology. In my case the system shuts down twice but gap is more than 30 days. I also check the log on synology and there no power outage. I'm guessing there change to NUT package that it is very sensitive? Also, have truenas and it didn't report any issue and didn't shutdown.

                                          EDIT: for the meantime, I disable the nut services for now.

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

                                            @NeVaR There is an issue in NUT in the current version of nut-devel in pfSense's copy of the FreeBSD repo. It is fixed upstream, and hopefully will be fixed in the pfSense copy soon.

                                            As an aside, I would recommend that you move the primary to pfSense rather than the Synology. As noted above, running the Synology as primary is not best practice.

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