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.3m 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.
    • S
      stevemac00
      last edited by

      NUT was working fine but I had to restore some configuration in pfsense 2.4.4-RELEASE-p2. After that I loaded the NUT package but it fails to start. I've tried rebooting, reloading package, etc.

      I removed nut and tried apcupsd and it works so I removed that and loaded nut again but it fails to load.

      I can't find logs or any idea why it would fail when it worked before. Is it odd that the package is 2.7.4_7 but has a dependency of nut_2.7.4_8? (I was told on /r/pfsense that was unrelated.)

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

        @stevemac00 Look for entries in the system log (Status / System Logs / System / General) matching either "nut" or "ups". Use the funnel icon to scan.

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

          When I restored configuration for some reason it didn't reconfigure. I did manually and it works again. Probably operator error. Thank you for replying.

          1 Reply Last reply Reply Quote 0
          • M
            mrsunfire
            last edited by

            I'm using NUT 2.7.4_7 with a APC Back UPS Pro 550 USB but I don't get it to work. I selected the usbhid driver, but I always see in logs:

            Apr 16 22:52:07	upsmon	69828	Poll UPS [APC_BackUPS_Pro_550] failed - Driver not connected
            Apr 16 22:52:02	upsmon	69828	Poll UPS [APC_BackUPS_Pro_550] failed - Driver not connected
            Apr 16 22:50:52	upsmon	69828	Poll UPS [APC_BackUPS_Pro_550] failed - Driver not connected
            Apr 16 22:50:47	upsmon	69828	UPS APC_BackUPS_Pro_550 is unavailable
            Apr 16 22:50:47	upsmon	69828	Poll UPS [APC_BackUPS_Pro_550] failed - Driver not connected
            

            Any idea?

            Netgate 6100 MAX

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

              @mrsunfire What you are looking for is further back in the logs. You're looking for what usbhid-ups says when it starts up. You can force new log entries by restarting the UPS service.

              Have you rebooted or unplugged/re-plugged since you installed NUT?

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

                @jompigrande No reason I know of for this.

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

                  @dennypage said in NUT package:

                  @mrsunfire What you are looking for is further back in the logs. You're looking for what usbhid-ups says when it starts up. You can force new log entries by restarting the UPS service.

                  Have you rebooted or unplugged/re-plugged since you installed NUT?

                  Yes I did. I also reinstalled the NUT package. The apcups package also works fine with the UPS.

                  Log after restart:

                  Apr 17 05:33:29	snmpd	66779	SIOCGIFDESCR (usbus0): Device not configured
                  Apr 17 05:33:26	upsmon	91798	UPS APC_BackUPS_Pro_550 is unavailable
                  Apr 17 05:33:26	upsmon	91798	Poll UPS [APC_BackUPS_Pro_550] failed - Driver not connected
                  Apr 17 05:33:21	upsmon	91798	Communications with UPS APC_BackUPS_Pro_550 lost
                  Apr 17 05:33:21	upsmon	91798	Poll UPS [APC_BackUPS_Pro_550] failed - Driver not connected
                  Apr 17 05:33:21	upsd	92208	User local-monitor@::1 logged into UPS [APC_BackUPS_Pro_550]
                  Apr 17 05:33:19	upsd	92208	Startup successful
                  Apr 17 05:33:19	upsd	92118	Can't connect to UPS [APC_BackUPS_Pro_550] (usbhid-ups-APC_BackUPS_Pro_550): No such file or directory
                  Apr 17 05:33:19	upsd	92118	listening on 127.0.0.1 port 3493
                  Apr 17 05:33:19	upsd	92118	listening on ::1 port 3493
                  Apr 17 05:33:18	upsmon	91389	Startup successful
                  

                  Netgate 6100 MAX

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

                    @mrsunfire We would be looking for messages from "usbhid-ups" which is the actual driver.

                    Also, can you also post your UPS config? Either the <nut> section of the config or a screenshot of Services / UPS / Settings. Thanks.

                    1 Reply Last reply Reply Quote 0
                    • M
                      mrsunfire
                      last edited by mrsunfire

                      I don‘t see any log with usbhid-ups.

                      Settings:

                      alt text

                      Netgate 6100 MAX

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

                        @mrsunfire There definitely should be log entries for "usbhid-ups" when you start the nut service.

                        Just to make sure you're not hitting a name limit, please change the name of the ups to something simple with no special characters. Something like "myups"

                        Please post the output of these two files:

                        /usr/local/etc/nut/ups.conf
                        /usr/local/etc/rc.d/nut.sh

                        Thanks.

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

                          @dennypage I changed the name to „UPS“. Still the same error. I don‘t see any logs from usbhid-ups.

                          [UPS]
                          driver=usbhid-ups
                          port=auto
                          
                          
                          #!/bin/sh
                          # This file was automatically generated
                          # by the pfSense service handler.
                          
                          rc_start() {
                          	echo starting NUT
                          	/usr/bin/killall -q -9 upsmon
                          	/usr/bin/killall -q -9 upsd
                          	/usr/bin/killall -q -9 upsdrvctl
                          	/usr/bin/killall -q -9 usbhid-ups
                          	/usr/local/sbin/upsmon
                          	/usr/local/sbin/upsdrvctl start &
                          	sleep 1
                          	/usr/local/sbin/upsd -u root
                          	return 0
                          }
                          
                          rc_stop() {
                          	echo stopping NUT
                          	/usr/bin/killall -q upsmon
                          	/usr/bin/killall -q upsd
                          	/usr/bin/killall -q upsdrvctl
                          	/usr/bin/killall -q usbhid-ups
                          	return 0
                          }
                          
                          case $1 in
                          	start)
                          		rc_start
                          		;;
                          	stop)
                          		rc_stop
                          		;;
                          	restart)
                          		rc_stop
                          		rc_start
                          		;;
                          esac
                          
                          
                          

                          Netgate 6100 MAX

                          M dennypageD 2 Replies Last reply Reply Quote 0
                          • M
                            mrsunfire @mrsunfire
                            last edited by mrsunfire

                            OK I got it to work by also using the apcusbd package and setup the NUT package to USB type „Remote apcusbd“. Now I got the widget working!

                            Netgate 6100 MAX

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

                              @mrsunfire Please try starting the script by hand using the command:

                              /usr/local/etc/rc.d/nut.sh start
                              

                              and post the output.

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

                                @mrsunfire Uh... you aren't trying to run apcupsd and nut at the same time are you?

                                1 Reply Last reply Reply Quote 0
                                • M
                                  mrsunfire
                                  last edited by

                                  No I was not. But now I am and it works flawless.

                                  Netgate 6100 MAX

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

                                    @mrsunfire You cannot use apcupsd and nut at the same time. They cannot both manage system shutdown.

                                    If you want help to understand the issue with nut, I will help you but you need to disable or delete apcupsd before proceeding.

                                    Otherwise, if you are happy with using apcupsd, you should delete the nut package.

                                    1 Reply Last reply Reply Quote 0
                                    • M
                                      mrsunfire
                                      last edited by

                                      Why? I just want the widget and nothing else. This works only with NUT and NUT only works with apcupsd right now :)
                                      But yes, I want to find out what the problem is. I will do this tomorrow guided by your help.
                                      Thanks in advance!

                                      Netgate 6100 MAX

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

                                        @mrsunfire Because you cannot have two processes trying to manage system and ups shutdown/restart.

                                        1 Reply Last reply Reply Quote 0
                                        • M
                                          mrsunfire
                                          last edited by

                                          I don't want to shutdown. I only want the widget. Is there a way to disable the shutdown completely?

                                          Netgate 6100 MAX

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

                                            @mrsunfire Okay. When you are ready...

                                            1. Remove the apcupsd package using the package manager (System / Package Manager / Installed Packages).
                                            2. Go to the UPS configuration page (Services / UPS / Settings) and change the nut configuration to be:
                                            • UPS Type - Local USB
                                            • UPS Name - ups
                                            • Driver - usbhid
                                            • All other settings blank (empty).
                                            1. Save the configuration.

                                            2. Wait two minutes. Don't skip this step.

                                            3. Check to confirm the service is not functioning by going to the UPS status page (Services / UPS / Status) and refreshing the browser. Assuming that the status page says that the ups requires attention...

                                            4. Log into the system and run the nut startup script by hand:

                                              /usr/local/etc/rc.d/nut.sh start
                                              
                                            5. Post the output produced by the script, and the output from the system log when you ran the script. You can get the system log output with the following command:

                                              clog /var/log/system.log | tail -25
                                              

                                            which will display the last 25 lines of the system log.

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