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

    UPS shutdown

    Scheduled Pinned Locked Moved pfSense Packages
    67 Posts 12 Posters 33.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.
    • R
      rsw686
      last edited by

      I might be able to get access to a USB UPS to test here this week. In the meantime I added some checks and echo statements to the rc file.

      If you could reinstall the package, verify the settings and click change on the nut settings page. Then execute this script on the console and copy/paste the results here. This will identify exactly where the problem occurs and I can check the permissions since USB permissions are different the serial port permissions.

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

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

        $ /usr/local/etc/rc.d/nut.sh start
        stopping upsmon
        stopping upsd
        stopping newhidups
        Network UPS Tools - UPS driver controller 2.0.5
        forcing newhidups termination
        starting newhidups
        Network UPS Tools: 0.28 USB communication driver 0.28 - core 0.30 (2.0.5)

        Network UPS Tools - UPS driver controller 2.0.5
        starting upsd
        starting upsmon

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

          Here's my log info also…..........
          Feb 19 15:21:51 last message repeated 25 times
          Feb 19 15:21:21 last message repeated 24 times
          Feb 19 15:19:46 last message repeated 7 times
          Feb 19 15:19:21 last message repeated 7 times
          Feb 19 15:19:11 upsmon[6811]: Poll UPS [APC1500@localhost] failed - Driver not connected
          Feb 19 15:19:09 upsd[6808]: Client on 127.0.0.1 logged out
          Feb 19 15:19:09 upsd[6808]: Connection from 127.0.0.1
          Feb 19 15:19:06 last message repeated 4 times
          Feb 19 15:18:46 upsmon[6811]: Poll UPS [APC1500@localhost] failed - Driver not connected
          Feb 19 15:18:46 upsmon[6811]: Poll UPS [APC1500@localhost] failed - Driver not connected
          Feb 19 15:18:41 upsmon[6811]: UPS APC1500@localhost is unavailable
          Feb 19 15:18:41 upsmon[6811]: UPS APC1500@localhost is unavailable
          Feb 19 15:18:41 upsmon[6811]: Poll UPS [APC1500@localhost] failed - Driver not connected
          Feb 19 15:18:41 upsmon[6811]: Poll UPS [APC1500@localhost] failed - Driver not connected
          Feb 19 15:18:36 upsmon[6811]: Communications with UPS APC1500@localhost lost
          Feb 19 15:18:36 upsmon[6811]: Communications with UPS APC1500@localhost lost
          Feb 19 15:18:36 upsmon[6811]: Poll UPS [APC1500@localhost] failed - Driver not connected
          Feb 19 15:18:36 upsmon[6811]: Poll UPS [APC1500@localhost] failed - Driver not connected
          Feb 19 15:18:36 upsd[6808]: Client monuser@127.0.0.1 logged into UPS [APC1500]
          Feb 19 15:18:36 upsd[6808]: Connection from 127.0.0.1
          Feb 19 15:18:36 upsd[6808]: Startup successful
          Feb 19 15:18:36 upsmon[6810]: Startup successful
          Feb 19 15:18:36 upsd[6807]: Can't connect to UPS [APC1500] (APC1500): Permission denied
          Feb 19 15:18:36 upsd[6807]: Can't connect to UPS [APC1500] (APC1500): Permission denied
          Feb 19 15:18:33 last message repeated 2 times
          Feb 19 15:18:36 newhidups[6806]: Startup successful
          Feb 19 15:18:35 newhidups[6569]: Signal 15: exiting
          Feb 19 15:18:34 upsd[6571]: Signal 15: exiting
          Feb 19 15:18:34 upsd[6571]: Client monuser@127.0.0.1 logged out
          Feb 19 15:18:34 upsmon[6575]: Signal 15: exiting
          Feb 19 15:18:33 last message repeated 2 times
          Feb 19 15:18:23 last message repeated 6 times
          Feb 19 15:18:23 last message repeated 6 times
          Feb 19 15:17:53 upsmon[6575]: Poll UPS [APC1500@localhost] failed - Driver not connected
          Feb 19 15:17:53 upsmon[6575]: Poll UPS [APC1500@localhost] failed - Driver not connected
          Feb 19 15:17:48 upsmon[6575]: UPS APC1500@localhost is unavailable
          Feb 19 15:17:48 upsmon[6575]: UPS APC1500@localhost is unavailable
          Feb 19 15:17:48 upsmon[6575]: Poll UPS [APC1500@localhost] failed - Driver not connected
          Feb 19 15:17:48 upsmon[6575]: Poll UPS [APC1500@localhost] failed - Driver not connected
          Feb 19 15:17:43 upsd[6571]: Client on 127.0.0.1 logged out
          Feb 19 15:17:43 upsd[6571]: Connection from 127.0.0.1

          1 Reply Last reply Reply Quote 0
          • R
            rsw686
            last edited by

            Very helpful. I think I've gotten it fixed, wait a few minutes for the commit to go through and reinstall the package. Verify the settings and click change. It should start successfully and show the status page. You might have to refresh the status page if it is showing wait.

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

              At least it showed waiting…..when I refreshed the status page it showed nothing again. Now the logs read this.........
              Feb 19 15:56:46 upsmon[12121]: Poll UPS [APC1500@localhost] failed - Data stale
              Feb 19 15:56:42 upsd[12117]: Client on 127.0.0.1 logged out
              Feb 19 15:56:42 upsd[12117]: Connection from 127.0.0.1
              Feb 19 15:56:41 last message repeated 3 times
              Feb 19 15:56:26 upsmon[12121]: Poll UPS [APC1500@localhost] failed - Data stale
              Feb 19 15:56:26 upsmon[12121]: Poll UPS [APC1500@localhost] failed - Data stale
              Feb 19 15:56:21 upsmon[12121]: Communications with UPS APC1500@localhost lost
              Feb 19 15:56:21 upsmon[12121]: Communications with UPS APC1500@localhost lost
              Feb 19 15:56:21 upsmon[12121]: Poll UPS [APC1500@localhost] failed - Data stale
              Feb 19 15:56:21 upsmon[12121]: Poll UPS [APC1500@localhost] failed - Data stale
              Feb 19 15:56:18 upsd[12117]: Data for UPS [APC1500] is stale - check driver
              Feb 19 15:56:18 upsd[12117]: Data for UPS [APC1500] is stale - check driver
              Feb 19 15:56:01 upsd[12117]: Client on 127.0.0.1 logged out
              Feb 19 15:56:01 upsd[12117]: Connection from 127.0.0.1
              Feb 19 15:56:01 upsd[12117]: Client monuser@127.0.0.1 logged into UPS [APC1500]
              Feb 19 15:56:01 upsd[12117]: Connection from 127.0.0.1
              Feb 19 15:56:01 upsmon[12119]: Startup successful
              Feb 19 15:56:01 upsd[12117]: Startup successful
              Feb 19 15:56:01 upsd[12116]: Connected to UPS [APC1500]: APC1500
              Feb 19 15:56:01 newhidups[12115]: Startup successful
              Feb 19 15:56:00 php: nut: Starting service

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

                Now I went back in and everything is ok….......

                Thanks again for your help..

                1 Reply Last reply Reply Quote 0
                • R
                  rsw686
                  last edited by

                  @ColdFusion:

                  Now I went back in and everything is ok….......

                  Thanks again for your help..

                  Sounds good. Glad it is working. I'll have to look into it more, but reading the newhidups help it looks like there is a way to delay the startup, which might bypass those errors. I'll have to check this out when I get my hands on a USB UPS. If you want to try and debug it yourself you can run the following.

                  /usr/local/etc/rc.d/nut.sh stop
                  /usr/local/libexec/nut/newhidups -u root -DD -a nameofups

                  This will show you debug information from the newhidups driver.

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

                    It seems to be working, but I don't have the output voltage and temperature lines…...is that because of simple signaling and that info is not supplied by the UPS??

                    1 Reply Last reply Reply Quote 0
                    • R
                      rsw686
                      last edited by

                      @ColdFusion:

                      It seems to be working, but I don't have the output voltage and temperature lines…...is that because of simple signaling and that info is not supplied by the UPS??

                      If it was simple signaling then it would only display the status. Those values are not being outputted by the ups, or the newhidups driver doesn't have support for them. You can run upsc nameofups@localhost and it will show you all the data outputted by the ups.

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

                        Yes, the UPS does not seem to output the values temp and output voltage…....thanks for your help.

                        1 Reply Last reply Reply Quote 0
                        • P
                          patord
                          last edited by

                          @rsw686:

                          @patord:

                          @rsw686:

                          Hmm I just hooked up a ups to my ip330 on com2, and I couldn't get it to work. I have an embedded install on there so that might be part of the issue. When I try and start the driver control I get the error

                          Can't uu_lock ttyd1: creat error: No such file or directory

                          I installed the NUT package on a fresh hard drive based SNAPSHOT-02-14-2007 and get a similar error (for ttyd0) on a box that worked fine under win32 (com1) for an APC BackUPS Pro with the 95B cable in full signal mode.  I tried all the various permutations from the webgui with no go. Went to the shell and hand ran the various nut binaries to see what I could figure out.  At first I thought it had to do with settings in /etc/ttys for the various ttydX, especially ttyd0 due to the console definitions.  But after eliminating that and a few other things, I'm still at a loss.

                          I'll try hand editing the ups.conf and try setting it to simple signaling like you did to see what happens.

                          Does the /var/spool/lock directory exist? If you create that directory and run chown uucp:dialer /var/spool/lock does it work? If so I will put a check to make sure that directory exists and if not create it. All the full installs I've seen have already had it, but something might have changed.

                          From your post you have the console running on ttyd0. The only thing I can think of is that there is some conflict when the console is being directed to a serial port and using other serial ports.

                          Sorry for the late reply.  I saw you committed some changes to the package to address this and a few other items.  On fresh installs from the snapshots back then, the /var/spool/lock was created and did exist at the time with the proper permissions.  So the safety checks you put in would be just that.

                          The ttyd0 was something else I was looking into, more of the serial port on the box I was testing not properly mapping.

                          I'm getting ready to roll out a new test box on to this UPS (APC Pro) using snapshot-03-08-2007 and I'll see what happens with the latest nut package.

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