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.5m 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.
    • K
      kevindd992002 @dennypage
      last edited by

      @dennypage said in NUT package:

      @kevindd992002 Slightly concerning is that it does not show any self test result...

      Batteries are generally rated for 3 years, so you may want to have a look at your battery health. You can initiate a battery test via nut, but you will have to use the command line. Log into the system and use

      upscmd -l ups
      

      to see what commands are available. Look for commands that begin "test.battery..." Start with a quick test if available, then proceed to a deep test.

      WARNING if the battery is defective, running these tests can cause the ups to cut power to the load (your pfSense box). Use at your own risk!

      Doing a quick test yielded a "done and passed" result for the last test result field. However, when I tried doing a deep test, the CLI returned an OK message but the UPS did nothing. Does that mean that the command is not supported by my UPS? I'm still receiving low battery message notifications in my email regarding this UPS.

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

        @kevindd992002 said in NUT package:

        The weird thing is that my WAN interface has a static IP. I have an OpenVPN interface though, does that count? Although I know that this error started happening even before configuring OpenVPN.

        Do you have IPv6 perhaps?

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

          @kevindd992002 said in NUT package:

          Doing a quick test yielded a "done and passed" result for the last test result field. However, when I tried doing a deep test, the CLI returned an OK message but the UPS did nothing. Does that mean that the command is not supported by my UPS? I'm still receiving low battery message notifications in my email regarding this UPS.

          Have to try it with your other UPS, but my guess would be that the UPS is declining to initiate the deep test (which usually includes a battery calibration) because it has a low battery condition. Usually a deep test will not initiate on anything other than a completely full battery.

          Best suggestion that I could make is to completely power off the UPS and restart it from the ground up. If that doesn't fix it, I would say that it's likely that the UPS or battery is defective.

          K 1 Reply Last reply Reply Quote 0
          • K
            kevindd992002 @dennypage
            last edited by

            @dennypage

            Nope, no IPv6. I made sure to disable it wherever I can.

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

              @kevindd992002 I think rc.newwanip* can be invoked in several circumstances. Look in the system log for messages immediately preceding the Restarting/Starting all packages message.

              K 1 Reply Last reply Reply Quote 0
              • K
                kevindd992002 @dennypage
                last edited by kevindd992002

                @dennypage said in NUT package:

                @kevindd992002 I think rc.newwanip* can be invoked in several circumstances. Look in the system log for messages immediately preceding the Restarting/Starting all packages message.

                May 10 13:08:43 	php-fpm 	14757 	/rc.newwanip: Resyncing OpenVPN instances for interface CCTV.
                May 10 13:08:43 	php-fpm 	14757 	/rc.newwanip: Creating rrd update script
                May 10 13:08:43 	upsd 	45275 	User local-monitor@::1 logged into UPS [ups]
                May 10 13:08:43 	php-fpm 	378 	/rc.start_packages: Restarting/Starting all packages.
                May 10 13:08:43 	radiusd 	48725 	Signalled to terminate
                May 10 13:08:43 	radiusd 	48725 	Exiting normally
                May 10 13:08:43 	php-fpm 	378 	/rc.start_packages: Stopping service nut
                May 10 13:08:43 	upsmon 	72305 	Signal 15: exiting
                May 10 13:08:43 	upsd 	45275 	User local-monitor@::1 logged out from UPS [ups]
                May 10 13:08:43 	upsd 	45275 	mainloop: Interrupted system call
                May 10 13:08:43 	upsd 	45275 	Signal 15: exiting
                May 10 13:08:43 	usbhid-ups 	24821 	Signal 15: exiting
                May 10 13:08:43 	php-fpm 	378 	/rc.start_packages: Starting service nut
                May 10 13:08:43 	upsmon 	29518 	Startup successful
                May 10 13:08:43 	php-fpm 	40655 	/rc.newwanip: pfSense package system has detected an IP change or dynamic WAN reconnection - 0.0.0.0 -> 192.168.40.1 - Restarting packages.
                May 10 13:08:43 	check_reload_status 		Starting packages 
                

                You're right. What's the best approach to solve this though? It looks like even my OPT interfaces are interpreted as WANs. All my intefaces (WAN and LAN) have static IP's, so I'm not sure why there is an IP change event there.

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

                  @kevindd992002 I don't believe you can prevent this from occurring. Problem is, pfSense doesn't know what each package is doing with the various interfaces or if they support dynamic discovery of interface changes (most don't). The only way for pfSense to ensure everything is functioning correctly is to restart the packages.

                  K 1 Reply Last reply Reply Quote 0
                  • GertjanG
                    Gertjan
                    last edited by

                    I'm seeing this in my logs

                    php-fpm 	40655 	/rc.newwanip: pfSense package system has detected an IP change or dynamic WAN reconnection - 82.127.34.254 -> 82.127.34.254 - Restarting packages.
                    

                    I was asling yself : what changed ? Why was this line triggered ?
                    For me, "82.127.34.254" is identical to "82.127.34.254".

                    My WAN is using an RFC 1918 IP (DHCP using an upstream router) - the real WAN IP - 82.127.34.254 - doesn't change, but still, packages get restarted.
                    For longtime I really thought this was completely unnecessary, nut now I knows that that processes like unbound or openvpn don't like the fact that an interface to which they are bound, go up and down, even when the IP on that interface stays the same.

                    No "help me" PM's please. Use the forum, the community will thank you.
                    Edit : and where are the logs ??

                    1 Reply Last reply Reply Quote 0
                    • K
                      kevindd992002 @dennypage
                      last edited by

                      @dennypage said in NUT package:

                      @kevindd992002 I don't believe you can prevent this from occurring. Problem is, pfSense doesn't know what each package is doing with the various interfaces or if they support dynamic discovery of interface changes (most don't). The only way for pfSense to ensure everything is functioning correctly is to restart the packages.

                      I see. Do you happen to know why the interface IP changes for no reason, in the first place?

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

                        @kevindd992002 In your case it looks like a change of state for OpenVPN interfaces. I'm sorry I don't know much beyond this. If you want to explore more, I'd suggest asking in the General pfSense Questions or OpenVPN groups.

                        K 2 Replies Last reply Reply Quote 0
                        • B
                          bazzacad
                          last edited by

                          Can I use the 2 USB ports on my XG-7100 1U appliance to monitor my APC Smart-UPS 1500 with this package?

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

                            @bazzacad If the ups has a usb interface, I expect nut with the usbhid driver would work. You can always check the nut hardware compatibility matrix to confirm. Have you tried it and encountered a problem?

                            B 1 Reply Last reply Reply Quote 0
                            • K
                              kevindd992002 @dennypage
                              last edited by

                              @dennypage said in NUT package:

                              @kevindd992002 In your case it looks like a change of state for OpenVPN interfaces. I'm sorry I don't know much beyond this. If you want to explore more, I'd suggest asking in the General pfSense Questions or OpenVPN groups.

                              Ok, thanks.

                              I also have an error with my slave client but I'm not sure if it's OT here or not. Basically, my slave monitor client is a Debian box and it works just fine connecting to this pfsense master. But during boot time I get the same exact error described here. So what does the nut-driver.service do? Since the nut package here only runs as monitor (not server), do I need that service active?

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

                                @kevindd992002 I'm an RC guy. I don't use systemd.

                                That said, the link you posted is about a problem with usbhid-ups not being able to find the local ups on the serial bus. This is unrelated to use of upsmon to remotely monitor a ups.

                                If you are seeing anything from upsdrvctl, it means that the system is misconfigured. In a remote monitor case, only upsmon would be started. The local services, upsdrvctl (usbhid-ups) and upsd are not used and should not be started.

                                Please don't ask me how to configure systemd. I simply don't know. ☺

                                K 1 Reply Last reply Reply Quote 0
                                • K
                                  kevindd992002 @dennypage
                                  last edited by

                                  @dennypage said in NUT package:

                                  @kevindd992002 I'm an RC guy. I don't use systemd.

                                  That said, the link you posted is about a problem with usbhid-ups not being able to find the local ups on the serial bus. This is unrelated to use of upsmon to remotely monitor a ups.

                                  If you are seeing anything from upsdrvctl, it means that the system is misconfigured. In a remote monitor case, only upsmon would be started. The local services, upsdrvctl (usbhid-ups) and upsd are not used and should not be started.

                                  Please don't ask me how to configure systemd. I simply don't know. ☺

                                  Lol, ok. Yeah, that's what I figured. I'm only using the nut package their as a monitor so I don't think the other services should be started at all.

                                  1 Reply Last reply Reply Quote 0
                                  • B
                                    bazzacad @dennypage
                                    last edited by

                                    @dennypage Everything worked perfectly with my XG-7100 1U and APC Smart-UPS 1500 using the usbhid driver. Is the package able to monitor 2 UPSs? Both APC Smart-UPS 1500. I didn't try that yet?

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

                                      @bazzacad You mean a pfSense system with redundant power supplies, each with a separate ups? NUT itself is capable of this, but the NUT package does not provide any configuration support for it.

                                      1 Reply Last reply Reply Quote 0
                                      • cybrnookC
                                        cybrnook
                                        last edited by cybrnook

                                        Just wanted to say thanks for this package. I am now using pfSense to monitor my CyberPower 1500 over USB, while my two unraid servers are network slave clients. Worked great after adding the NAT rule in the OP :-)

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

                                          @cybrnook you are most welcome.

                                          It’s really nice when people say thank you.

                                          cybrnookC 1 Reply Last reply Reply Quote 1
                                          • cybrnookC
                                            cybrnook @dennypage
                                            last edited by cybrnook

                                            @dennypage said in NUT package:

                                            @cybrnook you are most welcome.

                                            It’s really nice when people say thank you.

                                            Absolutely! It's my pleasure. Now just to figure out how to add multiple source IP's to the NAT rule, since I have 3 x clients I want to be able to phone home. Maybe it's just as simple as creating one NAT rule per IP :-) And see if you baked in "monuser" for Synology by default :-) since that will be my third.

                                            EDIT: Synology was no problem. Just had to add monuser to the upsd.users with secret, and rename the UPS to "ups" in pfsense. Redid my Unraid systems with the same info, and it's all back online ✌

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