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

    NUT Package (2.8.1 and above)

    Scheduled Pinned Locked Moved UPS Tools
    296 Posts 41 Posters 161.5k 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.
    • G
      ghound @dennypage
      last edited by

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

      This looks correct (working). Manufacturer and Product are identifiable. If this subsequently fails, to confirm that the issue is the same as experienced on the other port, I would need to see what the driver says when it isn't working. Also interested to see the output of "usbconfig -v" when it isn't working.

      Below is result of usbconfig -v when the connection is not working (on USB3 port):

      [23.09.1-RELEASE][admin@router01.localr01]/dev/usb: usbconfig -v
      ugen0.1: <Generic XHCI root HUB> at usbus0, cfg=0 md=HOST spd=SUPER (5.0Gbps) pwr=SAVE (0mA)
      ugen0.1.0: uhub0: <Generic XHCI root HUB, class 9/0, rev 3.00/1.00, addr 1>
      
        bLength = 0x0012
        bDescriptorType = 0x0001
        bcdUSB = 0x0300
        bDeviceClass = 0x0009  <HUB>
        bDeviceSubClass = 0x0000
        bDeviceProtocol = 0x0003
        bMaxPacketSize0 = 0x0009
        idVendor = 0x0000
        idProduct = 0x0000
        bcdDevice = 0x0100
        iManufacturer = 0x0001  <Generic>
        iProduct = 0x0002  <XHCI root HUB>
        iSerialNumber = 0x0000  <no string>
        bNumConfigurations = 0x0001
      
      
       Configuration index 0
      
          bLength = 0x0009
          bDescriptorType = 0x0002
          wTotalLength = 0x001f
          bNumInterfaces = 0x0001
          bConfigurationValue = 0x0001
          iConfiguration = 0x0000  <no string>
          bmAttributes = 0x0040
          bMaxPower = 0x0000
      
          Interface 0
            bLength = 0x0009
            bDescriptorType = 0x0004
            bInterfaceNumber = 0x0000
            bAlternateSetting = 0x0000
            bNumEndpoints = 0x0001
            bInterfaceClass = 0x0009  <HUB>
            bInterfaceSubClass = 0x0000
            bInterfaceProtocol = 0x0000
            iInterface = 0x0000  <no string>
      
           Endpoint 0
              bLength = 0x0007
              bDescriptorType = 0x0005
              bEndpointAddress = 0x0081  <IN>
              bmAttributes = 0x0003  <INTERRUPT>
              wMaxPacketSize = 0x0002
              bInterval = 0x00ff
              bRefresh = 0x0000
              bSynchAddress = 0x0000
      
            Additional Descriptor
      
            bLength = 0x06
            bDescriptorType = 0x30
            bDescriptorSubType = 0x00
             RAW dump:
             0x00 | 0x06, 0x30, 0x00, 0x00, 0x00, 0x00
      
      
      
      
      ugen1.1: <Marvell EHCI root HUB> at usbus1, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=SAVE (0mA)
      ugen1.1.0: uhub1: <Marvell EHCI root HUB, class 9/0, rev 2.00/1.00, addr 1>
      
        bLength = 0x0012
        bDescriptorType = 0x0001
        bcdUSB = 0x0200
        bDeviceClass = 0x0009  <HUB>
        bDeviceSubClass = 0x0000
        bDeviceProtocol = 0x0001
        bMaxPacketSize0 = 0x0040
        idVendor = 0x0000
        idProduct = 0x0000
        bcdDevice = 0x0100
        iManufacturer = 0x0001  <Marvell>
        iProduct = 0x0002  <EHCI root HUB>
        iSerialNumber = 0x0000  <no string>
        bNumConfigurations = 0x0001
      
      
       Configuration index 0
      
          bLength = 0x0009
          bDescriptorType = 0x0002
          wTotalLength = 0x0019
          bNumInterfaces = 0x0001
          bConfigurationValue = 0x0001
          iConfiguration = 0x0000  <no string>
          bmAttributes = 0x0040
          bMaxPower = 0x0000
      
          Interface 0
            bLength = 0x0009
            bDescriptorType = 0x0004
            bInterfaceNumber = 0x0000
            bAlternateSetting = 0x0000
            bNumEndpoints = 0x0001
            bInterfaceClass = 0x0009  <HUB>
            bInterfaceSubClass = 0x0000
            bInterfaceProtocol = 0x0000
            iInterface = 0x0000  <no string>
      
           Endpoint 0
              bLength = 0x0007
              bDescriptorType = 0x0005
              bEndpointAddress = 0x0081  <IN>
              bmAttributes = 0x0003  <INTERRUPT>
              wMaxPacketSize = 0x0008
              bInterval = 0x00ff
              bRefresh = 0x0000
              bSynchAddress = 0x0000
      
      
      
      ugen0.2: <Tripp Lite ECO850LCD> at usbus0, cfg=0 md=HOST spd=FULL (12Mbps) pwr=ON (100mA)
      
        bLength = 0x0012
        bDescriptorType = 0x0001
        bcdUSB = 0x0200
        bDeviceClass = 0x0000  <Probed by interface class>
        bDeviceSubClass = 0x0000
        bDeviceProtocol = 0x0000
        bMaxPacketSize0 = 0x0040
        idVendor = 0x09ae
        idProduct = 0x3024
        bcdDevice = 0x0002
        iManufacturer = 0x0003  <retrieving string failed>
        iProduct = 0x0001  <retrieving string failed>
        iSerialNumber = 0x0005  <retrieving string failed>
        bNumConfigurations = 0x0001
      
      
       Configuration index 0
      
          bLength = 0x0009
          bDescriptorType = 0x0002
          wTotalLength = 0x0022
          bNumInterfaces = 0x0001
          bConfigurationValue = 0x0001
          iConfiguration = 0x0000  <no string>
          bmAttributes = 0x00a0
          bMaxPower = 0x0032
      
          Interface 0
            bLength = 0x0009
            bDescriptorType = 0x0004
            bInterfaceNumber = 0x0000
            bAlternateSetting = 0x0000
            bNumEndpoints = 0x0001
            bInterfaceClass = 0x0003  <HID device>
            bInterfaceSubClass = 0x0000
            bInterfaceProtocol = 0x0000
            iInterface = 0x0000  <no string>
      
            Additional Descriptor
      
            bLength = 0x09
            bDescriptorType = 0x21
            bDescriptorSubType = 0x11
             RAW dump:
             0x00 | 0x09, 0x21, 0x11, 0x01, 0x21, 0x01, 0x22, 0x75,
             0x08 | 0x03
      
           Endpoint 0
              bLength = 0x0007
              bDescriptorType = 0x0005
              bEndpointAddress = 0x0081  <IN>
              bmAttributes = 0x0003  <INTERRUPT>
              wMaxPacketSize = 0x0040
              bInterval = 0x00ff
              bRefresh = 0x0000
              bSynchAddress = 0x0000
      
      
      
      
      Broadcast Message from root@router01.localr01
              (no tty) at 16:01 EDT...
      
      UPS TrippLite is unavailable
      
      dennypageD 1 Reply Last reply Reply Quote 0
      • dennypageD
        dennypage @ghound
        last edited by

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

        iManufacturer = 0x0003 <retrieving string failed>
        iProduct = 0x0001 <retrieving string failed>
        iSerialNumber = 0x0005 <retrieving string failed>

        It was worth a shot.

        Can you confirm that this behavior started following an upgrade of pfSense?

        G 1 Reply Last reply Reply Quote 0
        • G
          ghound @dennypage
          last edited by

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

          Can you confirm that this behavior started following an upgrade of pfSense?

          Behavior has persisted through several updates. (In fact, UPS has never not had this issue from its first day out of the box.)

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

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

            Behavior has persisted through several updates. (In fact, UPS has never not had this issue from its first day out of the box.)

            Okay, I'm confused. Please detail what previous version/date that the problem did not occur, and what version/date began to occurr.

            G 1 Reply Last reply Reply Quote 0
            • G
              ghound @dennypage
              last edited by

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

              Okay, I'm confused. Please detail what previous version/date that the problem did not occur, and what version/date began to occurr.

              TrippLite UPS was purchased new in May '23 and connected to SG-1100 (23.05 / 2.8.0_2). You gave me a few tips to properly load usbhid-ups. Once usbhid-ups loaded correctly, after a few days, UPS lost connection (so the UPS has never operated without the lost connection problem every few days). At the time, I believed this was the "lost connection" problem mentioned in the thread. The problem has persisted from first connection to today. SG-1100 is currently 23.09.1 and Nut 2.8.2_1.

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

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

                TrippLite UPS was purchased new in May '23 and connected to SG-1100 (23.05 / 2.8.0_2). You gave me a few tips to properly load usbhid-ups. Once usbhid-ups loaded correctly, after a few days, UPS lost connection (so the UPS has never operated without the lost connection problem every few days). At the time, I believed this was the "lost connection" problem mentioned in the thread. The problem has persisted from first connection to today. SG-1100 is currently 23.09.1 and Nut 2.8.2_1.

                Ah, okay. It's never operated correctly. I had misunderstood that it was a regression.

                P 1 Reply Last reply Reply Quote 0
                • P
                  pvk1 @dennypage
                  last edited by

                  @dennypage Sorry if this is the wrong place. I migrated the configuration to a Netgate 4200. I have NUT package 2.8.2_1. It had permission errors. After including user=root in the ups.conf section (as suggested by you in the previous track) it started working. It also worked on the previous system.
                  Schermafbeelding 2024-03-30 091809.png

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

                    @pvk1 Ownership of the /var/db/nut directory is incorrect. The following command will fix that:

                    chown -R nut:nut /var/db/nut
                    

                    The errors for /usr/local/etc/nut are more of an issue. Those files should be accessed prior to switching to user "nut". What version of pfSense are you running? What does

                    pkg info | grep nut
                    

                    report? Thx.

                    P 1 Reply Last reply Reply Quote 0
                    • P
                      pvk1 @dennypage
                      last edited by

                      @dennypage
                      I am running: 23.09.1-RELEASE (amd64)

                      pkg info:

                      nut-devel-2024.01.03 Network UPS Tools
                      pfSense-pkg-nut-2.8.2_1 Network UPS Tools

                      thx

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

                        @pvk1 Can you post the output of the the following commands please?

                        ls -l /var/db/nut
                        ls -l /usr/local/etc/nut
                        

                        Thanks

                        P 1 Reply Last reply Reply Quote 0
                        • P
                          pvk1 @dennypage
                          last edited by

                          @dennypage Hi, thx

                          ls -l /var/db/nut
                          total 0
                          ls: /var/db/nut: Permission denied

                          ls -l /usr/local/etc/nut
                          total 143
                          -rw-r--r-- 1 root wheel 15136 Mar 4 22:00 cmdvartab
                          -rw-r--r-- 1 root wheel 98236 Mar 4 22:00 driver.list
                          -rw-r--r-- 1 root wheel 1071 Mar 4 22:00 hosts.conf
                          -rw-r--r-- 1 root wheel 1071 Mar 4 22:00 hosts.conf.sample
                          -rw-r--r-- 1 root wheel 4774 Mar 4 22:00 nut.conf
                          -rw-r--r-- 1 root wheel 4774 Mar 4 22:00 nut.conf.sample
                          -rw-r----- 1 root wheel 124 Apr 1 18:43 ups.conf
                          -rw-r--r-- 1 root wheel 9845 Mar 4 22:00 ups.conf.sample
                          -rw-r----- 1 root wheel 28 Apr 1 18:43 upsd.conf
                          -rw-r--r-- 1 root wheel 9199 Mar 4 22:00 upsd.conf.sample
                          -rw-r----- 1 root wheel 167 Apr 1 18:43 upsd.users
                          -rw-r--r-- 1 root wheel 2349 Mar 4 22:00 upsd.users.sample
                          -rw-r----- 1 root wheel 530 Apr 1 18:43 upsmon.conf
                          -rw-r--r-- 1 root wheel 24735 Mar 4 22:00 upsmon.conf.sample
                          -rw-r--r-- 1 root wheel 4217 Mar 4 22:00 upssched.conf
                          -rw-r--r-- 1 root wheel 4217 Mar 4 22:00 upssched.conf.sample
                          -rw-r--r-- 1 root wheel 1871 Mar 4 22:00 upsset.conf
                          -rw-r--r-- 1 root wheel 1871 Mar 4 22:00 upsset.conf.sample
                          -rw-r--r-- 1 root wheel 6861 Mar 4 22:00 upsstats-single.html
                          -rw-r--r-- 1 root wheel 6861 Mar 4 22:00 upsstats-single.html.sample
                          -rw-r--r-- 1 root wheel 4096 Mar 4 22:00 upsstats.html
                          -rw-r--r-- 1 root wheel 4096 Mar 4 22:00 upsstats.html.sample

                          GertjanG dennypageD 2 Replies Last reply Reply Quote 0
                          • GertjanG
                            Gertjan @pvk1
                            last edited by

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

                            ls: /var/db/nut: Permission denied

                            Strange.
                            You are root, right ?

                            [24.03-BETA][root@pfSense.bhf.tld]/root: whoami
                            root
                            

                            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 1
                            • dennypageD
                              dennypage @pvk1
                              last edited by

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

                              ls -l /var/db/nut
                              total 0
                              ls: /var/db/nut: Permission denied

                              As @Gertjan noted, you need to run the commands as root.

                              P 1 Reply Last reply Reply Quote 0
                              • P
                                pvk1 @dennypage
                                last edited by

                                @dennypage
                                Thx. I had disabled the admin user, so I could not login as root. The user that I login with is member of the system admins.

                                I now enabled admin again.
                                s: /var/db/nut:
                                -rw-r--r-- 1 root nut 6 Apr 2 13:19 upsd.pid
                                -rw-r--r-- 1 root nut 6 Apr 2 13:19 upsmon.pid
                                srw-rw---- 1 root nut 0 Apr 2 13:19 usbhid-ups-ups
                                -rw-r--r-- 1 root nut 6 Apr 2 13:19 usbhid-ups-ups.pid

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

                                  @pvk1 Running as non-root will require that ownership of /var/db/nut, and all files therein, to be user "nut".

                                  Note that all of the following needs to be done as root.

                                  Suggested path:

                                  • Remove user=root from the configuration. NB: If you have anything else in the Advanced section, please post that before continuing...
                                  • Shut down the UPS service via command "/usr/local/etc/rc.d/nut.sh stop".
                                  • Do "ps -axuw | grep ups" and see if any of the nut commands, such as upsmon, are still running. If they are you can stop them with "killall upsmon".
                                  • Change ownership of /var/db/nut via command "chown -R nut /var/db/nut".

                                  Following that, you should see permissions like so:

                                  [23.09.1-RELEASE][root@fw]/root: ls -ld /var/db
                                  drwxr-xr-x  22 root wheel 54 Apr  2 08:29 /var/db
                                  [23.09.1-RELEASE][root@fw.cococafe.com]/root: ls -la /var/db/nut
                                  total 10
                                  drwxr-x---   2 nut  nut    3 Apr  2 10:17 .
                                  drwxr-xr-x  22 root wheel 54 Apr  2 08:29 ..
                                  -rw-r--r--   1 nut  uucp   6 Apr  1 14:40 upsmon.pid
                                  [23.09.1-RELEASE][root@fw]/root:
                                  

                                  You can also check permissions for /usr/local/etc/nut like so:

                                  [23.09.1-RELEASE][root@fw]/root: ls -ld /usr/local/etc
                                  drwxr-xr-x  35 root wheel 91 Apr  2 08:45 /usr/local/etc
                                  [23.09.1-RELEASE][root@fw]/root: ls -ld /usr/local/etc/nut
                                  drwxr-xr-x  2 root wheel 24 Feb 10 12:16 /usr/local/etc/nut
                                  [23.09.1-RELEASE][root@fw]/root: ls -la /usr/local/etc/nut/*.conf
                                  -rw-r--r--  1 root wheel 1071 Feb  7 11:02 /usr/local/etc/nut/hosts.conf
                                  -rw-r--r--  1 root wheel 4774 Feb  7 11:02 /usr/local/etc/nut/nut.conf
                                  -rw-r-----  1 root wheel   43 Apr  1 14:29 /usr/local/etc/nut/ups.conf
                                  -rw-r-----  1 root wheel   28 Apr  1 14:29 /usr/local/etc/nut/upsd.conf
                                  -rw-r-----  1 root wheel  530 Apr  1 14:29 /usr/local/etc/nut/upsmon.conf
                                  -rw-r--r--  1 root wheel 4217 Feb  7 11:02 /usr/local/etc/nut/upssched.conf
                                  -rw-r--r--  1 root wheel 1871 Feb  7 11:02 /usr/local/etc/nut/upsset.conf
                                  [23.09.1-RELEASE][root@fw]/root:
                                  

                                  Lastly, start the UPS service via command "/usr/local/etc/rc.d/nut.sh start".

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

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

                                    Schermafbeelding 2024-03-30 091809.png

                                    It just occurred to me... was this attempt to start nut via /usr/local/etc/rc.d/nut.sh done as a non root user?

                                    If so, the output makes perfect sense.

                                    1 Reply Last reply Reply Quote 0
                                    • stephenw10S stephenw10 moved this topic from pfSense Packages on
                                    • GertjanG Gertjan referenced this topic on
                                    • dennypageD dennypage forked this topic on
                                    • dennypageD dennypage forked this topic on
                                    • dennypageD dennypage forked this topic on
                                    • S sandie referenced this topic on
                                    • S sandie referenced this topic on
                                    • dennypageD dennypage forked this topic on
                                    • J
                                      jonlecroy
                                      last edited by

                                      @dennypage I just upgraded to pfsense 24.03 with nut 2.8.2_2. Does this have the fix for this issue, or should I reapply the private? Thanks!

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

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

                                        Does this have the fix for this issue, or should I reapply the private?

                                        What issue are you referring to?

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

                                          @dennypage Ah sorry, this is a general thread isn't it. The UPS regular maintenance sending an 'administrative off' which triggers a pfsense immediate halt when it shouldn't.

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

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

                                            The UPS regular maintenance sending an 'administrative off' which triggers a pfsense immediate halt when it shouldn't.

                                            I believe this is addressed, yes.

                                            1 Reply Last reply Reply Quote 1
                                            • dennypageD dennypage referenced this topic on
                                            • First post
                                              Last post
                                            Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.