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

    NUT Package (2.8.1 and above)

    Scheduled Pinned Locked Moved UPS Tools
    288 Posts 40 Posters 138.0k 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
      pfpv @dennypage
      last edited by

      @dennypage said in NUT Package (2.8.1 and above):

      For those of you that are on amd64 based systems (Intel or AMD), and are severely affected by the shutdown on calibration/self-test issue, attached are replacement versions of upsmon and usbhid-ups that you can use until the update is published.

      When will the package be updated in the pfSense repository so it becomes updatable from the GUI? Do you have an approximate timeline?

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

        @dennypage said in NUT Package (2.8.1 and above):

        I will point out one thing that you said that you may wish to reconsider. You indicate that the NAS is the most important thing to have a proper shutdown. I agree with this general sentiment. However, by running the NAS as the NUT primary, you are actually incurring higher risk for the NAS rather than less.

        The NUT primary does not initiate a shutdown until all the associated secondaries have logged out of the primary. Assuming a default polling interval of 5 seconds, a pfSense or Linux system will take something on the order of 10-15 seconds before they log out, and another 30-90 seconds to complete a shutdown. This means that the NAS will not begin its shutdown until 10-15 seconds after the UPS declares a low battery. Depending upon configuration and current activity, a Synology usually takes over 2 minutes to complete a shutdown. If the UPS is off in calculating remaining runtime, you run the risk of exhausting the battery before the NAS has completed its shutdown.

        If you reverse this situation and use pfSense or a Linux system as the primary, then the NAS will begin its shutdown within 5 seconds. Not only does this give a wider margin of safety for the NAS, it can give an increased margin of safety for the other systems as well. When the NAS shuts down, there is suddenly a lot less load on the UPS, which gives more time for the other systems to complete their shutdown even if the estimated remaining runtime was incorrect.

        Thank you for your wise advice. I will follow it. I did not know that the primary waits for secondaries' logout.

        Can you please advise me on how to setup pfSense primary with Synology secondary? If I chose UPS Type "Local USB" on pfSense will it serve as a NUT server? I suppose I need to define a user for Synology in upsd.users?

        On Synology, do I select UPS type "Synology UPS server"? There are only 3 options: "USB UPS", "SNMP UPS" and "Synology UPS server". While not obvious, only the last option has some sense.

        When does one use an "apcupsd" package in pfSense? The description indicates I should be using it since I have an APC UPS.

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

          @pfpv said in NUT Package (2.8.1 and above):

          @dennypage said in NUT Package (2.8.1 and above):

          For those of you that are on amd64 based systems (Intel or AMD), and are severely affected by the shutdown on calibration/self-test issue, attached are replacement versions of upsmon and usbhid-ups that you can use until the update is published.

          When will the package be updated in the pfSense repository so it becomes updatable from the GUI? Do you have an approximate timeline?

          PRs for the next version are in place, but I expect that the core devs are off this week so the PR will not be looked at until next week. Best guess, one to two weeks.

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

            @pfpv said in NUT Package (2.8.1 and above):

            Can you please advise me on how to setup pfSense primary with Synology secondary? If I chose UPS Type "Local USB" on pfSense will it serve as a NUT server? I suppose I need to define a user for Synology in upsd.users?

            See post #2 in this thread, Notes on remote access to NUT, in this thread for information on how to enable remote access to NUT. At the end of the post, there is a section Notes on Synology which has the name and password requirements for interoperation with NUT on Synology.

            @pfpv said in NUT Package (2.8.1 and above):

            On Synology, do I select UPS type "Synology UPS server"? There are only 3 options: "USB UPS", "SNMP UPS" and "Synology UPS server".

            NUT is the UPS management system on Synology, though they disguise the fact that they are using it. You would select "Synology UPS server" as the type UPS type.

            APCUPSD is an alternative to NUT for managing APC UPSs. It does not interoperate with other UPS types, and does not work with NUT on Synology.

            1 Reply Last reply Reply Quote 1
            • H
              ha11oga11o
              last edited by

              Hello,

              USB connection is totally unstable so i connected it on rs232 port. It works fine so far, but still it says "Status Alert: The UPS requires attention". In logs i cannot find what kind of attention it needs this time. For me all data looks fine. Batteries are ok. temperature is 26C. Is there any way to see on what error is nut referring its statement about attention?

              heres latest log:

              Dec 29 13:52:00 	sshguard 	2303 	Now monitoring attacks.
              Dec 29 13:52:00 	sshguard 	35323 	Exiting on signal.
              Dec 29 13:50:22 	upsmon 	59353 	UPS RielloSEP2200 on line power
              Dec 29 13:50:17 	upsmon 	59353 	UPS RielloSEP2200: on bypass (powered, not protecting)
              Dec 29 13:50:17 	upsmon 	59353 	Communications with UPS RielloSEP2200 established
              Dec 29 13:50:16 	upsd 	60905 	Connected to UPS [RielloSEP2200]: riello_ser-RielloSEP2200
              Dec 29 13:50:15 	riello_ser 	87467 	Startup successful
              Dec 29 13:50:12 	upsmon 	59353 	Poll UPS [RielloSEP2200] failed - Driver not connected
              Dec 29 13:50:07 	upsmon 	59353 	Poll UPS [RielloSEP2200] failed - Driver not connected
              Dec 29 13:50:02 	upsmon 	59353 	UPS RielloSEP2200 is unavailable
              Dec 29 13:50:02 	upsmon 	59353 	Poll UPS [RielloSEP2200] failed - Driver not connected
              Dec 29 13:50:02 	upsd 	60905 	User local-monitor@127.0.0.1 logged into UPS [RielloSEP2200]
              Dec 29 13:49:58 	upsd 	60905 	Startup successful
              Dec 29 13:49:58 	upsd 	60830 	Found 1 UPS defined in ups.conf
              Dec 29 13:49:58 	upsd 	60830 	Can't connect to UPS [RielloSEP2200] (riello_ser-RielloSEP2200): No such file or directory
              Dec 29 13:49:58 	upsd 	60830 	listening on ::1 port 3493
              Dec 29 13:49:58 	upsd 	60830 	listening on 127.0.0.1 port 3493
              Dec 29 13:49:57 	upsmon 	59353 	Communications with UPS RielloSEP2200 lost
              Dec 29 13:49:57 	upsmon 	59353 	UPS [RielloSEP2200]: connect failed: Connection failure: Connection refused
              Dec 29 13:49:57 	upsmon 	59032 	Startup successful
              Dec 29 13:49:57 	php-fpm 	37711 	/nut_settings.php: Starting service nut
              Dec 29 13:49:57 	check_reload_status 	4706 	Syncing firewall
              Dec 29 13:49:57 	php-fpm 	37711 	/nut_settings.php: Configuration Change: admin@192.168.1.210 (Local Database): Updated UPS settings
              Dec 29 13:49:00 	php-cgi 	86948 	servicewatchdog_cron.php: Service Watchdog detected service nut stopped. Restarting nut (UPS monitoring daemon)
              Dec 29 13:48:30 	riello_usb 	5395 	Signal 15: exiting
              Dec 29 13:48:30 	upsd 	97144 	Signal 15: exiting
              Dec 29 13:48:30 	upsd 	97144 	mainloop: Interrupted system call
              Dec 29 13:48:30 	upsd 	97144 	User local-monitor@127.0.0.1 logged out from UPS [RielloSEP2200]
              Dec 29 13:48:30 	upsmon 	95612 	Signal 15: exiting
              Dec 29 13:48:30 	php-fpm 	2827 	/nut_settings.php: Stopping service nut 
              

              If that highlight is because of

              Dec 29 13:50:22 	upsmon 	59353 	UPS RielloSEP2200 on line power
              Dec 29 13:50:17 	upsmon 	59353 	UPS RielloSEP2200: on bypass (powered, not protecting) 
              

              That statement "not protecting" is not true. Its in ECO mode, so its not act like turbine. And works on demand relaying on its switching speed which works rather flawless.

              Snimka zaslona 2023-12-29 140320.png

              Thank you in advance.

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

                @ha11oga11o said in NUT Package (2.8.1 and above):

                It works fine so far, but still it says "Status Alert: The UPS requires attention".

                Dec 29 13:50:17 upsmon 59353 UPS RielloSEP2200: on bypass (powered, not protecting)
                That statement "not protecting" is not true. It's in ECO mode, so it's not act like turbine. And works on demand relaying on its switching speed which works rather flawless.

                The UPS requires attention because NUT indicates that the UPS is on bypass, which would mean that power has bypassed the UPS protection circuits. This could be either a manual operation, or something automatic in response to an input power issue. Many UPSs have ECO modes, but this should not be reported as being in bypass mode.

                Glancing at the manual for your unit, it appears to have a rich automatic bypass capability. Look carefully to see if your UPS is actually indicating that it is in bypass.

                In the end, here are the possibilities as I see them:

                1. The UPS is in bypass mode, and it is reporting correctly.
                2. The UPS is incorrectly reporting that it is in bypass mode when it is not.
                3. The UPS is not reporting that it is in bypass mode, but the driver is incorrectly declaring it to be.

                If the issue is #2, then you will need to go to the UPS vendor.

                If the issue is #3, then you will need to go to the networkupstools folk, or ask the vendor to go to them on your behalf.

                H 1 Reply Last reply Reply Quote 0
                • H
                  ha11oga11o @dennypage
                  last edited by

                  @dennypage

                  I see what is problem here. As stated in manual:
                  "In order to optimize performance, in ECO mode, the load is normally powered by the bypass. If the mains goes out of the permitted tolerance range, the UPS switches to ON LINE operation. If the mains returns within the permitted tolerance range for at least five minutes, the UPS goes back to powering the load from the bypass."

                  And its exactly behaving like that. And thats fine i want it that way. It states "Summary status: On line, Bypass, Charging", its not sending in eg. "ECO mode", which should be unique status. It seems its mix of problem 1 and 2. Sadly i doubt manufacturer care to do anything about it. I just hope networkupstools folks will have time and way to fix this for this line of product. I think all SEPxxx have same function and could be affected with same issue. Also i can be that UPS itself not sending trigger about ECO mode and what it is actually means.

                  Many thnx for helping me understanding problem. That was really kind of you.

                  Cheers!

                  M 1 Reply Last reply Reply Quote 1
                  • M
                    mcury @ha11oga11o
                    last edited by mcury

                    Overall, NUT is working perfectly for me.
                    But it seems that when a gateway bounces, NUT is being disconnected from the UPS and I get a few logs such as:

                    2024-01-12 14:57:34.000	upsmon[53646]:
                    upsmon[53646]: Communications with UPS ups lost
                    2024-01-12 14:57:34.000	upsmon[53646]:
                    upsmon[53646]: UPS [ups]: connect failed: Connection failure: Connection refused
                    2024-01-12 14:57:34.000	upsmon[52998]:
                    upsmon[52998]: Startup successful
                    2024-01-12 14:57:34.000	upsd[84388]:
                    upsd[84388]: Signal 15: exiting
                    2024-01-12 14:57:34.000	upsd[84388]:
                    upsd[84388]: mainloop: Interrupted system call
                    2024-01-12 14:57:34.000	upsd[84388]:
                    upsd[84388]: User local-monitor@127.0.0.1 logged out from UPS [ups]
                    2024-01-12 14:57:34.000	upsmon[54121]:
                    upsmon[54121]: Signal 15: exiting
                    2024-01-12 14:57:31.000	upsmon[54121]:
                    upsmon[54121]: Poll UPS [ups] failed - Driver not connected
                    2024-01-12 14:57:26.000	upsmon[54121]:
                    upsmon[54121]: Poll UPS [ups] failed - Driver not connected
                    2024-01-12 14:57:21.000	upsmon[54121]:
                    upsmon[54121]: Poll UPS [ups] failed - Driver not connected
                    2024-01-12 14:57:16.000	upsmon[54121]:
                    upsmon[54121]: Poll UPS [ups] failed - Driver not connected
                    

                    Not sure but It really seems to be related to gateway/interface status changes.

                    To fix, I have to unplug the USB port from the UPS, reconnect it and then restart NUT in pfSense.

                    dead on arrival, nowhere to be found.

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

                      @mcury said in NUT Package (2.8.1 and above):

                      But it seems that when a gateway bounces, NUT is being disconnected from the UPS

                      Look for a patch earlier in this thread, circa post 107 on December 28th.

                      [Sorry, permalinks don't appear to be functioning correctly in the forum.]

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

                        @dennypage said in NUT Package (2.8.1 and above):

                        @mcury said in NUT Package (2.8.1 and above):

                        But it seems that when a gateway bounces, NUT is being disconnected from the UPS

                        Look for a patch earlier in this thread, circa post 107 on December 28th.

                        [Sorry, permalinks don't appear to be functioning correctly in the forum.]

                        I applied it today, really thanks for that.
                        Not only applied the patch, but saved the config again and rebooted just to be safe.

                        Now I'm monitoring it 👍

                        dead on arrival, nowhere to be found.

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

                          @mcury said in NUT Package (2.8.1 and above):

                          Not only applied the patch, but saved the config again and rebooted just to be safe.

                          Yes, you do need to re-save the config. I edited the prior post and added a note indicating that.

                          1 Reply Last reply Reply Quote 1
                          • N
                            NinthWave @dennypage
                            last edited by

                            @dennypage said in NUT Package (2.8.1 and above):

                            @pfpv said in NUT Package (2.8.1 and above):

                            I respectfully disagree about Synology. It's just a server that passes UPS messages. It's very stable, does it properly, has worked for years and I haven't seen any complaints. I chose to connect my UPS to Synology because in my opinion it is the most critical piece of equipment to be properly shut down, and it provides a NUT server for other equipment.

                            I don't disagree that there is a bug in NUT, and I will be looking at that shortly. That said...

                            I'm in my third generation of Synology equipment. Fifteen plus years. I have handled a number of support issues arising from Synology's NUT implementation, both mine and others. Their NUT implementation started out very straight forward, but over time it has evolved, becoming more and more specialized and complex. With DSM 7.2, it's gotten to the point that I don't consider it to be completely reliable, and view it as a primary of last resort.

                            I will point out one thing that you said that you may wish to reconsider. You indicate that the NAS is the most important thing to have a proper shutdown. I agree with this general sentiment. However, by running the NAS as the NUT primary, you are actually incurring higher risk for the NAS rather than less.

                            The NUT primary does not initiate a shutdown until all the associated secondaries have logged out of the primary. Assuming a default polling interval of 5 seconds, a pfSense or Linux system will take something on the order of 10-15 seconds before they log out, and another 30-90 seconds to complete a shutdown. This means that the NAS will not begin its shutdown until 10-15 seconds after the UPS declares a low battery. Depending upon configuration and current activity, a Synology usually takes over 2 minutes to complete a shutdown. If the UPS is off in calculating remaining runtime, you run the risk of exhausting the battery before the NAS has completed its shutdown.

                            If you reverse this situation and use pfSense or a Linux system as the primary, then the NAS will begin its shutdown within 5 seconds. Not only does this give a wider margin of safety for the NAS, it can give an increased margin of safety for the other systems as well. When the NAS shuts down, there is suddenly a lot less load on the UPS, which gives more time for the other systems to complete their shutdown even if the estimated remaining runtime was incorrect.

                            The relevant passage from upsmon.conf:

                            # Also, since the primary system stays up the longest, it suffers higher risks
                            # of ungraceful shutdown if the estimation of remaining runtime (or of the
                            # time it takes to shut down this system) was guessed wrong. By consequence,
                            # the "secondary" systems typically monitor the power environment state
                            # through the 'upsd' processes running on the remote (often "primary") systems
                            # and do not directly interact with an UPS (no local NUT drivers are running
                            # on the secondary systems). As such, secondaries typically shut down as
                            # soon as there is a sufficiently long power outage, or a low-battery alert
                            # from the UPS, or a loss of connection to the primary while the power was
                            # last known to be missing.
                            

                            As a general rule, you want to have systems that represent the highest UPS load and/or longest shutdown time as secondaries, and a system that represents lower load and is fast to shut down as the primary.

                            I am not done reading the thread but this morning I had my second shutdown of pfSense. Same behavior as OP. I don't have a synology but a Proxmox machine hosting a Debian/Docker server.

                            At both events, everything stayed on except pfSense that shut down. no router, no LAN.

                            Going trough the rest of the thread.

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

                              @NinthWave said in NUT Package (2.8.1 and above):

                              I am not done reading the thread but this morning I had my second shutdown of pfSense. Same behavior as OP. I don't have a synology but a Proxmox machine hosting a Debian/Docker server.

                              At both events, everything stayed on except pfSense that shut down. no router, no LAN.

                              Circa post 104 there are replacement executables that you may use until the next drop of NUT.

                              N 1 Reply Last reply Reply Quote 0
                              • N
                                NinthWave @dennypage
                                last edited by NinthWave

                                @dennypage said in NUT Package (2.8.1 and above):

                                @ha11oga11o said in NUT Package (2.8.1 and above):

                                With pfSense 2.7.0 and nut 2.8.2 i still have huge problems with Riello 2200.

                                Something is off with the version numbers here. pfSense-pkg-nut version 2.8.2 requires pfSense version 23.09/2.7.1 or above. Are you sure you are not running pfSense-pkg-nut version 2.8.0?

                                Edit: In the other thread you started, it appears that you haven't updated anything since Nov 10th. The pattern you are describing is characteristic of version 2.8.0. Did you go through any of the later posts in that thread? @Unoptanio indicates success with the Riello using version 2.8.2 of the pfSense-pkg-nut on pfsense version 2.7.1.

                                Thanks!

                                But where is one to copy these files ? I looked under /usr/bin and /usr/local/bin with no avail.

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

                                  @dennypage said in NUT Package (2.8.1 and above):

                                  @NinthWave said in NUT Package (2.8.1 and above):

                                  I am not done reading the thread but this morning I had my second shutdown of pfSense. Same behavior as OP. I don't have a synology but a Proxmox machine hosting a Debian/Docker server.

                                  At both events, everything stayed on except pfSense that shut down. no router, no LAN.

                                  Circa post 104 there are replacement executables that you may use until the next drop of NUT.

                                  Thanks. I did not see it at first.

                                  Are you aware if there is a reason there are no subthreads is Netgate community.
                                  Using Google, I typed "pfsense + the_push_message_when_pfsense_shutdown"
                                  But if I were have been to look under "Nut Package (2.8.1 and above", I may not have read all the 122 messages.
                                  A subthread for this issue would have been greatly appreciated.

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

                                    @NinthWave said in NUT Package (2.8.1 and above):

                                    I looked under /usr/bin and /usr/local/bin with no avail.

                                    /usr/local/sbin and /usr/local/libexec/nut.

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

                                      @NinthWave said in NUT Package (2.8.1 and above):

                                      Are you aware if there is a reason there are no subthreads is Netgate community.

                                      Sorry, can't help you there. I've no association with the forum other than as a user of it.

                                      1 Reply Last reply Reply Quote 0
                                      • R
                                        rameshk @dennypage
                                        last edited by

                                        @dennypage Thank you for the detailed information. I had issues with NUT and replaced it with apcupsd. Which resolved the issue.

                                        1 Reply Last reply Reply Quote 0
                                        • N
                                          NinthWave @dennypage
                                          last edited by NinthWave

                                          @dennypage said in NUT Package (2.8.1 and above):

                                          @NinthWave said in NUT Package (2.8.1 and above):

                                          I looked under /usr/bin and /usr/local/bin with no avail.

                                          /usr/local/sbin and /usr/local/libexec/nut.

                                          Thank you

                                          I have copied the files in their respective directories.
                                          When I restart NUT service from GUI, I get

                                          Status Alert: The UPS requires attention
                                          

                                          /var/log/nut is empty

                                          [EDIT 09:14 EST]
                                          I reinstalled the package from GUI in pfSense's package manager:
                                          The usbhid-ups did not get refreshed
                                          The upsmon got refreshed
                                          The system is working

                                          So either I did something wrong while copying the file or upsmon has a bug or something I did not do.

                                          Maybe mention I extracted the .gz in Windows then copied it to pfSense.

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

                                            @NinthWave You probably had wrong file permissions. Be sure to match permissions as previous. Should look like this:

                                            [23.09.1-RELEASE][root@fw]/root: ls -l /usr/local/sbin/upsmon* /usr/local/libexec/nut/usbhid-ups*
                                            -rwxr-xr-x  1 root wheel 333728 Dec 27 10:14 /usr/local/libexec/nut/usbhid-ups
                                            -rwxr-xr-x  1 root wheel 287088 Nov  1 00:57 /usr/local/libexec/nut/usbhid-ups.org
                                            -rwxr-xr-x  1 root wheel  87760 Dec 27 10:13 /usr/local/sbin/upsmon
                                            -rwxr-xr-x  1 root wheel  68904 Nov  1 00:57 /usr/local/sbin/upsmon.org
                                            [23.09.1-RELEASE][root@fw]/root: 
                                            
                                            N 1 Reply Last reply Reply Quote 0
                                            • First post
                                              Last post
                                            Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.