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

    NUT on 2.0 Beta1 = need to symlink

    2.0-RC Snapshot Feedback and Problems - RETIRED
    4
    15
    8.3k
    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.
    • M
      m4rcu5
      last edited by

      Thank you for the reply,
      I hope the maintainer will bring a fix for this.
      NUT is a pretty important package for me, and worked fine on the FreeBSD 7 snapshots.
      Unfortunately i cant find the old snapshots anymore.

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

        I'm currently trying to do a makeshift fix on my machine to get NUT up and running.

        So far i had to do:

        • Manually change 'port=auto' to 'port=/dev/ttyu0' in '/usr/local/etc/nut/ups.conf'

        • Symlink '/lib/libutil.so.8' to '/lib/libutil.so.7'

        • Symlink '/usr/lib/libssl.so.6 to '/usr/lib/libssl.so.5'

        • Symlink '/lib/libcrypto.so6' to '/lib/libcrypto.so.5'

        This works.

        I hope with these findings one of the developers can convert it into a patch so we can all use it :-)

        Kind regards, Marcus

        1 Reply Last reply Reply Quote 0
        • jimpJ
          jimp Rebel Alliance Developer Netgate
          last edited by

          No need to patch. As I said earlier, the best way is to recompile nut as a native version for FreeBSD 8 so it will work on pfSense 2.0.

          Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

          Need help fast? Netgate Global Support!

          Do not Chat/PM for help!

          1 Reply Last reply Reply Quote 0
          • jimpJ
            jimp Rebel Alliance Developer Netgate
            last edited by

            There should be a version of nut compiled for FreeBSD 8 now in the 2.0 packages.

            See here: https://rcs.pfsense.org/projects/pfsense-packages/repos/mainline/commits/c5b12187b845833cc77169963cecabc9b1980f1c

            Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

            Need help fast? Netgate Global Support!

            Do not Chat/PM for help!

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

              @jimp:

              There should be a version of nut compiled for FreeBSD 8 now in the 2.0 packages.

              See here: https://rcs.pfsense.org/projects/pfsense-packages/repos/mainline/commits/c5b12187b845833cc77169963cecabc9b1980f1c

              Thank you for letting me know!

              It works without symlinking now :-) But i still need to set the port to /dev/ttyu0 because auto is not valid device.

              
              # ./nut.sh start
              starting apcsmart
              Network UPS Tools - UPS driver controller 2.4.1
              Network UPS Tools - APC Smart protocol driver 2.00 (2.4.1)
              APC command table version 2.0
              
              Unable to open auto: No such file or directory
              
              Things to try:
              
               - Check 'port=' in ups.conf
              
               - Check owner/permissions of all parts of path
              
              Fatal error: unusable configuration
              Driver failed to start (exit status=1)
              apcsmart failed to start
              
              

              I also get some errors about deprecated configs:

              
              # ./nut.sh start
              starting apcsmart
              Network UPS Tools - UPS driver controller 2.4.1
              Network UPS Tools - APC Smart protocol driver 2.00 (2.4.1)
              APC command table version 2.0
              Detected Smart-UPS 2200 RM XL [JS0603020872] on /dev/ttyu0
              starting upsd
              Network UPS Tools upsd 2.4.1
              ACL in upsd.conf is no longer supported - switch to LISTEN
              ACL in upsd.conf is no longer supported - switch to LISTEN
              ACL in upsd.conf is no longer supported - switch to LISTEN
              ACCEPT in upsd.conf is no longer supported - switch to LISTEN
              ACCEPT in upsd.conf is no longer supported - switch to LISTEN
              REJECT in upsd.conf is no longer supported - switch to LISTEN
              listening on 127.0.0.1 port 3493
              listening on ::1 port 3493
              Connected to UPS [APC_SmartUPS_2200]: apcsmart-APC_SmartUPS_2200
              allowfrom in upsd.users is no longer used
              allowfrom in upsd.users is no longer used
              starting upsmon
              Network UPS Tools upsmon 2.4.1
              UPS: APC_SmartUPS_2200@localhost (master) (power value 1)
              Using power down flag file /etc/killpower
              
              

              Greets, Marcus

              1 Reply Last reply Reply Quote 0
              • jimpJ
                jimp Rebel Alliance Developer Netgate
                last edited by

                Looks like it may need some attention from someone with more knowledge about NUT's config file format then, it must have had some substantial changes from 2.2.x to 2.4.x.

                I could probably figure it out, but I don't have a (working) UPS around that is capable of talking to a PC for testing.

                Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

                Need help fast? Netgate Global Support!

                Do not Chat/PM for help!

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

                  I opened a ticket, but doubt it will get fixed unless someone can provide a patch. It's probably not all that difficult to fix for someone with the equipment to mess around with it. (I'm in the same situation as jim-p, nothing to use it with)
                  http://redmine.pfsense.org/issues/show/310

                  I'll be glad to commit a fix if someone can offer one.

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

                    I have an UPS on with i can test, but unfortunately im not really sure how the whole pfsense interfaces are stuck together, i seem to find some files in /etc. Maybe i have to look into the docs.
                    For those who do not have an ups, NUT has an Dummy-UPS, you can find more information here: http://new.networkupstools.org/man/dummy-ups.html

                    If there is something i can do to help, let me know

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

                      check out the .inc file(s) in /usr/local/pkg, you may be able to figure out something from that.

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

                        Ok, a few things i can figure out:

                        FREEBSD 8 does not call the ports SIO like they look for here:

                        $handle = popen('dmesg | grep \'^sio[0-9]: type\'','r');
                        

                        But they are called UART

                        
                        uart0: <16550 or compatible> port 0x3f8-0x3ff irq 4 flags 0x10 on acpi0
                        uart0: [FILTER]
                        
                        

                        Also they are not /dev/ttyd like here:

                        $values[] = '/dev/ttyd'.$line{3};
                        

                        But they are /dev/ttyu

                        43 crw-------   1 root   wheel       0,  43 Jan 18 20:10 ttyu0
                        

                        They chnaged the config file a lot from 2.2.x to 2.4.x, but did not update the docs.
                        I have found some usefull info on: http://blog.shadypixel.com/monitoring-a-ups-with-nut-on-debian-or-ubuntu-linux/

                        Andy says:
                        July 30, 2009 at 3:03 AM

                        Got it working again:

                        Replace

                        /etc/nut/upsd.conf

                        ACL all 0.0.0.0/0
                        ACL localhost 127.0.0.1/32
                        ACCEPT localhost
                        REJECT all

                        with

                        /etc/nut/upsd.conf

                        LISTEN 127.0.0.1
                        LISTEN 10.10.10.1 (use the IP address of any remote slave devices)

                        /etc/nut/upsd.users

                        [local_mon]
                        password = PASSWORD_HERE

                        allowfrom = localhost

                        upsmon master

                        Comment out allowfrom

                        That should do the trick

                        Although i cannot make the changes myself, i hope to be some kind of a help ;-)

                        Greets

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

                          Dear Development team,

                          I would like to ask if there is any progress on the NUT package. I really really like the package :-).
                          I still try it once a week to see if it has changed and maybe working. But up to now i have no luck.

                          I you need help testing i would be glad to help.

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