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

    NUT - UPS - upscmd upsrw - Unexpected response from upsd: ERR ACCESS-DENIED

    Scheduled Pinned Locked Moved pfSense Packages
    4 Posts 2 Posters 11.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.
    • S
      spazio
      last edited by

      Hi All!

      Last week I had a battery problem with my apc SMART-UPS 3000 RM! After replacing the battery I tried to recalibrate.  To do it I need these commands but they are not working: upscmd upsrw on my pfsese box. So recalibrate the battery or change any variables in the ups is impossible. But the communication with the UPS is working both ways.

      I've search on the forum and the only treads are :
      https://forum.pfsense.org/index.php?topic=80951.msg441735
      https://forum.pfsense.org/index.php?topic=51818.msg277158#msg277158
      But they got no answer.

      Here are the files:
      The package installed is  :  2.6.5_1 pkg 2.1.0

      ups.conf:
      [apc]
      driver=apcsmart
      port=/dev/cuau0
      cable=940-0024C

      upsmon.conf
      MONITOR apc@localhost 1 user password master
      MINSUPPLIES 1
      SHUTDOWNCMD "/sbin/shutdown -h +0"
      POWERDOWNFLAG /etc/killpower

      upsd.users
      [root]
      password = password
      actions = set
      actions = fsd
      actions = test.panel.start
      instcmds = ALL

      [monuser]
      password = password
      upsmon master

      I can list the variables in the ups: So the communication is working.

      upscmd -l apc@127.0.0.1
      Instant commands supported on UPS [apc]:

      calibrate.start - Start run time calibration
      calibrate.stop - Stop run time calibration
      load.off - Turn off the load immediately
      load.on - Turn on the load immediately
      shutdown.return - Turn off the load and return when power is back
      shutdown.stayoff - Turn off the load and remain off
      test.battery.start - Start a battery test
      test.battery.stop - Stop the battery test
      test.failure.start - Start a simulated power failure
      test.panel.start - Start testing the UPS panel

      upsrw apc@127.0.0.1         
      [battery.alarm.threshold]
      Battery alarm threshold
      Type: ENUM
      Option: "0" SELECTED
      Option: "T"
      Option: "L"
      Option: "N"

      [battery.charge.restart]
      Minimum battery level for restart after power off (percent)
      Type: ENUM
      Option: "00" SELECTED
      Option: "15"
      Option: "50"
      Option: "90"

      [battery.date]
      Battery change date
      Type: STRING
      Value: 02/21/02

      [battery.runtime.low]
      Remaining battery runtime when UPS switches to LB (seconds)
      Type: ENUM
      Option: "120" SELECTED
      Option: "300"
      Option: "420"
      Option: "600"

      [input.sensitivity]
      Input power sensitivity
      Type: ENUM
      Option: "H" SELECTED
      Option: "M"
      Option: "L"

      [input.transfer.high]
      High voltage transfer point (V)
      Type: ENUM
      Option: "132" SELECTED
      Option: "135"
      Option: "138"
      Option: "129"

      [input.transfer.low]
      Low voltage transfer point (V)
      Type: ENUM
      Option: "103" SELECTED
      Option: "100"
      Option: "097"
      Option: "106"

      [output.voltage.nominal]
      Nominal output voltage (V)
      Type: ENUM
      Option: "115" SELECTED

      [ups.delay.shutdown]
      Interval to wait after shutdown with delay command (seconds)
      Type: ENUM
      Option: "020"
      Option: "180" SELECTED
      Option: "300"
      Option: "600"

      [ups.delay.start]
      Interval to wait before (re)starting the load (seconds)
      Type: ENUM
      Option: "000" SELECTED
      Option: "060"
      Option: "180"
      Option: "300"

      [ups.id]
      UPS system identifier
      Type: STRING
      Value: UPS_IDEN

      [ups.test.interval]
      Interval between self tests (seconds)
      Type: ENUM
      Option: "1209600" SELECTED
      Option: "604800"
      Option: "0"

      But If I try to change any of them I get this:
      All variables get the same error.

      upsrw -s battery.date apc@127.0.0.1
      Username (root): root
      Password:
      Enter new value for battery.date: 06/06/06
      Unexpected response from upsd: ERR ACCESS-DENIED

      upscmd apc@127.0.0.1 test.panel.start
      Username (root): root
      Password:
      Unexpected response from upsd: ERR ACCESS-DENIED

      It's as if the users are not set! In pfsense > services>nut there is a section for users but when I make changes there, they don't change the file /usr/local/etc/nut/upsd.users…

      I tried to change the upsd.users in /usr/local/etc/nut/upsd.users  directly without any luck.

      Any help would be appreciated because now every time the UPS goes in test mode ALL connected servers SHUTDOWN... This ups is now pointless...

      Thanks
      SPazio

      1 Reply Last reply Reply Quote 0
      • D
        doktornotor Banned
        last edited by

        @spazio:

        I tried to change the upsd.users in /usr/local/etc/nut/upsd.users  directly without any luck.

        That's not where the configuration is.

        
        cat /usr/pbi/nut-*/etc/nut/upsd.users
        
        

        to get a valid username/password.

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

          Thanks doktornotor !

          That worked. The file location was the problem.

          Do you know why there is 2 nut files location?

          Spazio

          1 Reply Last reply Reply Quote 0
          • D
            doktornotor Banned
            last edited by

            Because PBI packages suck. Big time.  >:(

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