networkupstools / nut

The Network UPS Tools repository. UPS management protocol Informational RFC 9271 published by IETF at https://www.rfc-editor.org/info/rfc9271 Please star NUT on GitHub, this helps with sponsorships!
https://networkupstools.org/
Other
2.13k stars 355 forks source link

Data stale Powerwalker Powerwalker VI 2200 SHL on Proxmox #1853

Closed MarvinMynx closed 1 year ago

MarvinMynx commented 1 year ago

PowerWalker VI 2200 SHL OS: Proxmox - Debian GNU/Linux 11 (bullseye)

upsd -v

Network UPS Tools upsd 2.7.4

uname -a

Linux pve 5.15.83-1-pve #1 SMP PVE 5.15.83-1 (2022-12-15T00:00Z) x86_64 GNU/Linux

I have a problem with my UPS. After some time, it sort of Disconnects and as a result the Driver times out or something. I don't quite understand the Problem. It's my first time debugging/configuring a USB Device / UPS. I have many Config Files and Log Messages that hopefully describe the Problem better than I can. And I have made some Screenshots from the Last time this happened Today. (This happens Multiple Times a Day)

First Image: DATA STALE image_2023-02-21_13-12-45 image_2023-02-21_13-14-02

Second Image: Reconnect to Temporarily get Rid of the Error image_2023-02-21_13-14-45

lsusb | grep -i ups

Bus 001 Device 006: ID 06da:ffff Phoenixtec Power Co., Ltd Offline UPS

upsc powerwalker

Init SSL without certificate database
battery. Charge: 100
battery.runtime: 3290
battery.type: PbAc
device.mfr: PPC
device.model: Offline UPS HID UPS
device.serial: 000000000
device.type: ups
driver.name: usbhid-ups
driver.parameter.pollfreq: 30
driver.parameter.pollinterval: 1
driver.parameter.port: auto
driver.parameter.productid: FFFF
driver.parameter.synchronous: no
driver.parameter.vendorid: 06DA
driver.version: 2.7.4
driver.version.data: MGE HID 1.40
driver.version.internal: 0.41
input.voltage: 235.0
outlet.1.status: on
output.frequency: 49.6
output.frequency.nominal: 50
output.voltage: 235.0
output.voltage.nominal: 230
ups.beeper.status: enabled
ups.delay.shutdown: 20
ups.delay.start: 30
ups.load: 1
ups.mfr: PPC
ups.model: Offline UPS HID UPS
ups.power.nominal: 9
ups.productid: ffff
ups.serial: 000000000
ups.status: OL
ups.test.result: No test initiated
ups.timer.shutdown: 0
ups.timer.start: 0
ups.type: offline / line interactive
ups.vendorid: 06da

upscmd -l powerwalker

Instant commands supported on UPS [powerwalker]:

beeper.disable - Disable the UPS beeper
beeper.enable - Enable the UPS beeper
beeper.mute - Temporarily mute the UPS beeper
beeper.off - Obsolete (use beeper.disable or beeper.mute)
beeper.on - Obsolete (use beeper.enable)
load.off - Turn off the load immediately
load.off.delay - Turn off the load with a delay (seconds)
load.on - Turn on the load immediately
load.on.delay - Turn on the load with a delay (seconds)
shutdown.return - Turn off the load and return when power is back
shutdown.stayoff - Turn off the load and remain off
shutdown.stop - Stop a shutdown in progress
test.battery.start.deep - Start a deep battery test
test.battery.start.quick - Start a quick battery test
test.battery.stop - Stop the battery test

upsrw powerwalker

[output.voltage.nominal]
Nominal output voltage (V)
Type: ENUM
Option: "200"
Option: "208"
Option: "220"
Option: "230" SELECTED
Option: "240"

[ups.delay.shutdown]
Interval to wait after shutdown with delay command (seconds)
Type: STRING
Maximum length: 10
Value: 20

[ups.delay.start]
Interval to wait before (re)starting the load (seconds)
Type: STRING
Maximum length: 10
Value: 30

usbhid-dump -a 001:006

001:006:000:Failed to claim: Resource busy
001:006:000:Failed to release: Entity not found

/lib/nut/usbhid-ups -DD -a powerwalker

 15.797844     Checking device (1D6B/0002) (003/001)
  15.798149     - VendorID: 1d6b
  15.798156     - ProductID: 0002
  15.798159     - Manufacturer: unknown
  15.798162     - Product: unknown
  15.798164     - Serial Number: unknown
  15.798167     - Bus: 003
  15.798170     - Device release number: 0515
  15.798173     Trying to match device
  15.798178     Device does not match - skipping
  15.798188     Checking device (0BC2/AB34) (002/002)
  15.798212     - VendorID: 0bc2
  15.798218     - ProductID: ab34
  15.798224     - Manufacturer: unknown
  15.798230     - Product: unknown
  15.798235     - Serial Number: unknown
  15.798241     - Bus: 002
  15.798247     - Device release number: 0100
  15.798252     Trying to match device
  15.798259     Device does not match - skipping
  15.798268     Checking device (1D6B/0003) (002/001)
  15.798287     - VendorID: 1d6b
  15.798292     - ProductID: 0003
  15.798298     - Manufacturer: unknown
  15.798304     - Product: unknown
  15.798311     - Serial Number: unknown
  15.798316     - Bus: 002
  15.798322     - Device release number: 0515
  15.798328     Trying to match device
  15.798335     Device does not match - skipping
  15.798344     Checking device (06DA/FFFF) (001/006)
  15.803080     - VendorID: 06da
  15.803087     - ProductID: ffff
  15.803093     - Manufacturer: PPC
  15.803098     - Product: Offline UPS
  15.803104     - Serial Number: 000000000
  15.803110     - Bus: 001
  15.803115     - Device release number: 0003
  15.803121     Trying to match device
  15.803132     Device matches
  15.803141     failed to claim USB device: could not claim interface 0: Device or resource busy
  15.803172     detached kernel driver from USB device...
  15.803625     Path: UPS.PowerSummary.RemainingCapacity, Type: Feature, ReportID: 0x06, Offset: 0, Size: 8, Value: 100
  15.803659     Path: UPS.PowerSummary.RunTimeToEmpty, Type: Feature, ReportID: 0x06, Offset: 8, Size: 16, Value: 3290
  15.804142     Path: UPS.PowerSummary.iDeviceChemistry, Type: Feature, ReportID: 0x10, Offset: 0, Size: 8, Value: 5
  15.805872     Path: UPS.PowerSummary.Voltage, Type: Feature, ReportID: 0x07, Offset: 8, Size: 16, Value: 27.2
  15.805950     Path: UPS.PowerSummary.PercentLoad, Type: Feature, ReportID: 0x07, Offset: 0, Size: 8, Value: 1
  15.806477     Path: UPS.PowerSummary.DelayBeforeStartup, Type: Feature, ReportID: 0x0a, Offset: 0, Size: 32, Value: 0
  15.806998     Path: UPS.PowerSummary.DelayBeforeShutdown, Type: Feature, ReportID: 0x09, Offset: 0, Size: 32, Value: 0
  15.807010     Path: UPS.PowerSummary.DelayBeforeStartup, Type: Feature, ReportID: 0x0a, Offset: 0, Size: 32, Value: 0
  15.807018     Path: UPS.PowerSummary.DelayBeforeShutdown, Type: Feature, ReportID: 0x09, Offset: 0, Size: 32, Value: 0
  15.807659     Path: UPS.BatterySystem.Battery.Test, Type: Feature, ReportID: 0x24, Offset: 0, Size: 8, Value: 6
  15.808127     Path: UPS.PowerSummary.AudibleAlarmControl, Type: Feature, ReportID: 0x13, Offset: 0, Size: 8, Value: 2
  15.808658     Path: UPS.Flow.[4].ConfigApparentPower, Type: Feature, ReportID: 0x74, Offset: 0, Size: 16, Value: 9
  15.809243     Path: UPS.PowerConverter.ConverterType, Type: Feature, ReportID: 0x4a, Offset: 0, Size: 8, Value: 1
  15.809916     Path: UPS.PowerSummary.PresentStatus.ACPresent, Type: Feature, ReportID: 0x01, Offset: 0, Size: 8, Value: 1
  15.809946     Path: UPS.PowerSummary.PresentStatus.Discharging, Type: Feature, ReportID: 0x01, Offset: 24, Size: 8, Value: 0
  15.809951     Path: UPS.PowerSummary.PresentStatus.Charging, Type: Feature, ReportID: 0x01, Offset: 16, Size: 8, Value: 1
  15.809960     Path: UPS.PowerSummary.PresentStatus.BelowRemainingCapacityLimit, Type: Feature, ReportID: 0x01, Offset: 8, Size: 8, Value: 0
  15.809986     Path: UPS.PowerSummary.PresentStatus.Overload, Type: Feature, ReportID: 0x01, Offset: 48, Size: 8, Value: 0
  15.810665     Path: UPS.PowerConverter.Input.[1].PresentStatus.Buck, Type: Feature, ReportID: 0x2d, Offset: 8, Size: 8, Value: 0
  15.810673     Path: UPS.PowerConverter.Input.[1].PresentStatus.Boost, Type: Feature, ReportID: 0x2d, Offset: 0, Size: 8, Value: 0
  15.810699     Path: UPS.PowerSummary.PresentStatus.Good, Type: Feature, ReportID: 0x01, Offset: 32, Size: 8, Value: 1
  15.810774     Path: UPS.PowerSummary.PresentStatus.InternalFailure, Type: Feature, ReportID: 0x01, Offset: 40, Size: 8, Value: 0
  15.811346     Path: UPS.PowerConverter.Input.[1].Voltage, Type: Feature, ReportID: 0x31, Offset: 0, Size: 16, Value: 236
  15.812157     Path: UPS.PowerConverter.Output.Voltage, Type: Feature, ReportID: 0x42, Offset: 16, Size: 16, Value: 236
  15.812608     Path: UPS.Flow.[4].ConfigVoltage, Type: Feature, ReportID: 0x72, Offset: 0, Size: 8, Value: 230
  15.812649     Path: UPS.PowerConverter.Output.Frequency, Type: Feature, ReportID: 0x42, Offset: 0, Size: 16, Value: 49.6
  15.813108     Path: UPS.Flow.[4].ConfigFrequency, Type: Feature, ReportID: 0x36, Offset: 0, Size: 8, Value: 50
  15.813211     Path: UPS.PowerSummary.PresentStatus.ACPresent, Type: Feature, ReportID: 0x01, Offset: 0, Size: 8, Value: 1
  15.813462     Path: UPS.BatterySystem.Battery.Test, Type: Feature, ReportID: 0x24, Offset: 0, Size: 8, Value: 6
  15.813471     Path: UPS.BatterySystem.Battery.Test, Type: Feature, ReportID: 0x24, Offset: 0, Size: 8, Value: 6
  15.813479     Path: UPS.BatterySystem.Battery.Test, Type: Feature, ReportID: 0x24, Offset: 0, Size: 8, Value: 6
  15.813485     Path: UPS.PowerSummary.DelayBeforeShutdown, Type: Feature, ReportID: 0x09, Offset: 0, Size: 32, Value: 0
  15.813489     Path: UPS.PowerSummary.DelayBeforeStartup, Type: Feature, ReportID: 0x0a, Offset: 0, Size: 32, Value: 0
  15.813493     Path: UPS.PowerSummary.DelayBeforeShutdown, Type: Feature, ReportID: 0x09, Offset: 0, Size: 32, Value: 0
  15.813502     Path: UPS.PowerSummary.AudibleAlarmControl, Type: Feature, ReportID: 0x13, Offset: 0, Size: 8, Value: 2
  15.813505     Path: UPS.PowerSummary.AudibleAlarmControl, Type: Feature, ReportID: 0x13, Offset: 0, Size: 8, Value: 2
  15.813509     Path: UPS.PowerSummary.AudibleAlarmControl, Type: Feature, ReportID: 0x13, Offset: 0, Size: 8, Value: 2
  15.813513     Path: UPS.PowerSummary.AudibleAlarmControl, Type: Feature, ReportID: 0x13, Offset: 0, Size: 8, Value: 2
  15.813517     Path: UPS.PowerSummary.AudibleAlarmControl, Type: Feature, ReportID: 0x13, Offset: 0, Size: 8, Value: 2
  16.064353     libusb_get_interrupt: Connection timed out
  16.064367     Got 0 HID objects...
  16.064374     Quick update...
  16.064893     Path: UPS.PowerSummary.DelayBeforeStartup, Type: Feature, ReportID: 0x0a, Offset: 0, Size: 32, Value: 0
  16.065300     Path: UPS.PowerSummary.DelayBeforeShutdown, Type: Feature, ReportID: 0x09, Offset: 0, Size: 32, Value: 0
  16.065896     Path: UPS.PowerSummary.PresentStatus.ACPresent, Type: Feature, ReportID: 0x01, Offset: 0, Size: 8, Value: 1
  16.065908     Path: UPS.PowerSummary.PresentStatus.Discharging, Type: Feature, ReportID: 0x01, Offset: 24, Size: 8, Value: 0
  16.065918     Path: UPS.PowerSummary.PresentStatus.Charging, Type: Feature, ReportID: 0x01, Offset: 16, Size: 8, Value: 1
  16.065927     Path: UPS.PowerSummary.PresentStatus.BelowRemainingCapacityLimit, Type: Feature, ReportID: 0x01, Offset: 8, Size: 8, Value: 0
  16.679086     upsdrv_updateinfo...
  16.930313     libusb_get_interrupt: Connection timed out
  16.930327     Got 0 HID objects...
  16.930331     Quick update...
  16.930338     Path: UPS.PowerSummary.DelayBeforeStartup, Type: Feature, ReportID: 0x0a, Offset: 0, Size: 32, Value: 0
  16.930343     Path: UPS.PowerSummary.DelayBeforeShutdown, Type: Feature, ReportID: 0x09, Offset: 0, Size: 32, Value: 0
  16.930348     Path: UPS.PowerSummary.PresentStatus.ACPresent, Type: Feature, ReportID: 0x01, Offset: 0, Size: 8, Value: 1
  16.930353     Path: UPS.PowerSummary.PresentStatus.Discharging, Type: Feature, ReportID: 0x01, Offset: 24, Size: 8, Value: 0
  16.930362     Path: UPS.PowerSummary.PresentStatus.Charging, Type: Feature, ReportID: 0x01, Offset: 16, Size: 8, Value: 1
  16.930369     Path: UPS.PowerSummary.PresentStatus.BelowRemainingCapacityLimit, Type: Feature, ReportID: 0x01, Offset: 8, Size: 8, Value: 0
  17.679955     upsdrv_updateinfo...
  17.680597     libusb_get_interrupt: error submitting URB: Device or resource busy
  17.680606     Got disconnected by another driver: Device or resource busy
  18.681073     upsdrv_updateinfo...
  18.681087     Got to reconnect!

cat /etc/nut/hosts.conf

MONITOR powerwalker@localhost "Powerwalker VI 2200 SHL UPS"

cat /etc/nut/nut.conf

MODE=netserver

cat /etc/nut/ups.conf

pollinterval = 1
maxretry = 3

[powerwalker]
    driver = usbhid-ups
    port = auto
    desc = "Powerwalker VI 2200 SHL UPS"
    vendorid = 06DA
    productid = FFFF

cat /etc/nut/upsd.conf

LISTEN 0.0.0.0 3493

cat /etc/nut/upsd.users

[monuser]
  password = <Password reducted>
  admin master

cat /etc/nut/upsmon.conf

MINSUPPLIES 1
SHUTDOWNCMD "/sbin/shutdown -h +0"
NOTIFYCMD /usr/sbin/upssched
POLLFREQ 5
POLLFREQALERT 5
HOSTSYNC 15
DEADTIME 15
POWERDOWNFLAG /etc/killpower
NOTIFYMSG ONLINE        "UPS %s on line power"
NOTIFYMSG ONBATT        "UPS %s on battery"
NOTIFYMSG LOWBATT       "UPS %s battery is low"
NOTIFYMSG FSD           "UPS %s: forced shutdown in progress"
NOTIFYMSG COMMOK        "Communications with UPS %s established"
NOTIFYMSG COMMBAD       "Communications with UPS %s lost"
NOTIFYMSG SHUTDOWN      "Auto logout and shutdown proceeding"
NOTIFYMSG REPLBATT      "UPS %s battery needs to be replaced"
NOTIFYMSG NOCOMM        "UPS %s is unavailable"
NOTIFYMSG NOPARENT      "upsmon parent process died - shutdown impossible"
NOTIFYFLAG ONLINE   SYSLOG+WALL+EXEC
NOTIFYFLAG ONBATT   SYSLOG+WALL+EXEC
NOTIFYFLAG LOWBATT  SYSLOG+WALL
NOTIFYFLAG FSD      SYSLOG+WALL+EXEC
NOTIFYFLAG COMMOK   SYSLOG+WALL+EXEC
NOTIFYFLAG COMMBAD  SYSLOG+WALL+EXEC
NOTIFYFLAG SHUTDOWN SYSLOG+WALL+EXEC
NOTIFYFLAG REPLBATT SYSLOG+WALL
NOTIFYFLAG NOCOMM   SYSLOG+WALL+EXEC
NOTIFYFLAG NOPARENT SYSLOG+WALL
RBWARNTIME 43200
NOCOMMWARNTIME 300
FINALDELAY 5
RUN_AS_USER root
MONITOR powerwalker@localhost 1 admin <Password reducted> master

cat /etc/nut/upssched.conf

CMDSCRIPT /etc/nut/upssched-cmd
PIPEFN /etc/nut/upssched.pipe
LOCKFN /etc/nut/upssched.lock
AT ONBATT * START-TIMER onbatt 30
AT ONLINE * CANCEL-TIMER onbatt online
AT ONBATT * START-TIMER earlyshutdown 30
AT LOWBATT * EXECUTE onbatt
AT COMMBAD * START-TIMER commbad 30
AT COMMOK * CANCEL-TIMER commbad commok
AT NOCOMM * EXECUTE commbad
AT SHUTDOWN * EXECUTE powerdown
AT SHUTDOWN * EXECUTE powerdown

cat /etc/nut/upssched-cmd

#!/bin/sh
 case $1 in
       onbatt)
          logger -t upssched-cmd "UPS running on battery"
          ;;
       earlyshutdown)
          logger -t upssched-cmd "UPS on battery too long, early shutdown"
          /usr/sbin/upsmon -c fsd
          ;;
       shutdowncritical)
          logger -t upssched-cmd "UPS on battery critical, forced shutdown"
          /usr/sbin/upsmon -c fsd
          ;;
       upsgone)
          logger -t upssched-cmd "UPS has been gone too long, can't reach"
          ;;
       *)
          logger -t upssched-cmd "Unrecognized command: $1"
          ;;
 esac

I needed this udev Rule because otherwise the Server would not Boot up and dmesg would be full of USB Reconnects every 10 Seconds.

cat /etc/udev/rules.d/99-nut-ups.rule

SUBSYSTEM!="usb", GOTO="nut-usbups_rules_end"

# Powerwalker
#  e.g. Powerwalker VI 2200 SHL UPS - usbhid-ups
ACTION=="add|change", SUBSYSTEM=="usb|usb_device", SUBSYSTEMS=="usb|usb_device", ATTR{idVendor}=="06da", ATTR{idProduct}=="ffff", MODE="664", GROUP="nut", RUN+="/sbin/upsdrvctl stop; /sbin/upsdrvctl start"

LABEL="nut-usbups_rules_end"

I hope someone can help me diagnose this problem so I can use my UPS reliably.

jimklimov commented 1 year ago

Do you have the driver normally running as a systemd unit? Possibly the "restart" via upsdrvctl causes the unit to also restart and complain due to conflict trying to use the USB port.

FWIW, NUT 2.8.0+ should have a more diligent retry logic. If you can get it built (e.g. current git master) it should hopefully behave better. See wiki for "in-place" build support.

Also maybe changing to "pollonly" mode with frequent ~15sec polls might help, if this device tends to go asleep and disconnect when bored, like some CPS were reported to do...

MarvinMynx commented 1 year ago

normally (e.g. when the Server Boots up, the udev rule should start / Restart the Driver with /sbin/upsdrvctl start. I think I started or restarted via systemd unit File while I was debugging with: systemctl start nut-driver.service. But the Data Stale appears even after a Clean Reboot after some hours.

I'm sadly not able to Build something because make isn't available and I have no src debs in my Repos Files. (I think this is a Proxmox thing)

How/Where would I Configure the pollonly Parameter?

Also, I'm not sure at all if the udev Rule is needed or correct, but at least the dmesg Reconnect Messages disappeared after I added this and Rebooted the Server. But still Reconnects every few Seconds in /lib/nut/usbhid-ups.

MarvinMynx commented 1 year ago

Also, also, I pretty much left the Default Settings intact as far as possible. So, if someone thinks increasing the Poll Rate/Freq Retry Times or something like this would help, I'm willing to try it. But Personally I Think that the problem is something else here.

MarvinMynx commented 1 year ago

I got another Error i thin because of the systemd unit nut-driver:

● nut-driver.service - Network UPS Tools - power device driver controller
     Loaded: loaded (/lib/systemd/system/nut-driver.service; static)
     Active: active (running) since Tue 2023-02-21 15:00:22 CET; 3h 32min ago
    Process: 1650101 ExecStart=/sbin/upsdrvctl start (code=exited, status=0/SUCCESS)
   Main PID: 1650241 (usbhid-ups)
      Tasks: 1 (limit: 38268)
     Memory: 496.0K
        CPU: 5.944s
     CGroup: /system.slice/nut-driver.service
             └─1650241 /lib/nut/usbhid-ups -a powerwalker

Feb 21 15:03:25 pve usbhid-ups[1650241]: libusb_get_interrupt: error submitting URB: Device or resource busy
Feb 21 15:03:25 pve usbhid-ups[1650241]: Got disconnected by another driver: Device or resource busy
Feb 21 15:03:28 pve usbhid-ups[1650241]: libusb_get_interrupt: error submitting URB: Device or resource busy
Feb 21 15:03:28 pve usbhid-ups[1650241]: Got disconnected by another driver: Device or resource busy
Feb 21 15:03:31 pve usbhid-ups[1650241]: libusb_get_interrupt: error submitting URB: Device or resource busy
Feb 21 15:03:31 pve usbhid-ups[1650241]: Got disconnected by another driver: Device or resource busy
Feb 21 15:03:34 pve usbhid-ups[1650241]: libusb_get_interrupt: error submitting URB: Device or resource busy
Feb 21 15:03:34 pve usbhid-ups[1650241]: Got disconnected by another driver: Device or resource busy
Feb 21 15:03:37 pve usbhid-ups[1650241]: libusb_get_interrupt: error submitting URB: Device or resource busy
Feb 21 15:03:37 pve usbhid-ups[1650241]: Got disconnected by another driver: Device or resource busy
● nut-server.service - Network UPS Tools - power devices information server
     Loaded: loaded (/lib/systemd/system/nut-server.service; enabled; vendor preset: enabled)
     Active: active (running) since Tue 2023-02-21 14:59:50 CET; 3h 32min ago
    Process: 1649116 ExecStart=/sbin/upsd (code=exited, status=0/SUCCESS)
   Main PID: 1649117 (upsd)
      Tasks: 1 (limit: 38268)
     Memory: 896.0K
        CPU: 318ms
     CGroup: /system.slice/nut-server.service
             └─1649117 /lib/nut/upsd

Feb 21 17:46:14 pve upsd[1649117]: Can't connect to UPS [powerwalker] (usbhid-ups-powerwalker): Connection refused
Feb 21 17:51:14 pve upsd[1649117]: Can't connect to UPS [powerwalker] (usbhid-ups-powerwalker): Connection refused
Feb 21 17:56:14 pve upsd[1649117]: Can't connect to UPS [powerwalker] (usbhid-ups-powerwalker): Connection refused
Feb 21 18:01:14 pve upsd[1649117]: Can't connect to UPS [powerwalker] (usbhid-ups-powerwalker): Connection refused
Feb 21 18:06:14 pve upsd[1649117]: Can't connect to UPS [powerwalker] (usbhid-ups-powerwalker): Connection refused
Feb 21 18:11:14 pve upsd[1649117]: Can't connect to UPS [powerwalker] (usbhid-ups-powerwalker): Connection refused
Feb 21 18:16:14 pve upsd[1649117]: Can't connect to UPS [powerwalker] (usbhid-ups-powerwalker): Connection refused
Feb 21 18:21:14 pve upsd[1649117]: Can't connect to UPS [powerwalker] (usbhid-ups-powerwalker): Connection refused
Feb 21 18:26:14 pve upsd[1649117]: Can't connect to UPS [powerwalker] (usbhid-ups-powerwalker): Connection refused
Feb 21 18:31:14 pve upsd[1649117]: Can't connect to UPS [powerwalker] (usbhid-ups-powerwalker): Connection refused
● nut-monitor.service - Network UPS Tools - power device monitor and shutdown controller
     Loaded: loaded (/lib/systemd/system/nut-monitor.service; enabled; vendor preset: enabled)
     Active: active (running) since Tue 2023-02-21 14:59:50 CET; 3h 32min ago
    Process: 1649132 ExecStart=/sbin/upsmon (code=exited, status=0/SUCCESS)
   Main PID: 1649134 (upsmon)
      Tasks: 2 (limit: 38268)
     Memory: 916.0K
        CPU: 366ms
     CGroup: /system.slice/nut-monitor.service
             ├─1649133 /lib/nut/upsmon
             └─1649134 /lib/nut/upsmon

Feb 21 18:31:55 pve upsmon[1649134]: Poll UPS [powerwalker@localhost] failed - Driver not connected
Feb 21 18:32:00 pve upsmon[1649134]: Poll UPS [powerwalker@localhost] failed - Driver not connected
Feb 21 18:32:05 pve upsmon[1649134]: Poll UPS [powerwalker@localhost] failed - Driver not connected
Feb 21 18:32:10 pve upsmon[1649134]: Poll UPS [powerwalker@localhost] failed - Driver not connected
Feb 21 18:32:15 pve upsmon[1649134]: Poll UPS [powerwalker@localhost] failed - Driver not connected
Feb 21 18:32:20 pve upsmon[1649134]: Poll UPS [powerwalker@localhost] failed - Driver not connected
Feb 21 18:32:25 pve upsmon[1649134]: Poll UPS [powerwalker@localhost] failed - Driver not connected
Feb 21 18:32:30 pve upsmon[1649134]: Poll UPS [powerwalker@localhost] failed - Driver not connected
Feb 21 18:32:35 pve upsmon[1649134]: Poll UPS [powerwalker@localhost] failed - Driver not connected
Feb 21 18:32:40 pve upsmon[1649134]: Poll UPS [powerwalker@localhost] failed - Driver not connected

I Disabled the nut-driver.service and Stopped it and then did this:

sudo service nut-server restart
sudo service nut-client restart
sudo systemctl restart nut-monitor
sudo upsdrvctl stop
sudo upsdrvctl start

Now it is working again for now, but I still noticed some Errors. I Think most Importantly the nut-driver.service failed again despite me manually stopping and disabling it.

● nut-driver.service - Network UPS Tools - power device driver controller
     Loaded: loaded (/lib/systemd/system/nut-driver.service; static)
     Active: failed (Result: exit-code) since Tue 2023-02-21 18:36:26 CET; 22s ago
    Process: 2054863 ExecStart=/sbin/upsdrvctl start (code=exited, status=0/SUCCESS)
    Process: 2054890 ExecStop=/sbin/upsdrvctl stop (code=exited, status=1/FAILURE)
   Main PID: 2054866 (code=exited, status=0/SUCCESS)
        CPU: 10ms

Feb 21 18:36:25 pve upsdrvctl[2054864]: Network UPS Tools - Generic HID driver 0.41 (2.7.4)
Feb 21 18:36:25 pve upsdrvctl[2054864]: USB communication driver 0.33
Feb 21 18:36:26 pve upsdrvctl[2054863]: Network UPS Tools - UPS driver controller 2.7.4
Feb 21 18:36:26 pve usbhid-ups[2054866]: Startup successful
Feb 21 18:36:26 pve systemd[1]: Started Network UPS Tools - power device driver controller.
Feb 21 18:36:26 pve usbhid-ups[2054866]: Signal 15: exiting
Feb 21 18:36:26 pve upsdrvctl[2054890]: Can't open /run/nut/usbhid-ups-auto.pid: No such file or directory
Feb 21 18:36:26 pve upsdrvctl[2054890]: Network UPS Tools - UPS driver controller 2.7.4
Feb 21 18:36:26 pve systemd[1]: nut-driver.service: Control process exited, code=exited, status=1/FAILURE
Feb 21 18:36:26 pve systemd[1]: nut-driver.service: Failed with result 'exit-code'.
● nut-server.service - Network UPS Tools - power devices information server
     Loaded: loaded (/lib/systemd/system/nut-server.service; enabled; vendor preset: enabled)
     Active: active (running) since Tue 2023-02-21 18:36:26 CET; 22s ago
    Process: 2054867 ExecStart=/sbin/upsd (code=exited, status=0/SUCCESS)
   Main PID: 2054868 (upsd)
      Tasks: 1 (limit: 38268)
     Memory: 680.0K
        CPU: 5ms
     CGroup: /system.slice/nut-server.service
             └─2054868 /lib/nut/upsd

Feb 21 18:36:26 pve systemd[1]: Starting Network UPS Tools - power devices information server...
Feb 21 18:36:26 pve upsd[2054867]: fopen /run/nut/upsd.pid: No such file or directory
Feb 21 18:36:26 pve upsd[2054867]: listening on 0.0.0.0 port 3493
Feb 21 18:36:26 pve upsd[2054867]: listening on 0.0.0.0 port 3493
Feb 21 18:36:26 pve upsd[2054867]: Connected to UPS [powerwalker]: usbhid-ups-powerwalker
Feb 21 18:36:26 pve upsd[2054867]: Connected to UPS [powerwalker]: usbhid-ups-powerwalker
Feb 21 18:36:26 pve upsd[2054868]: Startup successful
Feb 21 18:36:26 pve systemd[1]: Started Network UPS Tools - power devices information server.
Feb 21 18:36:26 pve upsd[2054868]: Can't connect to UPS [powerwalker] (usbhid-ups-powerwalker): No such file or directory
Feb 21 18:36:33 pve upsd[2054868]: Connected to UPS [powerwalker]: usbhid-ups-powerwalker
● nut-monitor.service - Network UPS Tools - power device monitor and shutdown controller
     Loaded: loaded (/lib/systemd/system/nut-monitor.service; enabled; vendor preset: enabled)
     Active: active (running) since Tue 2023-02-21 18:36:26 CET; 22s ago
    Process: 2054882 ExecStart=/sbin/upsmon (code=exited, status=0/SUCCESS)
   Main PID: 2054884 (upsmon)
      Tasks: 3 (limit: 38268)
     Memory: 1.1M
        CPU: 11ms
     CGroup: /system. Slice/nut-monitor.service
             ├─2054883 /lib/nut/upsmon
             ├─2054884 /lib/nut/upsmon
             └─2055021 /usr/sbin/upssched Communications with UPS powerwalker@localhost lost

Feb 21 18:36:26 pve systemd[1]: nut-monitor.service: Supervising process 2054884 which is not our child. We'll most likely not notice when it exits.
Feb 21 18:36:26 pve upsmon[2054884]: Init SSL without certificate database
Feb 21 18:36:26 pve upsmon[2054884]: Login on UPS [powerwalker@localhost] failed - got [ERR ACCESS-DENIED]
Feb 21 18:36:26 pve systemd[1]: Started Network UPS Tools - power device monitor and shutdown controller.
Feb 21 18:36:31 pve upsmon[2054884]: Poll UPS [powerwalker@localhost] failed - Driver not connected
Feb 21 18:36:31 pve upsmon[2054884]: Communications with UPS powerwalker@localhost lost
Feb 21 18:36:31 pve upssched[2055021]: Timer daemon started
Feb 21 18:36:31 pve upssched[2055021]: New timer: commbad (30 seconds)
Feb 21 18:36:36 pve upsmon[2054884]: Communications with UPS powerwalker@localhost established
Feb 21 18:36:36 pve upssched[2055021]: Cancelling timer: commbad
MarvinMynx commented 1 year ago

For better Debugging Purposes i now first Stopped the Driver with

upsdrvctl stop

And then Started the Driver like this:

/lib/nut/usbhid-ups -DD -a powerwalker

And i got this:

Network UPS Tools - Generic HID driver 0.41 (2.7.4)
USB communication driver 0.33
   0.000000     debug level is '2'
   0.000546     upsdrv_initups...
   0.165144     Checking device (1D6B/0002) (003/001)
   0.165270     - VendorID: 1d6b
   0.165277     - ProductID: 0002
   0.165280     - Manufacturer: unknown
   0.165284     - Product: unknown
   0.165295     - Serial Number: unknown
   0.165300     - Bus: 003
   0.165306     - Device release number: 0515
   0.165311     Trying to match device
   0.165319     Device does not match - skipping
   0.180750     Checking device (0BC2/AB34) (002/002)
   0.180773     - VendorID: 0bc2
   0.180778     - ProductID: ab34
   0.180784     - Manufacturer: unknown
   0.180789     - Product: unknown
   0.180794     - Serial Number: unknown
   0.180799     - Bus: 002
   0.180806     - Device release number: 0100
   0.180810     Trying to match device
   0.180817     Device does not match - skipping
   0.180822     Checking device (1D6B/0003) (002/001)
   0.180836     - VendorID: 1d6b
   0.180839     - ProductID: 0003
   0.180844     - Manufacturer: unknown
   0.180849     - Product: unknown
   0.180852     - Serial Number: unknown
   0.180856     - Bus: 002
   0.180859     - Device release number: 0515
   0.180863     Trying to match device
   0.180867     Device does not match - skipping
   0.180873     Checking device (06DA/FFFF) (001/006)
   0.185787     - VendorID: 06da
   0.185793     - ProductID: ffff
   0.185796     - Manufacturer: PPC
   0.185798     - Product: Offline UPS
   0.185801     - Serial Number: 000000000
   0.185803     - Bus: 001
   0.185806     - Device release number: 0003
   0.185808     Trying to match device
   0.185827     Device matches
   0.186575     HID descriptor length 495
   0.204729     Report Descriptor size = 495
   0.204805     Using subdriver: MGE HID 1.40
   0.204808     45 HID objects found
   0.205333     Path: UPS.BatterySystem.Battery.Test, Type: Feature, ReportID: 0x24, Offset: 0, Size: 8, Value: 6
   0.205874     Path: UPS.Flow.[4].ConfigApparentPower, Type: Feature, ReportID: 0x74, Offset: 0, Size: 16, Value: 9
   0.206403     Path: UPS.Flow.[4].ConfigFrequency, Type: Feature, ReportID: 0x36, Offset: 0, Size: 8, Value: 50
   0.206924     Path: UPS.Flow.[4].ConfigVoltage, Type: Feature, ReportID: 0x72, Offset: 0, Size: 8, Value: 230
   0.207452     Path: UPS.PowerConverter.ConverterType, Type: Feature, ReportID: 0x4a, Offset: 0, Size: 8, Value: 1
   0.208093     Path: UPS.PowerConverter.Input.[1].Voltage, Type: Feature, ReportID: 0x31, Offset: 0, Size: 16, Value: 231
   0.208630     Path: UPS.PowerConverter.Input.[1].PresentStatus.Boost, Type: Feature, ReportID: 0x2d, Offset: 0, Size: 8, Value: 0
   0.208639     Path: UPS.PowerConverter.Input.[1].PresentStatus.Boost, Type: Input, ReportID: 0x2d, Offset: 0, Size: 8, Value: 0
   0.208644     Path: UPS.PowerConverter.Input.[1].PresentStatus.Buck, Type: Feature, ReportID: 0x2d, Offset: 8, Size: 8, Value: 0
   0.208649     Path: UPS.PowerConverter.Input.[1].PresentStatus.Buck, Type: Input, ReportID: 0x2d, Offset: 8, Size: 8, Value: 0
   0.209104     Path: UPS.PowerConverter.Output.Frequency, Type: Feature, ReportID: 0x42, Offset: 0, Size: 16, Value: 49.6
   0.209111     Path: UPS.PowerConverter.Output.Voltage, Type: Feature, ReportID: 0x42, Offset: 16, Size: 16, Value: 231
   0.209639     Path: UPS.PowerSummary.AudibleAlarmControl, Type: Feature, ReportID: 0x13, Offset: 0, Size: 8, Value: 2
   0.210188     Path: UPS.PowerSummary.DelayBeforeShutdown, Type: Feature, ReportID: 0x09, Offset: 0, Size: 32, Value: 0
   0.210892     Path: UPS.PowerSummary.DelayBeforeStartup, Type: Feature, ReportID: 0x0a, Offset: 0, Size: 32, Value: 0
   0.211440     Path: UPS.PowerSummary.iDeviceChemistry, Type: Feature, ReportID: 0x10, Offset: 0, Size: 8, Value: 5
   0.211448     Path: UPS.PowerSummary.iManufacturer, Type: Feature, ReportID: 0x10, Offset: 8, Size: 8, Value: 1
   0.211453     Path: UPS.PowerSummary.iModel, Type: Feature, ReportID: 0x10, Offset: 16, Size: 8, Value: 3
   0.211457     Path: UPS.PowerSummary.iProduct, Type: Feature, ReportID: 0x10, Offset: 24, Size: 8, Value: 2
   0.211461     Path: UPS.PowerSummary.iSerialNumber, Type: Feature, ReportID: 0x10, Offset: 32, Size: 8, Value: 4
   0.212084     Path: UPS.PowerSummary.ffff00e2, Type: Feature, ReportID: 0xe2, Offset: 0, Size: 8, Value: 4
   0.212536     Path: UPS.PowerSummary.PercentLoad, Type: Feature, ReportID: 0x07, Offset: 0, Size: 8, Value: 1
   0.213124     Path: UPS.PowerSummary.PresentStatus.ACPresent, Type: Feature, ReportID: 0x01, Offset: 0, Size: 8, Value: 1
   0.213132     Path: UPS.PowerSummary.PresentStatus.ACPresent, Type: Input, ReportID: 0x01, Offset: 0, Size: 8, Value: 1
   0.213137     Path: UPS.PowerSummary.PresentStatus.BelowRemainingCapacityLimit, Type: Feature, ReportID: 0x01, Offset: 8, Size: 8, Value: 0
   0.213142     Path: UPS.PowerSummary.PresentStatus.BelowRemainingCapacityLimit, Type: Input, ReportID: 0x01, Offset: 8, Size: 8, Value: 0
   0.213147     Path: UPS.PowerSummary.PresentStatus.Charging, Type: Feature, ReportID: 0x01, Offset: 16, Size: 8, Value: 1
   0.213151     Path: UPS.PowerSummary.PresentStatus.Charging, Type: Input, ReportID: 0x01, Offset: 16, Size: 8, Value: 1
   0.213156     Path: UPS.PowerSummary.PresentStatus.Discharging, Type: Feature, ReportID: 0x01, Offset: 24, Size: 8, Value: 0
   0.213160     Path: UPS.PowerSummary.PresentStatus.Discharging, Type: Input, ReportID: 0x01, Offset: 24, Size: 8, Value: 0
   0.213165     Path: UPS.PowerSummary.PresentStatus.Good, Type: Feature, ReportID: 0x01, Offset: 32, Size: 8, Value: 1
   0.213170     Path: UPS.PowerSummary.PresentStatus.Good, Type: Input, ReportID: 0x01, Offset: 32, Size: 8, Value: 1
   0.213175     Path: UPS.PowerSummary.PresentStatus.InternalFailure, Type: Feature, ReportID: 0x01, Offset: 40, Size: 8, Value: 0
   0.213180     Path: UPS.PowerSummary.PresentStatus.InternalFailure, Type: Input, ReportID: 0x01, Offset: 40, Size: 8, Value: 0
   0.213185     Path: UPS.PowerSummary.PresentStatus.Overload, Type: Feature, ReportID: 0x01, Offset: 48, Size: 8, Value: 0
   0.213195     Path: UPS.PowerSummary.PresentStatus.Overload, Type: Input, ReportID: 0x01, Offset: 48, Size: 8, Value: 0
   0.213777     Path: UPS.PowerSummary.DesignCapacity, Type: Feature, ReportID: 0x0b, Offset: 0, Size: 8, Value: 100
   0.213789     Path: UPS.PowerSummary.CapacityGranularity1, Type: Feature, ReportID: 0x0b, Offset: 8, Size: 8, Value: 1
   0.213799     Path: UPS.PowerSummary.FullChargeCapacity, Type: Feature, ReportID: 0x0b, Offset: 16, Size: 8, Value: 100
   0.213807     Path: UPS.PowerSummary.CapacityMode, Type: Feature, ReportID: 0x0b, Offset: 24, Size: 8, Value: 2
   0.214229     Path: UPS.PowerSummary.RemainingCapacity, Type: Feature, ReportID: 0x06, Offset: 0, Size: 8, Value: 100
   0.214239     Path: UPS.PowerSummary.RemainingCapacity, Type: Input, ReportID: 0x06, Offset: 0, Size: 8, Value: 100
   0.214249     Path: UPS.PowerSummary.RunTimeToEmpty, Type: Feature, ReportID: 0x06, Offset: 8, Size: 16, Value: 3290
   0.214258     Path: UPS.PowerSummary.RunTimeToEmpty, Type: Input, ReportID: 0x06, Offset: 8, Size: 16, Value: 3290
   0.214267     Path: UPS.PowerSummary.Voltage, Type: Feature, ReportID: 0x07, Offset: 8, Size: 16, Value: 27.2
   0.215938     get_model_name(Offline UPS, HID UPS)

   0.215950     comparing with: ellipse 300
   0.215956     comparing with: ellipse 500
   0.215962     comparing with: ellipse 650
   0.215967     comparing with: ellipse 800
   0.215972     comparing with: ellipse 1200
   0.215977     comparing with: ellipse premium 500
   0.215982     comparing with: ellipse premium 650
   0.215987     comparing with: ellipse premium 800
   0.215992     comparing with: ellipse premium 1200
   0.215996     comparing with: Ellipse 600
   0.216001     comparing with: Ellipse 750
   0.216005     comparing with: Ellipse 1000
   0.216009     comparing with: Ellipse 1500
   0.216014     comparing with: Ellipse MAX 600
   0.216019     comparing with: Ellipse MAX 850
   0.216023     comparing with: Ellipse MAX 1100
   0.216028     comparing with: Ellipse MAX 1500
   0.216032     comparing with: Protection Center 420
   0.216037     comparing with: Protection Center 500
   0.216042     comparing with: Protection Center 675
   0.216047     comparing with: Protection Station 500
   0.216052     comparing with: Protection Station 650
   0.216058     comparing with: Protection Station 800
   0.216062     comparing with: Ellipse ECO 650
   0.216066     comparing with: Ellipse ECO 800
   0.216070     comparing with: Ellipse ECO 1200
   0.216076     comparing with: Ellipse ECO 1600
   0.216081     comparing with: 3S 450
   0.216086     comparing with: 3S 550
   0.216091     comparing with: 3S 700
   0.216096     comparing with: 3S 750
   0.216100     comparing with: Pulsar Evolution 500
   0.216105     comparing with: Pulsar Evolution 800
   0.216109     comparing with: Pulsar Evolution 1100
   0.216113     comparing with: Pulsar Evolution 1500
   0.216117     comparing with: Pulsar Evolution 2200
   0.216121     comparing with: Pulsar Evolution 3000
   0.216126     comparing with: Pulsar Evolution 3000 XL
   0.216131     comparing with: Evolution 650
   0.216135     comparing with: Evolution 850
   0.216140     comparing with: Evolution 1150
   0.216145     comparing with: Evolution S 1250
   0.216150     comparing with: Evolution 1550
   0.216154     comparing with: Evolution S 1750
   0.216159     comparing with: Evolution 2000
   0.216164     comparing with: Evolution S 2500
   0.216169     comparing with: Evolution S 3000
   0.216174     comparing with: 5P 650
   0.216178     comparing with: 5P 850
   0.216183     comparing with: 5P 1150
   0.216188     comparing with: 5P 1550
   0.216193     comparing with: PULSAR M 2200
   0.216198     comparing with: PULSAR M 3000
   0.216203     comparing with: PULSAR M 3000 XL
   0.216208     comparing with: EX 2200
   0.216212     comparing with: EX 3000
   0.216217     comparing with: EX 3000 XL
   0.216222     comparing with: Pulsar MX 4000 RT
   0.216227     comparing with: Pulsar MX 5000 RT
   0.216232     comparing with: Nova 500 AVR
   0.216236     comparing with: Nova 600 AVR
   0.216241     comparing with: Nova 625 AVR
   0.216246     comparing with: Nova 1100 AVR
   0.216251     comparing with: Nova 1250 AVR
   0.216256     comparing with: Pulsar EXtreme 700C
   0.216261     comparing with: Pulsar EXtreme 1000C
   0.216266     comparing with: Pulsar EXtreme 1500C
   0.216270     comparing with: Pulsar EXtreme 1500C CLA
   0.216275     comparing with: Pulsar EXtreme 2200C
   0.216280     comparing with: Pulsar EXtreme 3200C
   0.216285     comparing with: Pulsar EX 700 RT
   0.216289     comparing with: Pulsar EX 1000 RT
   0.216294     comparing with: Pulsar EX 1500 RT
   0.216299     comparing with: Pulsar EX 2200 RT
   0.216304     comparing with: Pulsar EX 3200 RT
   0.216309     comparing with: EX 5 RT 3:1
   0.216313     comparing with: EX 7 RT 3:1
   0.216318     comparing with: EX 11 RT 3:1
   0.216323     comparing with: EX 5 RT
   0.216327     comparing with: EX 7 RT
   0.216332     comparing with: EX 11 RT
   0.216337     comparing with: Galaxy 3000 10 kVA
   0.216341     comparing with: Galaxy 3000 15 kVA
   0.216346     comparing with: Galaxy 3000 20 kVA
   0.216351     comparing with: Galaxy 3000 30 kVA
   0.216363     Report descriptor retrieved (Reportlen = 495)
   0.216368     Found HID device
   0.216373     Detected a UPS: PPC/Offline UPS HID UPS
   0.216404     Path: UPS.PowerSummary.RemainingCapacity, Type: Feature, ReportID: 0x06, Offset: 0, Size: 8, Value: 100
   0.216465     Path: UPS.PowerSummary.RunTimeToEmpty, Type: Feature, ReportID: 0x06, Offset: 8, Size: 16, Value: 3290
   0.216537     Path: UPS.PowerSummary.iDeviceChemistry, Type: Feature, ReportID: 0x10, Offset: 0, Size: 8, Value: 5
   0.218045     Path: UPS.PowerSummary.Voltage, Type: Feature, ReportID: 0x07, Offset: 8, Size: 16, Value: 27.2
   0.218118     Path: UPS.PowerSummary.PercentLoad, Type: Feature, ReportID: 0x07, Offset: 0, Size: 8, Value: 1
   0.218143     Path: UPS.PowerSummary.DelayBeforeStartup, Type: Feature, ReportID: 0x0a, Offset: 0, Size: 32, Value: 0
   0.218151     Path: UPS.PowerSummary.DelayBeforeShutdown, Type: Feature, ReportID: 0x09, Offset: 0, Size: 32, Value: 0
   0.218163     Path: UPS.BatterySystem.Battery.Test, Type: Feature, ReportID: 0x24, Offset: 0, Size: 8, Value: 6
   0.218175     Path: UPS.PowerSummary.AudibleAlarmControl, Type: Feature, ReportID: 0x13, Offset: 0, Size: 8, Value: 2
   0.218217     Path: UPS.Flow.[4].ConfigApparentPower, Type: Feature, ReportID: 0x74, Offset: 0, Size: 16, Value: 9
   0.218280     Path: UPS.PowerConverter.ConverterType, Type: Feature, ReportID: 0x4a, Offset: 0, Size: 8, Value: 1
   0.218291     Path: UPS.PowerSummary.PresentStatus.ACPresent, Type: Feature, ReportID: 0x01, Offset: 0, Size: 8, Value: 1
   0.218317     Path: UPS.PowerSummary.PresentStatus.Discharging, Type: Feature, ReportID: 0x01, Offset: 24, Size: 8, Value: 0
   0.218327     Path: UPS.PowerSummary.PresentStatus.Charging, Type: Feature, ReportID: 0x01, Offset: 16, Size: 8, Value: 1
   0.218341     Path: UPS.PowerSummary.PresentStatus.BelowRemainingCapacityLimit, Type: Feature, ReportID: 0x01, Offset: 8, Size: 8, Value: 0
   0.218371     Path: UPS.PowerSummary.PresentStatus.Overload, Type: Feature, ReportID: 0x01, Offset: 48, Size: 8, Value: 0
   0.218395     Path: UPS.PowerConverter.Input.[1].PresentStatus.Buck, Type: Feature, ReportID: 0x2d, Offset: 8, Size: 8, Value: 0
   0.218414     Path: UPS.PowerConverter.Input.[1].PresentStatus.Boost, Type: Feature, ReportID: 0x2d, Offset: 0, Size: 8, Value: 0
   0.218444     Path: UPS.PowerSummary.PresentStatus.Good, Type: Feature, ReportID: 0x01, Offset: 32, Size: 8, Value: 1
   0.218518     Path: UPS.PowerSummary.PresentStatus.InternalFailure, Type: Feature, ReportID: 0x01, Offset: 40, Size: 8, Value: 0
   0.218571     Path: UPS.PowerConverter.Input.[1].Voltage, Type: Feature, ReportID: 0x31, Offset: 0, Size: 16, Value: 231
   0.218864     Path: UPS.PowerConverter.Output.Voltage, Type: Feature, ReportID: 0x42, Offset: 16, Size: 16, Value: 231
   0.218924     Path: UPS.Flow.[4].ConfigVoltage, Type: Feature, ReportID: 0x72, Offset: 0, Size: 8, Value: 230
   0.219031     Path: UPS.PowerConverter.Output.Frequency, Type: Feature, ReportID: 0x42, Offset: 0, Size: 16, Value: 49.6
   0.219054     Path: UPS.Flow.[4].ConfigFrequency, Type: Feature, ReportID: 0x36, Offset: 0, Size: 8, Value: 50
   0.219296     Path: UPS.PowerSummary.PresentStatus.ACPresent, Type: Feature, ReportID: 0x01, Offset: 0, Size: 8, Value: 1
   0.219629     Path: UPS.BatterySystem.Battery.Test, Type: Feature, ReportID: 0x24, Offset: 0, Size: 8, Value: 6
   0.219647     Path: UPS.BatterySystem.Battery.Test, Type: Feature, ReportID: 0x24, Offset: 0, Size: 8, Value: 6
   0.219666     Path: UPS.BatterySystem.Battery.Test, Type: Feature, ReportID: 0x24, Offset: 0, Size: 8, Value: 6
   0.219682     Path: UPS.PowerSummary.DelayBeforeShutdown, Type: Feature, ReportID: 0x09, Offset: 0, Size: 32, Value: 0
   0.219698     Path: UPS.PowerSummary.DelayBeforeStartup, Type: Feature, ReportID: 0x0a, Offset: 0, Size: 32, Value: 0
   0.219713     Path: UPS.PowerSummary.DelayBeforeShutdown, Type: Feature, ReportID: 0x09, Offset: 0, Size: 32, Value: 0
   0.219738     Path: UPS.PowerSummary.AudibleAlarmControl, Type: Feature, ReportID: 0x13, Offset: 0, Size: 8, Value: 2
   0.219752     Path: UPS.PowerSummary.AudibleAlarmControl, Type: Feature, ReportID: 0x13, Offset: 0, Size: 8, Value: 2
   0.219766     Path: UPS.PowerSummary.AudibleAlarmControl, Type: Feature, ReportID: 0x13, Offset: 0, Size: 8, Value: 2
   0.219782     Path: UPS.PowerSummary.AudibleAlarmControl, Type: Feature, ReportID: 0x13, Offset: 0, Size: 8, Value: 2
   0.219798     Path: UPS.PowerSummary.AudibleAlarmControl, Type: Feature, ReportID: 0x13, Offset: 0, Size: 8, Value: 2
   0.219890     upsdrv_initinfo...
   0.219896     upsdrv_updateinfo...
   0.306807     Got 2 HID objects...
   0.306823     Path: UPS.PowerSummary.RemainingCapacity, Type: Input, ReportID: 0x06, Offset: 0, Size: 8, Value: 100
   0.306830     Path: UPS.PowerSummary.RunTimeToEmpty, Type: Input, ReportID: 0x06, Offset: 8, Size: 16, Value: 3359
   0.306836     Quick update...
   0.306840     Path: UPS.PowerSummary.DelayBeforeStartup, Type: Feature, ReportID: 0x0a, Offset: 0, Size: 32, Value: 0
   0.306844     Path: UPS.PowerSummary.DelayBeforeShutdown, Type: Feature, ReportID: 0x09, Offset: 0, Size: 32, Value: 0
   0.306853     Path: UPS.PowerSummary.PresentStatus.ACPresent, Type: Feature, ReportID: 0x01, Offset: 0, Size: 8, Value: 1
   0.306863     Path: UPS.PowerSummary.PresentStatus.Discharging, Type: Feature, ReportID: 0x01, Offset: 24, Size: 8, Value: 0
   0.306867     Path: UPS.PowerSummary.PresentStatus.Charging, Type: Feature, ReportID: 0x01, Offset: 16, Size: 8, Value: 1
   0.306872     Path: UPS.PowerSummary.PresentStatus.BelowRemainingCapacityLimit, Type: Feature, ReportID: 0x01, Offset: 8, Size: 8, Value: 0
   0.306907     dstate_init: sock /run/nut/usbhid-ups-powerwalker open on fd 5
   0.306920     upsdrv_updateinfo...
   0.498704     Got 2 HID objects...
   0.498723     Path: UPS.PowerSummary.RemainingCapacity, Type: Input, ReportID: 0x06, Offset: 0, Size: 8, Value: 100
   0.498734     Path: UPS.PowerSummary.RunTimeToEmpty, Type: Input, ReportID: 0x06, Offset: 8, Size: 16, Value: 3290
   0.498742     Quick update...
   0.498747     Path: UPS.PowerSummary.DelayBeforeStartup, Type: Feature, ReportID: 0x0a, Offset: 0, Size: 32, Value: 0
   0.498756     Path: UPS.PowerSummary.DelayBeforeShutdown, Type: Feature, ReportID: 0x09, Offset: 0, Size: 32, Value: 0
   0.498764     Path: UPS.PowerSummary.PresentStatus.ACPresent, Type: Feature, ReportID: 0x01, Offset: 0, Size: 8, Value: 1
   0.498769     Path: UPS.PowerSummary.PresentStatus.Discharging, Type: Feature, ReportID: 0x01, Offset: 24, Size: 8, Value: 0
   0.498774     Path: UPS.PowerSummary.PresentStatus.Charging, Type: Feature, ReportID: 0x01, Offset: 16, Size: 8, Value: 1
   0.498778     Path: UPS.PowerSummary.PresentStatus.BelowRemainingCapacityLimit, Type: Feature, ReportID: 0x01, Offset: 8, Size: 8, Value: 0
   1.307242     upsdrv_updateinfo...
   1.558526     libusb_get_interrupt: Connection timed out
   1.558539     Got 0 HID objects...
   1.558546     Quick update...
   1.559043     Path: UPS.PowerSummary.DelayBeforeStartup, Type: Feature, ReportID: 0x0a, Offset: 0, Size: 32, Value: 0
   1.559566     Path: UPS.PowerSummary.DelayBeforeShutdown, Type: Feature, ReportID: 0x09, Offset: 0, Size: 32, Value: 0
   1.560035     Path: UPS.PowerSummary.PresentStatus.ACPresent, Type: Feature, ReportID: 0x01, Offset: 0, Size: 8, Value: 1
   1.560045     Path: UPS.PowerSummary.PresentStatus.Discharging, Type: Feature, ReportID: 0x01, Offset: 24, Size: 8, Value: 0
   1.560051     Path: UPS.PowerSummary.PresentStatus.Charging, Type: Feature, ReportID: 0x01, Offset: 16, Size: 8, Value: 1
   1.560058     Path: UPS.PowerSummary.PresentStatus.BelowRemainingCapacityLimit, Type: Feature, ReportID: 0x01, Offset: 8, Size: 8, Value: 0
   2.308110     upsdrv_updateinfo...
   2.559062     libusb_get_interrupt: Connection timed out
   2.559074     Got 0 HID objects...
   2.559078     Quick update...
   2.559544     Path: UPS.PowerSummary.DelayBeforeStartup, Type: Feature, ReportID: 0x0a, Offset: 0, Size: 32, Value: 0
   2.560050     Path: UPS.PowerSummary.DelayBeforeShutdown, Type: Feature, ReportID: 0x09, Offset: 0, Size: 32, Value: 0
   2.560517     Path: UPS.PowerSummary.PresentStatus.ACPresent, Type: Feature, ReportID: 0x01, Offset: 0, Size: 8, Value: 1
   2.560527     Path: UPS.PowerSummary.PresentStatus.Discharging, Type: Feature, ReportID: 0x01, Offset: 24, Size: 8, Value: 0
   2.560534     Path: UPS.PowerSummary.PresentStatus.Charging, Type: Feature, ReportID: 0x01, Offset: 16, Size: 8, Value: 1
   2.560543     Path: UPS.PowerSummary.PresentStatus.BelowRemainingCapacityLimit, Type: Feature, ReportID: 0x01, Offset: 8, Size: 8, Value: 0
   3.308978     upsdrv_updateinfo...
   3.559741     libusb_get_interrupt: Connection timed out
   3.559756     Got 0 HID objects...
   3.559762     Quick update...
   3.560250     Path: UPS.PowerSummary.DelayBeforeStartup, Type: Feature, ReportID: 0x0a, Offset: 0, Size: 32, Value: 0
   3.560843     Path: UPS.PowerSummary.DelayBeforeShutdown, Type: Feature, ReportID: 0x09, Offset: 0, Size: 32, Value: 0
   3.561388     Path: UPS.PowerSummary.PresentStatus.ACPresent, Type: Feature, ReportID: 0x01, Offset: 0, Size: 8, Value: 1
   3.561396     Path: UPS.PowerSummary.PresentStatus.Discharging, Type: Feature, ReportID: 0x01, Offset: 24, Size: 8, Value: 0
   3.561400     Path: UPS.PowerSummary.PresentStatus.Charging, Type: Feature, ReportID: 0x01, Offset: 16, Size: 8, Value: 1
   3.561405     Path: UPS.PowerSummary.PresentStatus.BelowRemainingCapacityLimit, Type: Feature, ReportID: 0x01, Offset: 8, Size: 8, Value: 0
   4.309846     upsdrv_updateinfo...
   4.560848     libusb_get_interrupt: Connection timed out
   4.560861     Got 0 HID objects...
   4.560867     Quick update...
   4.561331     Path: UPS.PowerSummary.DelayBeforeStartup, Type: Feature, ReportID: 0x0a, Offset: 0, Size: 32, Value: 0
   4.561869     Path: UPS.PowerSummary.DelayBeforeShutdown, Type: Feature, ReportID: 0x09, Offset: 0, Size: 32, Value: 0
   4.562296     Path: UPS.PowerSummary.PresentStatus.ACPresent, Type: Feature, ReportID: 0x01, Offset: 0, Size: 8, Value: 1
   4.562306     Path: UPS.PowerSummary.PresentStatus.Discharging, Type: Feature, ReportID: 0x01, Offset: 24, Size: 8, Value: 0
   4.562312     Path: UPS.PowerSummary.PresentStatus.Charging, Type: Feature, ReportID: 0x01, Offset: 16, Size: 8, Value: 1
   4.562319     Path: UPS.PowerSummary.PresentStatus.BelowRemainingCapacityLimit, Type: Feature, ReportID: 0x01, Offset: 8, Size: 8, Value: 0
   5.310715     upsdrv_updateinfo...
   5.560936     libusb_get_interrupt: Connection timed out
   5.560948     Got 0 HID objects...
   5.560952     Quick update...
   5.561417     Path: UPS.PowerSummary.DelayBeforeStartup, Type: Feature, ReportID: 0x0a, Offset: 0, Size: 32, Value: 0
   5.561926     Path: UPS.PowerSummary.DelayBeforeShutdown, Type: Feature, ReportID: 0x09, Offset: 0, Size: 32, Value: 0
   5.562388     Path: UPS.PowerSummary.PresentStatus.ACPresent, Type: Feature, ReportID: 0x01, Offset: 0, Size: 8, Value: 1
   5.562396     Path: UPS.PowerSummary.PresentStatus.Discharging, Type: Feature, ReportID: 0x01, Offset: 24, Size: 8, Value: 0
   5.562401     Path: UPS.PowerSummary.PresentStatus.Charging, Type: Feature, ReportID: 0x01, Offset: 16, Size: 8, Value: 1
   5.562405     Path: UPS.PowerSummary.PresentStatus.BelowRemainingCapacityLimit, Type: Feature, ReportID: 0x01, Offset: 8, Size: 8, Value: 0

Broadcast message from root@pve (somewhere) (Tue Feb 21 19:14:31 2023):

Communications with UPS powerwalker@localhost established

   6.311585     upsdrv_updateinfo...
   6.562514     libusb_get_interrupt: Connection timed out
   6.562526     Got 0 HID objects...
   6.562530     Quick update...
   6.563019     Path: UPS.PowerSummary.DelayBeforeStartup, Type: Feature, ReportID: 0x0a, Offset: 0, Size: 32, Value: 0
   6.563539     Path: UPS.PowerSummary.DelayBeforeShutdown, Type: Feature, ReportID: 0x09, Offset: 0, Size: 32, Value: 0
   6.564035     Path: UPS.PowerSummary.PresentStatus.ACPresent, Type: Feature, ReportID: 0x01, Offset: 0, Size: 8, Value: 1
   6.564043     Path: UPS.PowerSummary.PresentStatus.Discharging, Type: Feature, ReportID: 0x01, Offset: 24, Size: 8, Value: 0
   6.564048     Path: UPS.PowerSummary.PresentStatus.Charging, Type: Feature, ReportID: 0x01, Offset: 16, Size: 8, Value: 1
   6.564052     Path: UPS.PowerSummary.PresentStatus.BelowRemainingCapacityLimit, Type: Feature, ReportID: 0x01, Offset: 8, Size: 8, Value: 0
   7.312451     upsdrv_updateinfo...
   7.563148     libusb_get_interrupt: Connection timed out
   7.563161     Got 0 HID objects...
   7.563165     Quick update...
   7.563736     Path: UPS.PowerSummary.DelayBeforeStartup, Type: Feature, ReportID: 0x0a, Offset: 0, Size: 32, Value: 0
   7.564214     Path: UPS.PowerSummary.DelayBeforeShutdown, Type: Feature, ReportID: 0x09, Offset: 0, Size: 32, Value: 0
   7.564856     Path: UPS.PowerSummary.PresentStatus.ACPresent, Type: Feature, ReportID: 0x01, Offset: 0, Size: 8, Value: 1
   7.564864     Path: UPS.PowerSummary.PresentStatus.Discharging, Type: Feature, ReportID: 0x01, Offset: 24, Size: 8, Value: 0
   7.564869     Path: UPS.PowerSummary.PresentStatus.Charging, Type: Feature, ReportID: 0x01, Offset: 16, Size: 8, Value: 1
   7.564873     Path: UPS.PowerSummary.PresentStatus.BelowRemainingCapacityLimit, Type: Feature, ReportID: 0x01, Offset: 8, Size: 8, Value: 0
   8.313318     upsdrv_updateinfo...
   8.564290     libusb_get_interrupt: Connection timed out
   8.564303     Got 0 HID objects...
   8.564308     Quick update...
   8.564854     Path: UPS.PowerSummary.DelayBeforeStartup, Type: Feature, ReportID: 0x0a, Offset: 0, Size: 32, Value: 0
   8.565363     Path: UPS.PowerSummary.DelayBeforeShutdown, Type: Feature, ReportID: 0x09, Offset: 0, Size: 32, Value: 0
   8.565873     Path: UPS.PowerSummary.PresentStatus.ACPresent, Type: Feature, ReportID: 0x01, Offset: 0, Size: 8, Value: 1
   8.565882     Path: UPS.PowerSummary.PresentStatus.Discharging, Type: Feature, ReportID: 0x01, Offset: 24, Size: 8, Value: 0
   8.565887     Path: UPS.PowerSummary.PresentStatus.Charging, Type: Feature, ReportID: 0x01, Offset: 16, Size: 8, Value: 1
   8.565891     Path: UPS.PowerSummary.PresentStatus.BelowRemainingCapacityLimit, Type: Feature, ReportID: 0x01, Offset: 8, Size: 8, Value: 0
   9.314188     upsdrv_updateinfo...
   9.564821     libusb_get_interrupt: Connection timed out
   9.564834     Got 0 HID objects...
   9.564838     Quick update...
   9.565400     Path: UPS.PowerSummary.DelayBeforeStartup, Type: Feature, ReportID: 0x0a, Offset: 0, Size: 32, Value: 0
   9.565883     Path: UPS.PowerSummary.DelayBeforeShutdown, Type: Feature, ReportID: 0x09, Offset: 0, Size: 32, Value: 0
   9.566377     Path: UPS.PowerSummary.PresentStatus.ACPresent, Type: Feature, ReportID: 0x01, Offset: 0, Size: 8, Value: 1
   9.566389     Path: UPS.PowerSummary.PresentStatus.Discharging, Type: Feature, ReportID: 0x01, Offset: 24, Size: 8, Value: 0
   9.566399     Path: UPS.PowerSummary.PresentStatus.Charging, Type: Feature, ReportID: 0x01, Offset: 16, Size: 8, Value: 1
   9.566407     Path: UPS.PowerSummary.PresentStatus.BelowRemainingCapacityLimit, Type: Feature, ReportID: 0x01, Offset: 8, Size: 8, Value: 0
  10.314512     upsdrv_updateinfo...
  10.564813     libusb_get_interrupt: Connection timed out
  10.564827     Got 0 HID objects...
  10.564831     Quick update...
  10.565319     Path: UPS.PowerSummary.DelayBeforeStartup, Type: Feature, ReportID: 0x0a, Offset: 0, Size: 32, Value: 0
  10.565907     Path: UPS.PowerSummary.DelayBeforeShutdown, Type: Feature, ReportID: 0x09, Offset: 0, Size: 32, Value: 0
  10.566395     Path: UPS.PowerSummary.PresentStatus.ACPresent, Type: Feature, ReportID: 0x01, Offset: 0, Size: 8, Value: 1
  10.566404     Path: UPS.PowerSummary.PresentStatus.Discharging, Type: Feature, ReportID: 0x01, Offset: 24, Size: 8, Value: 0
  10.566408     Path: UPS.PowerSummary.PresentStatus.Charging, Type: Feature, ReportID: 0x01, Offset: 16, Size: 8, Value: 1
  10.566413     Path: UPS.PowerSummary.PresentStatus.BelowRemainingCapacityLimit, Type: Feature, ReportID: 0x01, Offset: 8, Size: 8, Value: 0
  11.315380     upsdrv_updateinfo...
  11.442807     Got 2 HID objects...
  11.442823     Path: UPS.PowerSummary.RemainingCapacity, Type: Input, ReportID: 0x06, Offset: 0, Size: 8, Value: 100
  11.442830     Path: UPS.PowerSummary.RunTimeToEmpty, Type: Input, ReportID: 0x06, Offset: 8, Size: 16, Value: 3359
  11.442844     Quick update...
  11.443330     Path: UPS.PowerSummary.DelayBeforeStartup, Type: Feature, ReportID: 0x0a, Offset: 0, Size: 32, Value: 0
  11.443836     Path: UPS.PowerSummary.DelayBeforeShutdown, Type: Feature, ReportID: 0x09, Offset: 0, Size: 32, Value: 0
  11.444335     Path: UPS.PowerSummary.PresentStatus.ACPresent, Type: Feature, ReportID: 0x01, Offset: 0, Size: 8, Value: 1
  11.444344     Path: UPS.PowerSummary.PresentStatus.Discharging, Type: Feature, ReportID: 0x01, Offset: 24, Size: 8, Value: 0
  11.444348     Path: UPS.PowerSummary.PresentStatus.Charging, Type: Feature, ReportID: 0x01, Offset: 16, Size: 8, Value: 1
  11.444353     Path: UPS.PowerSummary.PresentStatus.BelowRemainingCapacityLimit, Type: Feature, ReportID: 0x01, Offset: 8, Size: 8, Value: 0
  12.316371     upsdrv_updateinfo...
  12.466840     Got 2 HID objects...
  12.466857     Path: UPS.PowerSummary.RemainingCapacity, Type: Input, ReportID: 0x06, Offset: 0, Size: 8, Value: 100
  12.466865     Path: UPS.PowerSummary.RunTimeToEmpty, Type: Input, ReportID: 0x06, Offset: 8, Size: 16, Value: 3290
  12.466879     Quick update...
  12.467322     Path: UPS.PowerSummary.DelayBeforeStartup, Type: Feature, ReportID: 0x0a, Offset: 0, Size: 32, Value: 0
  12.467802     Path: UPS.PowerSummary.DelayBeforeShutdown, Type: Feature, ReportID: 0x09, Offset: 0, Size: 32, Value: 0
  12.468255     Path: UPS.PowerSummary.PresentStatus.ACPresent, Type: Feature, ReportID: 0x01, Offset: 0, Size: 8, Value: 1
  12.468267     Path: UPS.PowerSummary.PresentStatus.Discharging, Type: Feature, ReportID: 0x01, Offset: 24, Size: 8, Value: 0
  12.468275     Path: UPS.PowerSummary.PresentStatus.Charging, Type: Feature, ReportID: 0x01, Offset: 16, Size: 8, Value: 1
  12.468283     Path: UPS.PowerSummary.PresentStatus.BelowRemainingCapacityLimit, Type: Feature, ReportID: 0x01, Offset: 8, Size: 8, Value: 0
  13.317341     upsdrv_updateinfo...
  13.568284     libusb_get_interrupt: Connection timed out
  13.568297     Got 0 HID objects...
  13.568302     Quick update...
  13.568884     Path: UPS.PowerSummary.DelayBeforeStartup, Type: Feature, ReportID: 0x0a, Offset: 0, Size: 32, Value: 0
  13.569367     Path: UPS.PowerSummary.DelayBeforeShutdown, Type: Feature, ReportID: 0x09, Offset: 0, Size: 32, Value: 0
  13.569871     Path: UPS.PowerSummary.PresentStatus.ACPresent, Type: Feature, ReportID: 0x01, Offset: 0, Size: 8, Value: 1
  13.569901     Path: UPS.PowerSummary.PresentStatus.Discharging, Type: Feature, ReportID: 0x01, Offset: 24, Size: 8, Value: 0
  13.569906     Path: UPS.PowerSummary.PresentStatus.Charging, Type: Feature, ReportID: 0x01, Offset: 16, Size: 8, Value: 1
  13.569911     Path: UPS.PowerSummary.PresentStatus.BelowRemainingCapacityLimit, Type: Feature, ReportID: 0x01, Offset: 8, Size: 8, Value: 0
  14.318208     upsdrv_updateinfo...
  14.568819     libusb_get_interrupt: Connection timed out
  14.568833     Got 0 HID objects...
  14.568837     Quick update...
  14.569327     Path: UPS.PowerSummary.DelayBeforeStartup, Type: Feature, ReportID: 0x0a, Offset: 0, Size: 32, Value: 0
  14.569916     Path: UPS.PowerSummary.DelayBeforeShutdown, Type: Feature, ReportID: 0x09, Offset: 0, Size: 32, Value: 0
  14.570380     Path: UPS.PowerSummary.PresentStatus.ACPresent, Type: Feature, ReportID: 0x01, Offset: 0, Size: 8, Value: 1
  14.570392     Path: UPS.PowerSummary.PresentStatus.Discharging, Type: Feature, ReportID: 0x01, Offset: 24, Size: 8, Value: 0
  14.570397     Path: UPS.PowerSummary.PresentStatus.Charging, Type: Feature, ReportID: 0x01, Offset: 16, Size: 8, Value: 1
  14.570401     Path: UPS.PowerSummary.PresentStatus.BelowRemainingCapacityLimit, Type: Feature, ReportID: 0x01, Offset: 8, Size: 8, Value: 0
  15.319075     upsdrv_updateinfo...
  15.569400     libusb_get_interrupt: Connection timed out
  15.569414     Got 0 HID objects...
  15.569422     Quick update...
  15.569840     Path: UPS.PowerSummary.DelayBeforeStartup, Type: Feature, ReportID: 0x0a, Offset: 0, Size: 32, Value: 0
  15.570355     Path: UPS.PowerSummary.DelayBeforeShutdown, Type: Feature, ReportID: 0x09, Offset: 0, Size: 32, Value: 0
  15.570814     Path: UPS.PowerSummary.PresentStatus.ACPresent, Type: Feature, ReportID: 0x01, Offset: 0, Size: 8, Value: 1
  15.570825     Path: UPS.PowerSummary.PresentStatus.Discharging, Type: Feature, ReportID: 0x01, Offset: 24, Size: 8, Value: 0
  15.570834     Path: UPS.PowerSummary.PresentStatus.Charging, Type: Feature, ReportID: 0x01, Offset: 16, Size: 8, Value: 1
  15.570841     Path: UPS.PowerSummary.PresentStatus.BelowRemainingCapacityLimit, Type: Feature, ReportID: 0x01, Offset: 8, Size: 8, Value: 0
  16.319942     upsdrv_updateinfo...
  16.571011     libusb_get_interrupt: Connection timed out
  16.571024     Got 0 HID objects...
  16.571028     Quick update...
  16.571518     Path: UPS.PowerSummary.DelayBeforeStartup, Type: Feature, ReportID: 0x0a, Offset: 0, Size: 32, Value: 0
  16.572119     Path: UPS.PowerSummary.DelayBeforeShutdown, Type: Feature, ReportID: 0x09, Offset: 0, Size: 32, Value: 0
  16.572592     Path: UPS.PowerSummary.PresentStatus.ACPresent, Type: Feature, ReportID: 0x01, Offset: 0, Size: 8, Value: 1
  16.572603     Path: UPS.PowerSummary.PresentStatus.Discharging, Type: Feature, ReportID: 0x01, Offset: 24, Size: 8, Value: 0
  16.572619     Path: UPS.PowerSummary.PresentStatus.Charging, Type: Feature, ReportID: 0x01, Offset: 16, Size: 8, Value: 1
  16.572626     Path: UPS.PowerSummary.PresentStatus.BelowRemainingCapacityLimit, Type: Feature, ReportID: 0x01, Offset: 8, Size: 8, Value: 0
  17.320729     upsdrv_updateinfo...
  17.571187     libusb_get_interrupt: Connection timed out
  17.571200     Got 0 HID objects...
  17.571204     Quick update...
  17.571746     Path: UPS.PowerSummary.DelayBeforeStartup, Type: Feature, ReportID: 0x0a, Offset: 0, Size: 32, Value: 0
  17.572221     Path: UPS.PowerSummary.DelayBeforeShutdown, Type: Feature, ReportID: 0x09, Offset: 0, Size: 32, Value: 0
  17.572732     Path: UPS.PowerSummary.PresentStatus.ACPresent, Type: Feature, ReportID: 0x01, Offset: 0, Size: 8, Value: 1
  17.572741     Path: UPS.PowerSummary.PresentStatus.Discharging, Type: Feature, ReportID: 0x01, Offset: 24, Size: 8, Value: 0
  17.572746     Path: UPS.PowerSummary.PresentStatus.Charging, Type: Feature, ReportID: 0x01, Offset: 16, Size: 8, Value: 1
  17.572750     Path: UPS.PowerSummary.PresentStatus.BelowRemainingCapacityLimit, Type: Feature, ReportID: 0x01, Offset: 8, Size: 8, Value: 0
^C
MarvinMynx commented 1 year ago

And now I have DATA STALE again, it's that often a Day... systemctl status nut-driver.service; systemctl status nut-server.service; systemctl status nut-client.service

● nut-driver.service - Network UPS Tools - power device driver controller
     Loaded: loaded (/lib/systemd/system/nut-driver.service; static)
     Active: failed (Result: exit-code) since Tue 2023-02-21 19:15:12 CET; 1h 5min ago
    Process: 2124171 ExecStart=/sbin/upsdrvctl start (code=exited, status=0/SUCCESS)
    Process: 2124197 ExecStop=/sbin/upsdrvctl stop (code=exited, status=1/FAILURE)
   Main PID: 2124175 (code=exited, status=0/SUCCESS)
        CPU: 9ms

Feb 21 19:15:12 pve upsdrvctl[2124173]: Network UPS Tools - Generic HID driver 0.41 (2.7.4)
Feb 21 19:15:12 pve upsdrvctl[2124173]: USB communication driver 0.33
Feb 21 19:15:12 pve upsdrvctl[2124171]: Network UPS Tools - UPS driver controller 2.7.4
Feb 21 19:15:12 pve usbhid-ups[2124175]: Startup successful
Feb 21 19:15:12 pve systemd[1]: Started Network UPS Tools - power device driver controller.
Feb 21 19:15:12 pve usbhid-ups[2124175]: Signal 15: exiting
Feb 21 19:15:12 pve upsdrvctl[2124197]: Can't open /run/nut/usbhid-ups-auto.pid: No such file or directory
Feb 21 19:15:12 pve upsdrvctl[2124197]: Network UPS Tools - UPS driver controller 2.7.4
Feb 21 19:15:12 pve systemd[1]: nut-driver.service: Control process exited, code=exited, status=1/FAILURE
Feb 21 19:15:12 pve systemd[1]: nut-driver.service: Failed with result 'exit-code'.
● nut-server.service - Network UPS Tools - power devices information server
     Loaded: loaded (/lib/systemd/system/nut-server.service; enabled; vendor preset: enabled)
     Active: active (running) since Tue 2023-02-21 19:15:12 CET; 1h 5min ago
    Process: 2124176 ExecStart=/sbin/upsd (code=exited, status=0/SUCCESS)
   Main PID: 2124177 (upsd)
      Tasks: 1 (limit: 38268)
     Memory: 700.0K
        CPU: 79ms
     CGroup: /system.slice/nut-server.service
             └─2124177 /lib/nut/upsd

Feb 21 19:15:12 pve upsd[2124176]: fopen /run/nut/upsd.pid: No such file or directory
Feb 21 19:15:12 pve upsd[2124176]: listening on 0.0.0.0 port 3493
Feb 21 19:15:12 pve upsd[2124176]: listening on 0.0.0.0 port 3493
Feb 21 19:15:12 pve upsd[2124176]: Connected to UPS [powerwalker]: usbhid-ups-powerwalker
Feb 21 19:15:12 pve upsd[2124176]: Connected to UPS [powerwalker]: usbhid-ups-powerwalker
Feb 21 19:15:12 pve upsd[2124177]: Startup successful
Feb 21 19:15:12 pve systemd[1]: Started Network UPS Tools - power devices information server.
Feb 21 19:15:12 pve upsd[2124177]: Can't connect to UPS [powerwalker] (usbhid-ups-powerwalker): No such file or directory
Feb 21 19:15:19 pve upsd[2124177]: Connected to UPS [powerwalker]: usbhid-ups-powerwalker
Feb 21 20:18:12 pve upsd[2124177]: Data for UPS [powerwalker] is stale - check driver
● nut-monitor.service - Network UPS Tools - power device monitor and shutdown controller
     Loaded: loaded (/lib/systemd/system/nut-monitor.service; enabled; vendor preset: enabled)
     Active: active (running) since Tue 2023-02-21 19:15:12 CET; 1h 5min ago
    Process: 2124189 ExecStart=/sbin/upsmon (code=exited, status=0/SUCCESS)
   Main PID: 2124191 (upsmon)
      Tasks: 2 (limit: 38268)
     Memory: 912.0K
        CPU: 72ms
     CGroup: /system.slice/nut-monitor.service
             ├─2124190 /lib/nut/upsmon
             └─2124191 /lib/nut/upsmon

Feb 21 20:19:32 pve upsmon[2124191]: Poll UPS [powerwalker@localhost] failed - Data stale
Feb 21 20:19:37 pve upsmon[2124191]: Poll UPS [powerwalker@localhost] failed - Data stale
Feb 21 20:19:42 pve upsmon[2124191]: Poll UPS [powerwalker@localhost] failed - Data stale
Feb 21 20:19:47 pve upsmon[2124191]: Poll UPS [powerwalker@localhost] failed - Data stale
Feb 21 20:19:52 pve upsmon[2124191]: Poll UPS [powerwalker@localhost] failed - Data stale
Feb 21 20:19:57 pve upsmon[2124191]: Poll UPS [powerwalker@localhost] failed - Data stale
Feb 21 20:20:02 pve upsmon[2124191]: Poll UPS [powerwalker@localhost] failed - Data stale
Feb 21 20:20:07 pve upsmon[2124191]: Poll UPS [powerwalker@localhost] failed - Data stale
Feb 21 20:20:12 pve upsmon[2124191]: Poll UPS [powerwalker@localhost] failed - Data stale
Feb 21 20:20:17 pve upsmon[2124191]: Poll UPS [powerwalker@localhost] failed - Data stale

upscmd -l powerwalker

Error: Data stale

upsc powerwalker

Init SSL without certificate database
Error: Data stale
MarvinMynx commented 1 year ago

I left the SSH Session open this time and got further confused with this Messages:

Broadcast message from root@pve (somewhere) (Tue Feb 21 20:28:17 2023):

UPS powerwalker@localhost is unavailable

Broadcast message from root@pve (somewhere) (Tue Feb 21 20:33:22 2023):

UPS powerwalker@localhost is unavailable

Broadcast message from root@pve (somewhere) (Tue Feb 21 20:38:27 2023):

UPS powerwalker@localhost is unavailable

Broadcast message from root@pve (somewhere) (Tue Feb 21 20:43:32 2023):

UPS powerwalker@localhost is unavailable

Broadcast message from root@pve (somewhere) (Tue Feb 21 20:48:37 2023):

UPS powerwalker@localhost is unavailable

Broadcast message from root@pve (somewhere) (Tue Feb 21 20:48:57 2023):

Communications with UPS powerwalker@localhost established

Broadcast message from root@pve (somewhere) (Tue Feb 21 20:49:12 2023):

Communications with UPS powerwalker@localhost lost

systemctl status nut-driver.service; systemctl status nut-server.service; systemctl status nut-client.service

● nut-driver.service - Network UPS Tools - power device driver controller
     Loaded: loaded (/lib/systemd/system/nut-driver.service; static)
     Active: failed (Result: exit-code) since Tue 2023-02-21 19:15:12 CET; 1h 34min ago
    Process: 2124171 ExecStart=/sbin/upsdrvctl start (code=exited, status=0/SUCCESS)
    Process: 2124197 ExecStop=/sbin/upsdrvctl stop (code=exited, status=1/FAILURE)
   Main PID: 2124175 (code=exited, status=0/SUCCESS)
        CPU: 9ms

Feb 21 19:15:12 pve upsdrvctl[2124173]: Network UPS Tools - Generic HID driver 0.41 (2.7.4)
Feb 21 19:15:12 pve upsdrvctl[2124173]: USB communication driver 0.33
Feb 21 19:15:12 pve upsdrvctl[2124171]: Network UPS Tools - UPS driver controller 2.7.4
Feb 21 19:15:12 pve usbhid-ups[2124175]: Startup successful
Feb 21 19:15:12 pve systemd[1]: Started Network UPS Tools - power device driver controller.
Feb 21 19:15:12 pve usbhid-ups[2124175]: Signal 15: exiting
Feb 21 19:15:12 pve upsdrvctl[2124197]: Can't open /run/nut/usbhid-ups-auto.pid: No such file or directory
Feb 21 19:15:12 pve upsdrvctl[2124197]: Network UPS Tools - UPS driver controller 2.7.4
Feb 21 19:15:12 pve systemd[1]: nut-driver.service: Control process exited, code=exited, status=1/FAILURE
Feb 21 19:15:12 pve systemd[1]: nut-driver.service: Failed with result 'exit-code'.
● nut-server.service - Network UPS Tools - power devices information server
     Loaded: loaded (/lib/systemd/system/nut-server.service; enabled; vendor preset: enabled)
     Active: active (running) since Tue 2023-02-21 19:15:12 CET; 1h 34min ago
    Process: 2124176 ExecStart=/sbin/upsd (code=exited, status=0/SUCCESS)
   Main PID: 2124177 (upsd)
      Tasks: 1 (limit: 38268)
     Memory: 904.0K
        CPU: 106ms
     CGroup: /system.slice/nut-server.service
             └─2124177 /lib/nut/upsd

Feb 21 19:15:12 pve upsd[2124176]: Connected to UPS [powerwalker]: usbhid-ups-powerwalker
Feb 21 19:15:12 pve upsd[2124176]: Connected to UPS [powerwalker]: usbhid-ups-powerwalker
Feb 21 19:15:12 pve upsd[2124177]: Startup successful
Feb 21 19:15:12 pve systemd[1]: Started Network UPS Tools - power devices information server.
Feb 21 19:15:12 pve upsd[2124177]: Can't connect to UPS [powerwalker] (usbhid-ups-powerwalker): No such file or directory
Feb 21 19:15:19 pve upsd[2124177]: Connected to UPS [powerwalker]: usbhid-ups-powerwalker
Feb 21 20:18:12 pve upsd[2124177]: Data for UPS [powerwalker] is stale - check driver
Feb 21 20:48:52 pve upsd[2124177]: Send ping to UPS [powerwalker] failed: Resource temporarily unavailable
Feb 21 20:48:54 pve upsd[2124177]: Connected to UPS [powerwalker]: usbhid-ups-powerwalker
Feb 21 20:49:11 pve upsd[2124177]: Data for UPS [powerwalker] is stale - check driver
● nut-monitor.service - Network UPS Tools - power device monitor and shutdown controller
     Loaded: loaded (/lib/systemd/system/nut-monitor.service; enabled; vendor preset: enabled)
     Active: active (running) since Tue 2023-02-21 19:15:12 CET; 1h 34min ago
    Process: 2124189 ExecStart=/sbin/upsmon (code=exited, status=0/SUCCESS)
   Main PID: 2124191 (upsmon)
      Tasks: 3 (limit: 38268)
     Memory: 1.1M
        CPU: 143ms
     CGroup: /system.slice/nut-monitor.service
             ├─2124190 /lib/nut/upsmon
             ├─2124191 /lib/nut/upsmon
             └─2293927 /usr/sbin/upssched Communications with UPS powerwalker@localhost lost

Feb 21 20:49:13 pve upssched[2293927]: New timer: commbad (30 seconds)
Feb 21 20:49:17 pve upsmon[2124191]: Poll UPS [powerwalker@localhost] failed - Data stale
Feb 21 20:49:22 pve upsmon[2124191]: Poll UPS [powerwalker@localhost] failed - Data stale
Feb 21 20:49:27 pve upsmon[2124191]: Poll UPS [powerwalker@localhost] failed - Data stale
Feb 21 20:49:32 pve upsmon[2124191]: Poll UPS [powerwalker@localhost] failed - Data stale
Feb 21 20:49:37 pve upsmon[2124191]: Poll UPS [powerwalker@localhost] failed - Data stale
Feb 21 20:49:42 pve upsmon[2124191]: Poll UPS [powerwalker@localhost] failed - Data stale
Feb 21 20:49:43 pve upssched[2293927]: Event: commbad
Feb 21 20:49:47 pve upsmon[2124191]: Poll UPS [powerwalker@localhost] failed - Data stale
Feb 21 20:49:52 pve upsmon[2124191]: Poll UPS [powerwalker@localhost] failed - Data stale
jimklimov commented 1 year ago

can't build

That's odd - Proxmox being based on Debian. In fact got one running as NUT testbed and part of CI farm. You may have to install tools and other prerequisites, see docs/config-prereqs.txt

jimklimov commented 1 year ago

The driver log literally says Got disconnected by another driver: Device or resource busy - do you need an even more smoking gun? ;)

If your drivers are managed by systemd, do not intrude with other methods, same as for any other services.

jimklimov commented 1 year ago

Note: NUT 2.7.4 had all drivers under a single nut-driver.service (so all drvs were restarted by the unit if you had several devices to watch). 2.8.0+ has it granular, with each ups.conf section wrapped by a nut-driver@UPSNAME.service instance (courtesy of nut-driver-enumerator script and service).

MarvinMynx commented 1 year ago

The driver log literally says Got disconnected by another driver: Device or resource busy - do you need an even more smoking gun? ;)

If your drivers are managed by systemd, do not intrude with other methods, same as for any other services.

Yeah but which other Driver and why? I don't get it? Because it does this even if I don't intrude at all.

Note: NUT 2.7.4 had all drivers under a single nut-driver.service (so all drvs were restarted by the unit if you had several devices to watch). 2.8.0+ has it granular, with each ups.conf section wrapped by a nut-driver@UPSNAME.service instance (courtesy of nut-driver-enumeratorscript and service).

Okay, but i have only one UPS Device connected.

can't build

That's odd - Proxmox being based on Debian. In fact got one running as NUT testbed and part of CI farm. You may have to install tools and other prerequisites, see docs/config-prereqs.txt

I have read the Document to the Point of:

mkdir -p nut && cd nut && \
    git clone https://github.com/networkupstools/nut/ -b master .
./autogen.sh && \
    ./configure --with-doc=all --with-all --with-cgi && \
    make all && make check && make spellcheck

Can you please help me with how to do this? I never build something at all for Linux. Which Packages do I need to Install for example.

One the Above Command I get the following Error Message:

./autogen.sh                                                                                                    
Regenerating Augeas ups.conf lens with 'python3'...
Regenerating the USB helper files...
Calling autoreconf...
./autogen.sh: 127: autoreconf: not found
FAILED: did not generate an executable configure script!

# Note: on some systems "autoreconf", "automake" et al are dispatcher
# scripts, and need you to explicitly say which version you want, e.g.
#    export AUTOCONF_VERSION=2.65 AUTOMAKE_VERSION=1.13
# If you get issues with AC_DISABLE_STATIC make sure you have libtool.

What exactly does export AUTOCONF_VERSION=2.65 do,despite assinging a Variable?, and why do I need to do this?

jimklimov commented 1 year ago

Try reading more, and also the layman text around command blocks :) That document goes to greater detail listing packages to install for different OSes (notes from CI farm which looks at a lot of those).

Which other driver

As I wrote earlier, you seem to have a conflict of driver daemon started by systemd (per nut-driver.service, monolithic earlier or instantiated later), and separately one you launch or kill by direct calls to upsdrvctl. These are two separate daemons trying to get exclusive acccess to same USB port. When you do upsdrvctl stop, systemd restarts the deceased service because it must. Then you do upsdrvctl start, and the two driver processes elbow each other away.

Try to systemctl restart nut-driver in your udev rules, if that helps easier with your older NUT installation.

jimklimov commented 1 year ago

What exactly does export AUTOCONF_VERSION=2.65 do, and why do I need to do this?

It sets an environment variable in your shell, exported to be inherited by its later children (such as the build programs and scripts).

On some systems (e.g. OpenBSD) autoSOMETHING filenames are dispatching wrappers that call a specific version, as specified by such envvar. Haven't seen that on mainstream Linux, but there are many distros out there...

Somehow people are expected to be aware if not fluent in systems they use :) No fault at that, never late to start :)

MarvinMynx commented 1 year ago

Try reading more, and also the layman text around command blocks :) That document goes to greater detail listing packages to install for different OSes (notes from CI farm which looks at a lot of those).

Which other driver

As I wrote earlier, you seem to have a conflict of driver daemon started by systemd (per nut-driver.service, monolithic earlier or instantiated later), and separately one you launch or kill by direct calls to upsdrvctl. These are two separate daemons trying to get exclusive acccess to same USB port. When you do upsdrvctl stop, systemd restarts the deceased service because it must. Then you do upsdrvctl start, and the two driver processes elbow each other away.

Try to systemctl restart nut-driver in your udev rules, if that helps easier with your older NUT installation.

But as far as i can see that's not what is happening. The other way around would make more sense to me Since it is the First NUT Installation and I only started to use systemctl start/stop/ect. nut-driver after I discovered it while I was trying to Debug. Before I noticed that I had a Problem, I only ever used this:

sudo service nut-server restart
sudo service nut-client restart
sudo systemctl restart nut-monitor
sudo upsdrvctl stop
sudo upsdrvctl start

To Start or Restart NUT. That's why I stopped and disabled the nut-driver systemd unit again and reverted to using upsdrvctl stop/start exclusively again today. But I don't know which way is better or intended and why one would be better than the other.

What exactly does export AUTOCONF_VERSION=2.65 do, and why do I need to do this?

It sets an environment variable in your shell, exported to be inherited by its later children (such as the build programs and scripts).

On some systems (e.g. OpenBSD) autoSOMETHING filenames are dispatching wrappers that call a specific version, as specified by such envvar. Haven't seen that on mainstream Linux, but there are many distros out there...

Somehow people are expected to be aware if not fluent in systems they use :) No fault at that, never late to start :)

Well yeah ^^" I'm honest up until now I never needed to build something on Linux. I got along pretty well at work and at home without building something ^^" And it always seemed so complex. Don't I need to install the make Package for example? and other build tools? Don't I need src Repos to build something? Or will mindlessly exporting the aforementioned Variable work out?

I've read the Doc file further along, ignoring that i can't Reproduce the aforementioned Command, and got to this:

apt-get install \
    ccache time \
    git python perl curl \
    make autoconf automake libltdl-dev libtool-bin libtool \
    valgrind \
    cppcheck \
    pkg-config \
    gcc g++ clang

This will Install A LOT OF STUFF. Is this actually needed / Recommended?

The following additional packages will be installed:
  autotools-dev binfmt-support clang-11 cpp cpp-10 g++-10 gcc-10 gdb lib32gcc-s1 lib32stdc++6 libasan6 libatomic1
  libboost-regex1.74.0 libc-dev-bin libc-devtools libc6-dbg libc6-dev libc6-i386 libcc1-0 libclang-common-11-dev
  libclang-cpp11 libclang1-11 libcrypt-dev libdebuginfod1 libdpkg-perl libffi-dev libfile-fcntllock-perl libgcc-10-dev
  libipt2 libisl23 libitm1 libllvm11 liblsan0 libmpc3 libmpfr6 libncurses-dev libnsl-dev libobjc-10-dev libobjc4
  libomp-11-dev libomp5-11 libpfm4 libpython2-stdlib libpython2.7-minimal libpython2.7-stdlib libquadmath0 libsigsegv2
  libsource-highlight-common libsource-highlight4v5 libstdc++-10-dev libtinfo-dev libtinyxml2-8 libtirpc-dev libtsan0
  libubsan1 libz3-4 libz3-dev linux-libc-dev llvm-11 llvm-11-dev llvm-11-runtime llvm-11-tools m4 manpages-dev python2
  python2-minimal python2.7 python2.7-minimal python3-pygments valgrind-dbg
Suggested packages:
  autoconf-archive gnu-standards autoconf-doc gettext distcc | icecc clang-11-doc cpp-doc gcc-10-locales cppcheck-gui
  clang-tidy g++-multilib g++-10-multilib gcc-10-doc gcc-multilib flex bison gcc-doc gcc-10-multilib gdb-doc gdbserver
  glibc-doc debian-keyring bzr libtool-doc ncurses-doc libomp-11-doc libstdc++-10-doc gfortran | fortran95-compiler
  gcj-jdk llvm-11-doc m4-doc dpkg-dev python2-doc python-tk python2.7-doc python-pygments-doc ttf-bitstream-vera
  valgrind-mpi kcachegrind alleyoop valkyrie
The following NEW packages will be installed:
  autoconf automake autotools-dev binfmt-support ccache clang clang-11 cpp cpp-10 cppcheck g++ g++-10 gcc gcc-10 gdb
  lib32gcc-s1 lib32stdc++6 libasan6 libatomic1 libboost-regex1.74.0 libc-dev-bin libc-devtools libc6-dbg libc6-dev
  libc6-i386 libcc1-0 libclang-common-11-dev libclang-cpp11 libclang1-11 libcrypt-dev libdebuginfod1 libdpkg-perl
  libffi-dev libfile-fcntllock-perl libgcc-10-dev libipt2 libisl23 libitm1 libllvm11 liblsan0 libltdl-dev libmpc3
  libmpfr6 libncurses-dev libnsl-dev libobjc-10-dev libobjc4 libomp-11-dev libomp5-11 libpfm4 libpython2-stdlib
  libpython2.7-minimal libpython2.7-stdlib libquadmath0 libsigsegv2 libsource-highlight-common libsource-highlight4v5
  libstdc++-10-dev libtinfo-dev libtinyxml2-8 libtirpc-dev libtool libtool-bin libtsan0 libubsan1 libz3-4 libz3-dev
  linux-libc-dev llvm-11 llvm-11-dev llvm-11-runtime llvm-11-tools m4 manpages-dev pkg-config python-is-python2
  python2 python2-minimal python2.7 python2.7-minimal python3-pygments valgrind valgrind-dbg
0 upgraded, 83 newly installed, 0 to remove and 0 not upgraded.
Need to get 251 MB of archives.
After this operation, 946 MB of additional disk space will be used.
Do you want to continue? [Y/n]

Should this be installed on a Production Like system of my own?

jimklimov commented 1 year ago

Not too much of addition really (deps for CGI and docs would have a big footprint though, so listed separately; you might also choose just one of clang or gcc/g++), and should not be a problem for a production system unless you're in some regulated environment or with a very small rootfs.

With proxmox, technically you can easily make a container with same Debian version and all the tools, pick the configure parameters from distro source package (debian/rules file), build NUT there and make install DESTDIR=/tmp/nut, tarball the result from /tmp/nut and unpack it on your main OS.

Not sure I want to recommend that with your current proclaimed level of Linux proficiency, but as far as "doable" - yes, it certainly is :) And sorry, but I can't tap a crash course on systems administration and packaging here in finite time ;}

jimklimov commented 1 year ago

As for service start/stop, I'd expect the original distro's NUT packages that you installed to have registered, enabled and started the systemd services. But maybe I'm thinking too well of them.

MarvinMynx commented 1 year ago

Not too much of addition really (deps for CGI and docs would have a big footprint though, so listed separately; you might also choose just one of clang or gcc/g++), and should not be a problem for a production system unless you're in some regulated environment or with a very small rootfs.

With proxmox, technically you can easily make a container with same Debian version and all the tools, pick the configure parameters from distro source package (debian/rules file), build NUT there and make install DESTDIR=/tmp/nut, tarball the result from /tmp/nut and unpack it on your main OS.

Not sure I want to recommend that with your current proclaimed level of Linux proficiency, but as far as "doable" - yes, it certainly is :) And sorry, but I can't tap a crash course on systems administration and packaging here in finite time ;}

No Problem I very much thank you for all the Replays so far. And I will get an RHEL Course later this Year from Work so that hopefully will help a lot too :)

I will Install these Packages on the main System without the LXC Container because yeah ^^" as you mentioned, it is easier ^^" But I will do so, tomorrow Because it near midnight here in Germany ^^"

As for service start/stop, I'd expect the original distro's NUT packages that you installed to have registered, enabled and started the systemd services. But maybe I'm thinking too well of them.

I think you are because nothing was started or enabled after just installing the Packages. I think the systemd Services were available though. I'm not sure if I checked ^^" It's also possible that I just used the wrong Command to start up NUT the whole time ^^" if I'm honest I must admit that I just followed a guide on how to set up NUT. That Guide is 1 Year old though maybe this has changed in that time and that's why I'm so confused.

Again thank you very much for all of your replays today :)

jimklimov commented 1 year ago

FYI: the https://github.com/networkupstools/nut/wiki/Building-NUT-for-in%E2%80%90place-upgrades-or-non%E2%80%90disruptive-tests also touches on this, and was recently added into INSTALL.nut document.

MarvinMynx commented 1 year ago

As for service start/stop, I'd expect the original distro's NUT packages that you installed to have registered, enabled and started the systemd services. But maybe I'm thinking too well of them.

Okay I now switched from:

sudo service nut-server restart
sudo service nut-client restart
sudo systemctl restart nut-monitor
sudo upsdrvctl stop
sudo upsdrvctl start

to:

systemctl restart nut-server; systemctl restart nut-client; systemctl restart nut-monitor; systemctl restart nut-driver.service

And changed the udev Rule accordingly to systemctl restart nut-driver.service.

But it doesn't Change anythin. After an Hour or so, i still get DATA STALE Again.

so, I don't know what's up with systemd and stuff, I still don't get it.

Will try to Build but after what I've seen p until now, I think this won't resolve my issues. Kind of losing my mind with this.

╰─❯ systemctl status nut-driver.service; systemctl status nut-server.service; systemctl status nut-client.service    ─╯
● nut-driver.service - Network UPS Tools - power device driver controller
     Loaded: loaded (/lib/systemd/system/nut-driver.service; static)
     Active: active (running) since Wed 2023-02-22 12:22:53 CET; 8s ago
    Process: 3991041 ExecStart=/sbin/upsdrvctl start (code=exited, status=0/SUCCESS)
   Main PID: 3991177 (usbhid-ups)
      Tasks: 1 (limit: 38268)
     Memory: 480.0K
        CPU: 24ms
     CGroup: /system.slice/nut-driver.service
             └─3991177 /lib/nut/usbhid-ups -a powerwalker

Feb 22 12:22:52 pve systemd[1]: Starting Network UPS Tools - power device driver controller...
Feb 22 12:22:53 pve upsdrvctl[3991042]: Using subdriver: MGE HID 1.40
Feb 22 12:22:53 pve upsdrvctl[3991042]: Network UPS Tools - Generic HID driver 0.41 (2.7.4)
Feb 22 12:22:53 pve upsdrvctl[3991042]: USB communication driver 0.33
Feb 22 12:22:53 pve upsdrvctl[3991041]: Network UPS Tools - UPS driver controller 2.7.4
Feb 22 12:22:53 pve usbhid-ups[3991177]: Startup successful
Feb 22 12:22:53 pve systemd[1]: Started Network UPS Tools - power device driver controller.
● nut-server.service - Network UPS Tools - power devices information server
     Loaded: loaded (/lib/systemd/system/nut-server.service; enabled; vendor preset: enabled)
     Active: active (running) since Wed 2023-02-22 12:22:52 CET; 9s ago
    Process: 3991026 ExecStart=/sbin/upsd (code=exited, status=0/SUCCESS)
   Main PID: 3991027 (upsd)
      Tasks: 1 (limit: 38268)
     Memory: 684.0K
        CPU: 4ms
     CGroup: /system.slice/nut-server.service
             └─3991027 /lib/nut/upsd

Feb 22 12:22:52 pve systemd[1]: Starting Network UPS Tools - power devices information server...
Feb 22 12:22:52 pve upsd[3991026]: fopen /run/nut/upsd.pid: No such file or directory
Feb 22 12:22:52 pve upsd[3991026]: listening on 0.0.0.0 port 3493
Feb 22 12:22:52 pve upsd[3991026]: listening on 0.0.0.0 port 3493
Feb 22 12:22:52 pve upsd[3991026]: Connected to UPS [powerwalker]: usbhid-ups-powerwalker
Feb 22 12:22:52 pve upsd[3991026]: Connected to UPS [powerwalker]: usbhid-ups-powerwalker
Feb 22 12:22:52 pve upsd[3991027]: Startup successful
Feb 22 12:22:52 pve systemd[1]: Started Network UPS Tools - power devices information server.
Feb 22 12:22:52 pve upsd[3991027]: Can't connect to UPS [powerwalker] (usbhid-ups-powerwalker): No such file or directo>
Feb 22 12:22:54 pve upsd[3991027]: Connected to UPS [powerwalker]: usbhid-ups-powerwalker
● nut-monitor.service - Network UPS Tools - power device monitor and shutdown controller
     Loaded: loaded (/lib/systemd/system/nut-monitor.service; enabled; vendor preset: enabled)
     Active: active (running) since Wed 2023-02-22 12:22:52 CET; 14s ago
    Process: 3991035 ExecStart=/sbin/upsmon (code=exited, status=0/SUCCESS)
   Main PID: 3991037 (upsmon)
      Tasks: 2 (limit: 38268)
     Memory: 896.0K
        CPU: 4ms
     CGroup: /system.slice/nut-monitor.service
             ├─3991036 /lib/nut/upsmon
             └─3991037 /lib/nut/upsmon

Feb 22 12:22:52 pve systemd[1]: Starting Network UPS Tools - power device monitor and shutdown controller...
Feb 22 12:22:52 pve upsmon[3991035]: fopen /run/nut/upsmon.pid: No such file or directory
Feb 22 12:22:52 pve upsmon[3991035]: Using power down flag file /etc/killpower
Feb 22 12:22:52 pve upsmon[3991035]: UPS: powerwalker@localhost (master) (power value 1)
Feb 22 12:22:52 pve upsmon[3991036]: Startup successful
Feb 22 12:22:52 pve systemd[1]: nut-monitor.service: Can't open PID file /run/nut/upsmon.pid (yet?) after start: Operat>
Feb 22 12:22:52 pve systemd[1]: nut-monitor.service: Supervising process 3991037 which is not our child. We'll most lik>
Feb 22 12:22:52 pve upsmon[3991037]: Init SSL without certificate database
Feb 22 12:22:52 pve upsmon[3991037]: Login on UPS [powerwalker@localhost] failed - got [ERR ACCESS-DENIED]
Feb 22 12:22:52 pve systemd[1]: Started Network UPS Tools - power device monitor and shutdown controller.
MarvinMynx commented 1 year ago

Would I need to Reboot to Apply changes to the udev rule properly? that would maybe explain my Last comment.

But the nut-driver isn't Failing like it would when I use upsdrvctl start, so I don't think that this is the case.

man, I really feel like I'm missing some better way of diagnosing or something, because I don't really "see" what's happing and when... it's really frustrating :/

jimklimov commented 1 year ago

In the years leading up to 2.8.0 release (and after it too) there was a lot of effort into improving debug-ability like this, including a DEBUG_MIN setting in various daemons' config files to avoid messing with init scripts or units to trace how they go about their life in production mode (avoiding "works for me" effect with a root shell vs. service context, etc.)

Understandably, the 2.7.4 once released (and packaged by distros) is set in stone and there's only so much we can do to easily debug it. That said, it is possible to e.g. add -D flags for daemons into respective *.service files for higher debug verbosity -- which would make the daemons foregrounded so you may have to fiddle with their service Type (simple vs. forking) as well, if that would help discover more hints.

The "ERR ACCESS-DENIED" suggests some problem logging in from upsmon client to upsd server - check MONITOR lines with passwords in upsmon.conf, and user definitions in upsd.users, and that these files are only(!) readable by NUT run-time user/group. I think daemons may refuse to use these files if their protection is too lax.

For udev, a reboot should help, but it may suffice to restart its service (may have to track down the name in your distro, see suggestions in the wiki article linked above).

MarvinMynx commented 1 year ago

The "ERR ACCESS-DENIED" suggests some problem logging in from upsmon client to upsd server - check MONITOR lines with passwords in upsmon.conf, and user definitions in upsd.users, and that these files are only(!) readable by NUT run-time user/group. I think daemons may refuse to use these files if their protection is too lax.

Okay, The Permissions are correct per Default, I think. And the Password in Both Files does definitely Match. I checked this before a thousand times :(

ll /etc/nut/upsmon.conf
.rw-r----- root nut 1.1 KB Tue Feb 21 14:56:38 2023  /etc/nut/upsmon.conf

ll /etc/nut/upsd.users
.rw-r----- root nut 48 B Tue Feb 21 14:53:54 2023  /etc/nut/upsd.users

cat /etc/nut/upsmon.conf | grep "Password"
MONITOR powerwalker@localhost 1 admin Password master

cat /etc/nut/upsd.users | grep "Password"
  password = Password
MarvinMynx commented 1 year ago

mkdir -p nut && cd nut && \ git clone https://github.com/networkupstools/nut/ -b master . ./autogen.sh && \ ./configure --with-doc=all --with-all --with-cgi && \ make all && make check && make spellcheck

Since nothing else is working or does make sense to me, I now installed all the Dependencies according to the Docs:

apt-get install ccache time git python perl curl make autoconf automake libltdl-dev libtool-bin libtool valgrind cppcheck pkg-config gcc g++ clang python3 python3.9 aspell-en asciidoc source-highlight python3-pygments dblatex libgd-dev libsystemd-dev libcppunit-dev libssl-dev libnss3-dev augeas-tools libaugeas-dev augeas-lenses libusb-dev libusb-1.0-0-dev libi2c-dev libmodbus-dev libsn

And then ran:

./autogen.sh

And:

./configure --with-doc=all --with-all --with-cgi

Got an Error on the Last command, STILL Missing Dependencies?

configure: error: neon libraries not found, required for neon based XML/HTTP driver
MarvinMynx commented 1 year ago

Installed Additional Packages, where I thought I didn't need them while reading the DOC.

apt-get install lua5.1-dev bash dash ksh busybox libneon27-dev

And then did ./autogen.sh and ./configure --with-doc=all --with-all --with-cgi again. It seems like it ran through this time.

MarvinMynx commented 1 year ago

I now ran

make all && make check && make spellcheck

and it seems like it has been completed successfully. I should now have a/Multiple local .deb file(s) somewhere that I need to install via apt, correct? Where would I find that .deb file(s)?

MarvinMynx commented 1 year ago

Were my previous "configure" and "make" commands even correct? Or would I need one of the following? Or is both Possible? (Pros / Cons / What's Recommended?)

:; cd /tmp
:; git clone https://github.com/networkupstools/nut
:; cd nut
:; ./autogen.sh
:; ./configure --enable-inplace-runtime # --maybe-some-other-options
:; make -j 4 all check && sudo make install
...
:; make -j 4 all check && \
   { sudo systemctl stop nut-monitor nut-server || true ; } && \
   { sudo systemctl stop nut-driver.service || true ; } && \
   { sudo systemctl stop nut-driver.target || true ; } && \
   { sudo systemctl stop nut.target || true ; } && \
   sudo make install && \
   sudo systemctl daemon-reload && \
   sudo systemd-tmpfiles --create && \
   sudo systemctl disable nut.target nut-driver.target nut-monitor nut-server nut-driver-enumerator.path nut-driver-enumerator.service && \
   sudo systemctl enable  nut.target nut-driver.target nut-monitor nut-server nut-driver-enumerator.path nut-driver-enumerator.service && \
   { sudo systemctl restart udev || true ; } && \
   sudo systemctl restart nut-driver-enumerator.service nut-monitor nut-server
jimklimov commented 1 year ago

Sort of both. The first block (except last line with make install) is the ... in the second block :)

The first part is about building and installing (in-place overwrite, no packaging involved) a new NUT version on more or less any OS. The second part focuses on Linux with systemd. I believe Wiki article text and section titles imply that ;)

jimklimov commented 1 year ago

NUT does not currently include packaging recipes (or very few - e.g. a reference one for Solaris/illumos) since it is distros' concern about where files are laid out and how users are named, etc. Can't make one recipe here that would satisfy everyone in the field. Even prerequisite package names (tools/deps) differ between distros and even their releases.

There is a long-standing low-priority issue to trawl deb, spec, ... recipes in popular distros and place them into NUT sources as examples/references usable for a make package action, sort of "better than nothing", but it was not much pursued yet.

MarvinMynx commented 1 year ago

Sort of both. The first block (except last line with make install) is the ... in the second block :)

The first part is about building and installing (in-place overwrite, no packaging involved) a new NUT version on more or less any OS. The second part focuses on Linux with systemd. I believe Wiki article text and section titles imply that ;)

So as soon as systemctl is working/present on a system and can start some systemd services, I have i Linux system with systemd, isn't that correct?

Okay, I was unclear earlier. Which of the 3 Should I Use?

mkdir -p nut && cd nut && \
    git clone https://github.com/networkupstools/nut/ -b master .
./autogen.sh && \
    ./configure --with-doc=all --with-all --with-cgi && \
    make all && make check && make spellcheck
:; cd /tmp
:; git clone https://github.com/networkupstools/nut
:; cd nut
:; ./autogen.sh
:; ./configure --enable-inplace-runtime # --maybe-some-other-options
:; make -j 4 all check && sudo make install
:; cd /tmp
:; git clone https://github.com/networkupstools/nut
:; cd nut
:; ./autogen.sh
:; ./configure --enable-inplace-runtime # --maybe-some-other-options
:; make -j 4 all check && \
   { sudo systemctl stop nut-monitor nut-server || true ; } && \
   { sudo systemctl stop nut-driver.service || true ; } && \
   { sudo systemctl stop nut-driver.target || true ; } && \
   { sudo systemctl stop nut.target || true ; } && \
   sudo make install && \
   sudo systemctl daemon-reload && \
   sudo systemd-tmpfiles --create && \
   sudo systemctl disable nut.target nut-driver.target nut-monitor nut-server nut-driver-enumerator.path nut-driver-enumerator.service && \
   sudo systemctl enable  nut.target nut-driver.target nut-monitor nut-server nut-driver-enumerator.path nut-driver-enumerator.service && \
   { sudo systemctl restart udev || true ; } && \
   sudo systemctl restart nut-driver-enumerator.service nut-monitor nut-server

was the First one correct? Or would I need one of the other two? After your last Replays, I would tend to use the last one, just because systemd is available on Proxmox.

MarvinMynx commented 1 year ago

Okay, I restarted the udev Service, I didn't do this before. Udev rule is still systemctrl, and Rebooted to be extra sure. It seems like the problem is resolved, but I still get wired errors on some Services But everything is working probably. These lines still really confuse me: (all on nut-monitor.service)

Feb 22 20:57:08 pve upsmon[92222]: fopen /run/nut/upsmon.pid: No such file or directory
Feb 22 20:57:08 pve upsmon[92223]: Startup successful
Feb 22 20:57:08 pve systemd[1]: nut-monitor.service: Supervising process 92224 which is not our child. We'll most likely not notice when it exists.
Feb 22 20:57:08 pve upsmon[92224]: Login on UPS [powerwalker@localhost] failed - got [ERR ACCESS-DENIED]
ll /run/nut/upsmon.pid
.rw-r--r-- root root 6 B Wed Feb 22 20:46:59 2023  /run/nut/upsmon.pid
ps aux | grep -i "ups"
root       92223  0.0  0.0   5036  2420 ?        Ss   20:57   0:00 /lib/nut/upsmon
root       92224  0.0  0.0   8964  3508 ?        S    20:57   0:00 /lib/nut/upsmon

nut-driver.service and nut-server.service are looking good at the moment. restarting just that nut-monitor-service will change nothing and do nothing despite changing the PID of upsmon AND the according Log Line "Supervising process PID" (same PID as through nut-monitor.service restarted upsmon). And the thing is, I never used something else than systemct to control nut-monitor.service or upsmon.

So, what is starting the first/second(?) Process which the systemd Service then is supervising? Looks like the system Service is starting upsmon two times in a row and kind of forgets about the first one immediately. And immediately after I always get failed - got [ERR ACCESS-DENIED] but everything is working including "upsc powerwalker"

MarvinMynx commented 1 year ago

You already told me that I should check the Password in the following two Files / Lines:

grep -Ri "abcd1234" /etc/nut/*.conf /etc/nut/*.users
/etc/nut/upsmon.conf:MONITOR powerwalker@localhost 1 admin abcd1234 master
/etc/nut/upsd.users:  password = abcd1234

But it is matching. Are there maybe limitations on which character can be used or how long the Password can be? Mine is 8 Chars/Digits Long and consists only of normal upper- or lower-case letters and Numbers. Nothing else. So I would be extremely surprised if this were too much.

MarvinMynx commented 1 year ago

Okay, I have DATA STALE Again... So restarting udev Service and/or rebooting after switching to systemd Services didn't work out either... So back to Plan B on how to properly build the current Version. I'm still unsure on how to proceed. with configure and make. (And I kind of still think that just upgrading won't resolve my issue anyways :/ )

Sorry really getting Headaches and Depressed here. Constantly thinking "Comm on it can't be that difficult" ...

I'm going to bed now, rage quitting for today... I'll read any replays tomorrow...

MarvinMynx commented 1 year ago

Okay, so I still don't know which Doc Part actually is needed to run... Since both are Part of the In-Place Upgrade Document and the Descriptions don't differ that much to me. https://github.com/networkupstools/nut/wiki/Building-NUT-for-in%E2%80%90place-upgrades-or-non%E2%80%90disruptive-tests#replacing-a-nut-deployment https://github.com/networkupstools/nut/wiki/Building-NUT-for-in%E2%80%90place-upgrades-or-non%E2%80%90disruptive-tests#replacing-a-systemd-deployment I'm not continuing until I know for certain that I'll build the correct thing, and not destroy my system or create dependency hell or something like this.

One Big Question mark in my Head is for example: What NUT-Deployment? Like when it's not systemd what is it then? Or in another section, I think I've read something like replacing-a-deb package or something, which is yet another command, I think. But when I'm going to install nut nut-client and nut-server apt packages the systemd unit files are deployed as part of the package, so what is it then? systemd or deb Package or nut Deploy? I don't get these terms at all...

MarvinMynx commented 1 year ago

I now ran the following:

git clone https://github.com/networkupstools/nut
cd nut
./autogen.sh
./configure --enable-inplace-runtime
make -j 4 all check

Configure had the following output:

NUT Configuration summary:
==========================

* configured version:   2.8.0.1 (v2.8.0-Windows-568-gf813c1404)
* build serial drivers: yes
* build USB drivers:    yes (libusb-1.0)
* build neon based XML driver:  yes
* enable Avahi support: yes
* build Powerman PDU client driver:     yes
* build Modbus driver:  yes
* build IPMI driver:    yes (FreeIPMI)
* build Mac OS X meta-driver:   no
* build i2c based drivers:      yes
* enable SSL support:   yes (OpenSSL)
* enable libwrap (tcp-wrappers) support:        yes
* enable libltdl (Libtool dlopen abstraction) support:  yes
* build nut-scanner:    yes
* build CGI programs:   no
* install NUT-Monitor desktop application:      no
* install PyNUT binding module: yes
* use default  Python  interpreter:     /usr/bin/python
* use specific Python2 interpreter:     /usr/bin/python2.7
* use specific Python3 interpreter:     /usr/bin/python3
* build and install documentation:      man=auto
* build specific documentation format(s):       yes  man
* build and install the development files:      no
* consider basic SMF support:   no
* consider basic systemd support:       yes
* build with tighter systemd support:   yes
* build C++11 codebase (client library, etc.):  yes
* build C++ tests with CPPUNIT: yes
* build SNMP drivers:   yes
* build SNMP drivers with statically linked lib(net)snmp:       no
* User to run as:       nobody
* Group of user to run as:      nogroup

NUT Paths:
----------

* Default installation prefix path:     /usr
* State file path:      /var/state/ups
* Unprivileged PID file path:   /var/state/ups
* Privileged PID file path:     /run
* Driver program path:  /usr/bin
* CGI program path:     /usr/cgi-bin
* HTML file path:       /usr/html
* Config file path:     /usr/etc
* Data file path:       /usr/share
* Tool program path:    /usr/bin
* System program path:  /usr/sbin
* System library path:  /usr/lib
* System exec-library path:     /usr/libexec

NUT Paths for third-party integrations:
---------------------------------------

* Default  Python  interpreter site-packages:   /usr/local/lib/python2.7/dist-packages
* Specific Python2 interpreter site-packages:   /usr/local/lib/python2.7/dist-packages
* Specific Python3 interpreter site-packages:   /usr/local/lib/python3.9/dist-packages
* pkg-config *.pc directory:    ${libdir}/pkgconfig => /usr/lib/pkgconfig
* Service units for systemd:    /lib/systemd/system
* Shutdown hooks for systemd:   /lib/systemd/system-shutdown
* Systemd-tmpfiles configs:     /usr/lib/tmpfiles.d
* Augeas lenses directory:      /usr/share/augeas/lenses/dist
* Udev rules directory: /lib/udev

NUT Build/Target system info:
-----------------------------

* Compact version of C compiler:        gcc (Debian 10.2.1-6) 10.2.1 20210110
* Compact version of C++ compiler:      g++ (Debian 10.2.1-6) 10.2.1 20210110
* Compact version of C preprocessor:    gcc (Debian 10.2.1-6) 10.2.1 20210110
* host env spec we run on:      x86_64-pc-linux-gnu
* host env spec we built on:    x86_64-pc-linux-gnu
* host env spec we built for:   x86_64-pc-linux-gnu
* host OS short spec we run on: x86_64-linux-gnu
* host OS short spec we built on:       x86_64-linux-gnu
* host OS short spec we built for:      x86_64-linux-gnu

NUT Compiler settings:
----------------------

* CC            : gcc
* CFLAGS        : -isystem /usr/local/include -g -O2 -Wno-reserved-identifier -Wno-unknown-warning-option -std=gnu99 -Wno-system-headers -Wall -Wextra -Wsign-compare -pedantic -Wno-error
* CXX           : g++
* CXXFLAGS      : -isystem /usr/local/include -g -O2 -Wno-reserved-identifier -Wno-unknown-warning-option -std=gnu++11 -Wno-system-headers -Wall -Wextra -Wno-error
* CPP           : gcc -E
* CPPFLAGS      :
* CONFIG_FLAGS  : --prefix=/usr --sbindir=/usr/sbin --bindir=/usr/bin

But now I need to know if the following command is the right one to Safely Replace my Running Version correctly:

{ sudo systemctl stop nut-monitor nut-server || true ; } && \
   { sudo systemctl stop nut-driver.service || true ; } && \
   { sudo systemctl stop nut-driver.target || true ; } && \
   { sudo systemctl stop nut.target || true ; } && \
   sudo make install && \
   sudo systemctl daemon-reload && \
   sudo systemd-tmpfiles --create && \
   sudo systemctl disable nut.target nut-driver.target nut-monitor nut-server nut-driver-enumerator.path nut-driver-enumerator.service && \
   sudo systemctl enable  nut.target nut-driver.target nut-monitor nut-server nut-driver-enumerator.path nut-driver-enumerator.service && \
   { sudo systemctl restart udev || true ; } && \
   sudo systemctl restart nut-driver-enumerator.service nut-monitor nut-server

I already have RUN_AS_USER in ups.conf, this should stay during the in-playce upgrade I strongly suggest. And I would have to delete the udev rule that I created manually.

But since I installed the deb Package via apt the Wiki says I would have to track down my build parameters and paths and stuff and not even a hint on how to do it or how to actually use these if I would already know how to track down these things. That's why I don't know which one is correct.

Also, read the Changelog Changes from 2.7.4 to 2.8.0:

- usbhid-ups: numeric data conversion from wire protocol to CPU representation
  in GetValue() was completely reworked, aiming to be correct on all CPU types.
  That said, regressions are possible and feedback is welcome.

so, I'm generally willing to give feedback with Version 2.8.1 after I Replaced it correctly with my current Version. Just wanted to let you know, in case there where misunderstandings.

MarvinMynx commented 1 year ago

It would also help if I could get clarification on my last post regarding the configured output.

NUT Paths:

  • Default installation prefix path: /usr
  • State file path: /var/state/ups
  • Unprivileged PID file path: /var/state/ups
  • Privileged PID file path: /run
  • Driver program path: /usr/bin
  • CGI program path: /usr/cgi-bin
  • HTML file path: /usr/html
  • Config file path: /usr/etc
  • Data file path: /usr/share
  • Tool program path: /usr/bin
  • System program path: /usr/sbin
  • System library path: /usr/lib
  • System exec-library path: /usr/libexec

Are these the Paths the Doc is Talking about that I would need to hunt down for my specific Packaging? If I would check on my system if these Paths exist and if the config path for example contains my current config, would it be the correct command to replace my installation? But I already can see that the Config Path differs from mine (/etc/nut/), so I'm again more confused than before because up until now, and according to your replays, I thought the systemd version would be the correct one. But I still need confirmation if my thoughts are correct. Like I'm running on the spot here. Without further input from anyone really, I can't proceed.

So please someone help...

MarvinMynx commented 1 year ago

Or are these two not on the same level like 1: 2: But 1: 1.1? Because the Configure is only described in the first one, and that describes I need to hunt down these paths and stuff, so if later is the case, I would need to hunt this down in either case, is that correct? It's unclear because both sections use the same Header Style...

https://github.com/networkupstools/nut/wiki/Building-NUT-for-in%E2%80%90place-upgrades-or-non%E2%80%90disruptive-tests#replacing-a-nut-deployment https://github.com/networkupstools/nut/wiki/Building-NUT-for-in%E2%80%90place-upgrades-or-non%E2%80%90disruptive-tests#replacing-a-systemd-deployment

It's not that I'm not reading the Docs Files and stuff, it's more that I think the Doc files are unclear in certain areas.

MarvinMynx commented 1 year ago

Okay, I've noticed that the two Versions really don't differ from one another at all. The only difference is the Reloading/enabling of the services... That totally confused me... I would just post one command, and for the systemd part I would make the header a little smaller and then just post the commands to first stop and then start and reload everything instead of duplicating it to a second make command one-liner. That confused me more than anything else in the last 36 Hours.

So, in fact, I would need to hunt down my paths and stuff in either case because its essentials are the same case. And I never read anything about how to actually do this or where to start or...

So less confused now, but still Running against a Brick wall not knowing how to proceed (How to get all of the appropriate pieces of information to correctly configure it)

Like I already downloaded a .rpm from RHEL8 Repos and looked inside, to get back some default files or track down default paths, but first, I think that that is not exactly what to do here, and second, there would be no indication (including the Doc Files again) on which info's exactly I need out of that File. (Like all the paths that are in the Package, or something else entirely?) And still, even if I had these pieces of information, I still don't see anything regarding how to use these in the configure command despite: "# --maybe-some-other-options".

The config Path mentioned by me a few moments ago for example, how would I provide the correct path to configure correctly? Nothing in the Docs as far as I can see.

I'm now stopping to Post again because at the moment there is nothing that I can do or provide or say that I didn't already and giving everyone who's following this Thread time to read and react.

jimklimov commented 1 year ago

Please, I must finally say this is not the right venue for learning about Linux, OSes or packaging. Just hard for me to pack years of learning into a dozen sentences, tapping on a phone during commute. You ask how, I link the docs which say how (maybe needs a dictionary to decipher though) and literally link to the RPM and DEB recipe files for common distros and you come back giving the impression you barely skimmed it after days of reading and trying. Am I putting more effort into solving your puzzle than you are?

That said, it is hard to guess the unclear parts of the docs precisely because of the experience, in all projects, so constructive feedback from "newcomers" and PRs to improve are welcome.

Back to the topic, RHEL recipes are of moderate use to you on a Debian system like Proxmox. The linked https://salsa.debian.org/debian/nut/-/blob/debian/debian/rules file lists the options they use.

Technically for "in-place" replacements, it suffices to match the config paths and run-time users, and replace the ways system starts NUT so it would run the new build. Overwriting all old binaries in the same places is a space-saving bonus but not a requirement.

jimklimov commented 1 year ago

As for Data Stale, did you try a shorter polling frequency and/or pollonly instead of default work by interrupts (assuming the UPS or port on USB hub become bored when there's no traffic for a while, and begins power-saving - so losing the link)?

When in last experiments it did become stale, did the systemd-managed driver restart work well (e.g. no longer got two drivers pulling the rug from each other)?

Note that with 2.8.0 installed you should comment away the part with restarts (in fact there would be an udev.hwdb instead of udev.rules IIRC) since the goal/hope is that the newer driver reconnects better on its own.

jimklimov commented 1 year ago

Also one of the threads recently asked about systemd complaints about upsmon PID file - these are expected (search the issue tracker for details) due to multi-process architecture of it.

jimklimov commented 1 year ago
  • User to run as: nobody
  • Group of user to run as: nogroup

I wonder if that causes issues after all (e.g. some files/dirs get owned by that instead of nut inherited from packaging). Perhaps an explicit --with-user=... and --with-group=... would fare better to build-in same account names.

MarvinMynx commented 1 year ago

wow okay...

Please, I must finally say this is not the right venue for learning about Linux, OSes or packaging. Just hard for me to pack years of learning into a dozen sentences, tapping on a phone during commute. You ask how, I link the docs which say how (maybe needs a dictionary to decipher though) and literally link to the RPM and DEB recipe files for common distros and you come back giving the impression you barely skimmed it after days of reading and trying. Am I putting more effort into solving your puzzle than you are?

I looked up the Entire thread and you didn't link any recipe before. And I stayed before that the Docs are unclear and every time I told you so, I included examples of why I think that and what is unclear to me. And also, that rpms are no debs is totally clear, like I'm working with Linux for years now. I'm not a total noob, just because I didn't build anything before because I didn't need to.

That said, it is hard to guess the unclear parts of the docs precisely because of the experience, in all projects, so constructive feedback from "newcomers" and PRs to improve are welcome.

You're welcome.

Back to the topic, RHEL recipes are of moderate use to you on a Debian system like Proxmox. The linked https://salsa.debian.org/debian/nut/-/blob/debian/debian/rules file lists the options they use.

Technically for "in-place" replacements, it suffices to match the config paths and run-time users, and replace the ways system starts NUT so it would run the new build. Overwriting all old binaries in the same places is a space-saving bonus but not a requirement.

Thank you.

As for Data Stale, did you try a shorter polling frequency and/or pollonly instead of default work by interrupts (assuming the UPS or port on USB hub become bored when there's no traffic for a while, and begins power-saving - so losing the link)?

no, because I still don't know what to configure to make these changes. But I assume I can get this info from man upsmon? (A Simple yes would be sufficient if that's the case.) I'm looking by myself later this day. If I find the according settings, I'll try I tell you how it went.

When in last experiments it did become stale, did the systemd-managed driver restart work well (e.g. no longer got two drivers pulling the rug from each other)?

I didn't see "Got disconnected by another driver" anywhere anymore since switching to "systemctl start/stop/restart nut-driver". My many Posted "systemctl status nut-*" Posts reflect that.

Note that with 2.8.0 installed you should comment away the part with restarts (in fact there would be an udev.hwdb instead of udev.rules IIRC) since the goal/hope is that the newer driver reconnects better on its own.

I also earlier already mentioned I would need to delete the manually created udev rule because I've read all linked Documents up until now.

Also, one of the threads recently asked about systemd complaints about upsmon PID file - these are expected (search the issue tracker for details) due to multi-process architecture of it.

Okay, that did clarify a lot. Then it is completely normal to have two processes running and restarting when I restart the nut-monitor.

I wonder if that causes issues after all (e.g. some files/dirs get owned by that instead of nut inherited from packaging). Perhaps an explicit --with-user=... and --with-group=... would fare better to build-in same account names.

That's because I didn't specify anything else than what's in your Docs before. The Link you Posted with the deb recipes is touching on that (https://salsa.debian.org/debian/nut/-/blob/debian/debian/rules):

--with-user=nut --with-group=nut \

As mentioned, before I'll look at that Link later today. Don't have the time right now, to compare the needed Build Paths-friendly names e.g. 'to detail the same paths if you intend to replace those' / 'Config file path: /usr/etc' mentioned by you and the Docs with the actual names to run configure e.g. --sysconfdir=/etc/nut Or if it would be sufficient to copy the Whole Value of this "Variable"

DEB_CONFIGURE_EXTRA_FLAGS := --prefix= \
                         --sysconfdir=/etc/nut \
                         --includedir=/usr/include \
                 --mandir=/usr/share/man \
                         --libdir=\$${prefix}/lib/$(DEB_HOST_MULTIARCH) \
                 --libexecdir=/usr/libexec \
                         --with-ssl --with-nss \
                         --with-cgi \
                         --with-dev \
                         --enable-static \
                         --with-statepath=/run/nut \
                         --with-altpidpath=/run/nut \
                         --with-drvpath=/lib/nut \
                         --with-cgipath=/usr/lib/cgi-bin/nut \
                         --with-htmlpath=/usr/share/nut/www \
                         --with-pidpath=/run/nut \
                         --datadir=/usr/share/nut \
                         --with-pkgconfig-dir=/usr/lib/$(DEB_HOST_MULTIARCH)/pkgconfig \
                         --with-user=nut --with-group=nut \
                         --with-udev-dir=/lib/udev \
                 --with-systemdsystemunitdir=/lib/systemd/system \
                         --with-systemdshutdowndir=/lib/systemd/system-shutdown \
                 --with-systemdtmpfilesdir=/usr/lib/tmpfiles.d

Again I think the Docs are unclear on that, and again I provided examples and why I think so.

Oh and I just saw the Link young posted here in the Docs with the Name "DEB rules". So, apologize for that, but I would consider that well-hidden. I've read that exact paragraph like 15 Times now, and I didn't even consider looking inside that link because I thought that this wouldn't be relevant to me just because of the way it is linked and described as "DEB rules". "Deb configure Parameters" or "Deb Recipe" would be a better fit and I would provide an example of what exactly you would need to copy for the configure command to not get asked that exact question multiple times by different users.

MarvinMynx commented 1 year ago

As for Data Stale, did you try a shorter polling frequency and/or pollonly instead of default work by interrupts (assuming the UPS or port on USB hub become bored when there's no traffic for a while, and begins power-saving - so losing the link)?

Without changing any settings, it seems like I don't get Data Stale anymore. I think that's also since I've completely switched to systemd services. Instead, I get Connection failure: Connection timed out on the Monitor Service and upsc isn't working, same Error after a while.

I'll still try faster Poll Frequency According to man upsmon.conf the used Parameters for that are POLLFREQ and DEADTIME. Default Values Are:

POLLFREQ 5
POLLFREQALERT 5
DEADTIME 15 (The Bigger one of POLLFREQ or POLLFREQALERT times 3)

These are exactly my Configured Values. I'll try the Following now:

POLLFREQ 2
POLLFREQALERT 2
DEADTIME 6 (The Bigger one of POLLFREQ or POLLFREQALERT times 3)

According to "pollonly" I didn't find any hint on the man Page or the Docs. I don't know what this is supposed to mean or how I would set this. I'll let you know if these changes worked out or not in a few hours or so.

lso one of the threads recently asked about systemd complaints about upsmon PID file - these are expected (search the issue tracker for details) due to multi-process architecture of it.

Is this Message from systemctl nut-server.service also expected?

Can't connect to UPS [powerwalker] (usbhid-ups-powerwalker): No such file or directory
MarvinMynx commented 1 year ago

As for Data Stale, did you try a shorter polling frequency and/or pollonly instead of default work by interrupts (assuming the UPS or port on USB hub become bored when there's no traffic for a while, and begins power-saving - so losing the link)?

Didn't Help I have data stale again. Will like at the Recipe Docs later, still...

MarvinMynx commented 1 year ago

Tried to run:

git clone https://github.com/networkupstools/nut
cd nut
./autogen.sh
./configure --enable-inplace-runtime --sysconfdir=/etc/nut --includedir=/usr/include --mandir=/usr/share/man --libdir=\$${prefix}/lib/$(DEB_HOST_MULTIARCH) --libexecdir=/usr/libexec --with-ssl --with-nss --with-cgi --with-dev --enable-static --with-statepath=/run/nut --with-altpidpath=/run/nut --with-drvpath=/lib/nut --with-cgipath=/usr/lib/cgi-bin/nut --with-htmlpath=/usr/share/nut/www --with-pidpath=/run/nut --datadir=/usr/share/nut --with-pkgconfig-dir=/usr/lib/$(DEB_HOST_MULTIARCH)/pkgconfig --with-user=nut --with-group=nut --with-udev-dir=/lib/udev --with-systemdsystemunitdir=/lib/systemd/system --with-systemdshutdowndir=/lib/systemd/system-shutdown --with-systemdtmpfilesdir=/usr/lib/tmpfiles.d
make -j 4 all check && \                                                                                                                                                                                  
   { sudo systemctl stop nut-monitor nut-server || true ; } && \
   { sudo systemctl stop nut-driver.service || true ; } && \
   { sudo systemctl stop nut-driver.target || true ; } && \
   { sudo systemctl stop nut.target || true ; } && \
   sudo make install && \
   sudo systemctl daemon-reload && \
   sudo systemd-tmpfiles --create && \
   sudo systemctl disable nut.target nut-driver.target nut-monitor nut-server nut-driver-enumerator.path nut-driver-enumerator.service && \
   sudo systemctl enable  nut.target nut-driver.target nut-monitor nut-server nut-driver-enumerator.path nut-driver-enumerator.service && \
   { sudo systemctl restart udev || true ; } && \
   sudo systemctl restart nut-driver-enumerator.service nut-monitor nut-server

And itr Failed with this Erorr Message:

/bin/bash ../libtool  --tag=CC   --mode=link gcc -I../include -I/usr/include/nss -I/usr/include/nspr  -isystem /usr/local/include -g -O2 -Wno-reserved-identifier -Wno-unknown-warning-option -std=gnu99 -Wno-system-headers -Wall -Wextra -Wsign-compare -pedantic -Wno-error -version-info 6:1:0 -export-symbols-regex ^upscli_   -o libupsclient.la -rpath lib upsclient.lo ../common/libcommonclient.la  -lnss3 -lnssutil3 -lsmime3 -lssl3 -lplds4 -lplc4 -lnspr4 -lpthread
libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I../include -DHAVE_NUTCOMMON=1 -I../include -isystem /usr/local/include -g -O2 -Wno-reserved-identifier -Wno-unknown-warning-option -std=gnu++11 -Wno-system-headers -Wall -Wextra -Wno-error -MT nutclientmem.lo -MD -MP -MF .deps/nutclientmem.Tpo -c nutclientmem.cpp  -fPIC -DPIC -o .libs/nutclientmem.o
libtool:   error: only absolute run-paths are allowed
make[1]: *** [Makefile:919: libupsclient.la] Error 1
make[1]: *** Waiting for unfinished jobs....
libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I../include -DHAVE_NUTCOMMON=1 -I../include -isystem /usr/local/include -g -O2 -Wno-reserved-identifier -Wno-unknown-warning-option -std=gnu++11 -Wno-system-headers -Wall -Wextra -Wno-error -MT nutclientmem.lo -MD -MP -MF .deps/nutclientmem.Tpo -c nutclientmem.cpp -o nutclientmem.o >/dev/null 2>&1
libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I../include -DHAVE_NUTCOMMON=1 -I../include -isystem /usr/local/include -g -O2 -Wno-reserved-identifier -Wno-unknown-warning-option -std=gnu++11 -Wno-system-headers -Wall -Wextra -Wno-error -MT nutclient.lo -MD -MP -MF .deps/nutclient.Tpo -c nutclient.cpp -o nutclient.o >/dev/null 2>&1
make[1]: Leaving directory '/root/nut/clients'
make: *** [Makefile:755: all-recursive] Error 1

image

Configure Parameters Where:

NUT Configuration summary:
==========================

* configured version:   2.8.0.1 (v2.8.0-Windows-568-gf813c1404)
* build serial drivers: yes
* build USB drivers:    yes (libusb-1.0)
* build neon based XML driver:  yes
* enable Avahi support: yes
* build Powerman PDU client driver:     yes
* build Modbus driver:  yes
* build IPMI driver:    yes (FreeIPMI)
* build Mac OS X meta-driver:   no
* build i2c based drivers:      yes
* enable SSL support:   yes (Mozilla NSS)
* enable libwrap (tcp-wrappers) support:        yes
* enable libltdl (Libtool dlopen abstraction) support:  yes
* build nut-scanner:    yes
* build CGI programs:   yes
* install NUT-Monitor desktop application:      no
* install PyNUT binding module: yes
* use default  Python  interpreter:     /usr/bin/python
* use specific Python2 interpreter:     /usr/bin/python2.7
* use specific Python3 interpreter:     /usr/bin/python3
* build and install documentation:      man=auto
* build specific documentation format(s):       yes  man
* build and install the development files:      yes
* consider basic SMF support:   no
* consider basic systemd support:       yes
* build with tighter systemd support:   yes
* build C++11 codebase (client library, etc.):  yes
* build C++ tests with CPPUNIT: yes
* build SNMP drivers:   yes
* build SNMP drivers with statically linked lib(net)snmp:       no
* User to run as:       nut
* Group of user to run as:      nut

NUT Paths:
----------

* Default installation prefix path:     /usr
* State file path:      /run/nut
* Unprivileged PID file path:   /run/nut
* Privileged PID file path:     /run/nut
* Driver program path:  /lib/nut
* CGI program path:     /usr/lib/cgi-bin/nut
* HTML file path:       /usr/share/nut/www
* Config file path:     /etc/nut
* Data file path:       /usr/share/nut
* Tool program path:    /usr/bin
* System program path:  /usr/sbin
* System library path:  $/lib
* System exec-library path:     /usr/libexec

NUT Paths for third-party integrations:
---------------------------------------

* Default  Python  interpreter site-packages:   /usr/local/lib/python2.7/dist-packages
* Specific Python2 interpreter site-packages:   /usr/local/lib/python2.7/dist-packages
* Specific Python3 interpreter site-packages:   /usr/local/lib/python3.9/dist-packages
* pkg-config *.pc directory:    /usr/lib//pkgconfig => /usr/lib//pkgconfig
* Service units for systemd:    /lib/systemd/system
* Shutdown hooks for systemd:   /lib/systemd/system-shutdown
* Systemd-tmpfiles configs:     /usr/lib/tmpfiles.d
* Augeas lenses directory:      /usr/share/augeas/lenses/dist
* Udev rules directory: /lib/udev

NUT Build/Target system info:
-----------------------------

* Compact version of C compiler:        gcc (Debian 10.2.1-6) 10.2.1 20210110
* Compact version of C++ compiler:      g++ (Debian 10.2.1-6) 10.2.1 20210110
* Compact version of C preprocessor:    gcc (Debian 10.2.1-6) 10.2.1 20210110
* host env spec we run on:      x86_64-pc-linux-gnu
* host env spec we built on:    x86_64-pc-linux-gnu
* host env spec we built for:   x86_64-pc-linux-gnu
* host OS short spec we run on: x86_64-linux-gnu
* host OS short spec we built on:       x86_64-linux-gnu
* host OS short spec we built for:      x86_64-linux-gnu

NUT Compiler settings:
----------------------

* CC            : gcc
* CFLAGS        : -isystem /usr/local/include -g -O2 -Wno-reserved-identifier -Wno-unknown-warning-option -std=gnu99 -Wno-system-headers -Wall -Wextra -Wsign-compare -pedantic -Wno-error
* CXX           : g++
* CXXFLAGS      : -isystem /usr/local/include -g -O2 -Wno-reserved-identifier -Wno-unknown-warning-option -std=gnu++11 -Wno-system-headers -Wall -Wextra -Wno-error
* CPP           : gcc -E
* CPPFLAGS      :
* CONFIG_FLAGS  : --prefix=/usr --sbindir=/usr/sbin --bindir=/usr/bin --sysconfdir=/etc/nut --includedir=/usr/include --mandir=/usr/share/man --libdir=$/lib/ --libexecdir=/usr/libexec --with-ssl --with-nss --with-cgi --with-dev --enable-static --with-statepath=/run/nut --with-altpidpath=/run/nut --with-drvpath=/lib/nut --with-cgipath=/usr/lib/cgi-bin/nut --with-htmlpath=/usr/share/nut/www --with-pidpath=/run/nut --datadir=/usr/share/nut --with-pkgconfig-dir=/usr/lib//pkgconfig --with-user=nut --with-group=nut --with-udev-dir=/lib/udev --with-systemdsystemunitdir=/lib/systemd/system --with-systemdshutdowndir=/lib/systemd/system-shutdown --with-systemdtmpfilesdir=/usr/lib/tmpfiles.d

Nothing left to try again. Building isn't working, despite making sure I'm using the correct commands in this Thread like a thousand times... Without any further Help, I can't continue.

MarvinMynx commented 1 year ago

Okay, I compared the Parameters one by one and tried different things. Here is what I've tried, after comparing Every Directory if it exists or not etc.:

--- Section 1 ------------------------------------------------------------------------
git clone https://github.com/networkupstools/nut
cd nut
./autogen.sh
--- Section 2 ------------------------------------------------------------------------
./configure --enable-inplace-runtime --prefix= \
                         --sysconfdir=/etc/nut \
                         --includedir=/usr/include \
                 --mandir=/usr/share/man \
                 --libexecdir=/usr/libexec \
                         --with-statepath=/run/nut \
                         --with-altpidpath=/run/nut \
                         --with-drvpath=/lib/nut \
                         --with-cgipath=/usr/lib/cgi-bin/nut \
                         --with-htmlpath=/usr/share/nut/www \
                         --with-pidpath=/run/nut \
                         --datadir=/usr/share/nut \
                         --with-user=nut --with-group=nut \
                         --with-udev-dir=/lib/udev \
                 --with-systemdsystemunitdir=/lib/systemd/system \
                         --with-systemdshutdowndir=/lib/systemd/system-shutdown \
                 --with-systemdtmpfilesdir=/usr/lib/tmpfiles.d \
                         --with-ssl \
                         --with-cgi \
--- Section 3 ------------------------------------------------------------------------
                         --with-pkgconfig-dir=/usr/lib/x86_64-linux-gnu/pkgconfig \
                         --libdir=/lib/x86_64-linux-gnu
--- Section 4 ------------------------------------------------------------------------
                         --with-pkgconfig-dir=/usr/lib/$(DEB_HOST_MULTIARCH)/pkgconfig \
                         --libdir=\$${prefix}/lib/$(DEB_HOST_MULTIARCH) \
--- Section 5 ------------------------------------------------------------------------
                         --with-nss \
                         --with-dev \
                         --enable-static \
--- Section 6 ------------------------------------------------------------------------
make -j 4 all check
--- Section 7 ------------------------------------------------------------------------
{ sudo systemctl stop nut-monitor nut-server || true ; } && \
   { sudo systemctl stop nut-driver.service || true ; } && \
   { sudo systemctl stop nut-driver.target || true ; } && \
   { sudo systemctl stop nut.target || true ; } && \
   sudo make install && \
   sudo systemctl daemon-reload && \
   sudo systemd-tmpfiles --create && \
   sudo systemctl disable nut.target nut-driver.target nut-monitor nut-server nut-driver-enumerator.path nut-driver-enumerator.service && \
   sudo systemctl enable  nut.target nut-driver.target nut-monitor nut-server nut-driver-enumerator.path nut-driver-enumerator.service && \
   { sudo systemctl restart udev || true ; } && \
   sudo systemctl restart nut-driver-enumerator.service nut-monitor nut-server

First I Tried to Run Sections 1-3 and then Section 6. The Output:

NUT Configuration summary:
==========================

* configured version:   2.8.0.1 (v2.8.0-Windows-568-gf813c1404)
* build serial drivers: yes
* build USB drivers:    yes (libusb-1.0)
* build neon based XML driver:  yes
* enable Avahi support: yes
* build Powerman PDU client driver:     yes
* build Modbus driver:  yes
* build IPMI driver:    yes (FreeIPMI)
* build Mac OS X meta-driver:   no
* build i2c based drivers:      yes
* enable SSL support:   yes (OpenSSL)
* enable libwrap (tcp-wrappers) support:        yes
* enable libltdl (Libtool dlopen abstraction) support:  yes
* build nut-scanner:    yes
* build CGI programs:   yes
* install NUT-Monitor desktop application:      no
* install PyNUT binding module: yes
* use default  Python  interpreter:     /usr/bin/python
* use specific Python2 interpreter:     /usr/bin/python2.7
* use specific Python3 interpreter:     /usr/bin/python3
* build and install documentation:      man=auto
* build specific documentation format(s):       yes  man
* build and install the development files:      no
* consider basic SMF support:   no
* consider basic systemd support:       yes
* build with tighter systemd support:   yes
* build C++11 codebase (client library, etc.):  yes
* build C++ tests with CPPUNIT: yes
* build SNMP drivers:   yes
* build SNMP drivers with statically linked lib(net)snmp:       no
* User to run as:       nut
* Group of user to run as:      nut

NUT Paths:
----------

* Default installation prefix path:
* State file path:      /run/nut
* Unprivileged PID file path:   /run/nut
* Privileged PID file path:     /run/nut
* Driver program path:  /lib/nut
* CGI program path:     /usr/lib/cgi-bin/nut
* HTML file path:       /usr/share/nut/www
* Config file path:     /etc/nut
* Data file path:       /usr/share/nut
* Tool program path:    /bin
* System program path:  /sbin
* System library path:  /lib/x86_64-linux-gnu
* System exec-library path:     /usr/libexec

NUT Paths for third-party integrations:
---------------------------------------

* Default  Python  interpreter site-packages:   /usr/local/lib/python2.7/dist-packages
* Specific Python2 interpreter site-packages:   /usr/local/lib/python2.7/dist-packages
* Specific Python3 interpreter site-packages:   /usr/local/lib/python3.9/dist-packages
* pkg-config *.pc directory:    /usr/lib/x86_64-linux-gnu/pkgconfig => /usr/lib/x86_64-linux-gnu/pkgconfig
* Service units for systemd:    /lib/systemd/system
* Shutdown hooks for systemd:   /lib/systemd/system-shutdown
* Systemd-tmpfiles configs:     /usr/lib/tmpfiles.d
* Augeas lenses directory:      /usr/share/augeas/lenses/dist
* Udev rules directory: /lib/udev

NUT Build/Target system info:
-----------------------------

* Compact version of C compiler:        gcc (Debian 10.2.1-6) 10.2.1 20210110
* Compact version of C++ compiler:      g++ (Debian 10.2.1-6) 10.2.1 20210110
* Compact version of C preprocessor:    gcc (Debian 10.2.1-6) 10.2.1 20210110
* host env spec we run on:      x86_64-pc-linux-gnu
* host env spec we built on:    x86_64-pc-linux-gnu
* host env spec we built for:   x86_64-pc-linux-gnu
* host OS short spec we run on: x86_64-linux-gnu
* host OS short spec we built on:       x86_64-linux-gnu
* host OS short spec we built for:      x86_64-linux-gnu

NUT Compiler settings:
----------------------

* CC            : gcc
* CFLAGS        : -isystem /usr/local/include -g -O2 -Wno-reserved-identifier -Wno-unknown-warning-option -std=gnu99 -Wno-system-headers -Wall -Wextra -Wsign-compare -pedantic -Wno-error
* CXX           : g++
* CXXFLAGS      : -isystem /usr/local/include -g -O2 -Wno-reserved-identifier -Wno-unknown-warning-option -std=gnu++11 -Wno-system-headers -Wall -Wextra -Wno-error
* CPP           : gcc -E
* CPPFLAGS      :
* CONFIG_FLAGS  : --prefix= --sysconfdir=/etc/nut --includedir=/usr/include --mandir=/usr/share/man --libexecdir=/usr/libexec --with-statepath=/run/nut --with-altpidpath=/run/nut --with-drvpath=/lib/nut --with-cgipath=/usr/lib/cgi-bin/nut --with-htmlpath=/usr/share/nut/www --with-pidpath=/run/nut --datadir=/usr/share/nut --with-user=nut --with-group=nut --with-udev-dir=/lib/udev --with-systemdsystemunitdir=/lib/systemd/system --with-systemdshutdowndir=/lib/systemd/system-shutdown --with-systemdtmpfilesdir=/usr/lib/tmpfiles.d --with-ssl --with-cgi --with-pkgconfig-dir=/usr/lib/x86_64-linux-gnu/pkgconfig --libdir=/lib/x86_64-linux-gnu --enable-inplace-runtime

Section 6 Check Errored Out

Then I tried to run Sections 1-2 only because I wasn't sure about these paths in Sections 3 and 4. The Version of Section 4 is mentioned on the Linked Deb Recopies, but I think Both Section 3 and Section 4 or causing Errors. In both try's I excluded Section 5 Because I'm not sure about them. I'm only pretty sure about the --with-nss one, because i think it's either this or --with-ssl and i, included --with-ssl in my commands. And then run Section 6 again, the output

NUT Configuration summary:
==========================

* configured version:   2.8.0.1 (v2.8.0-Windows-568-gf813c1404)
* build serial drivers: yes
* build USB drivers:    yes (libusb-1.0)
* build neon based XML driver:  yes
* enable Avahi support: yes
* build Powerman PDU client driver:     yes
* build Modbus driver:  yes
* build IPMI driver:    yes (FreeIPMI)
* build Mac OS X meta-driver:   no
* build i2c based drivers:      yes
* enable SSL support:   yes (OpenSSL)
* enable libwrap (tcp-wrappers) support:        yes
* enable libltdl (Libtool dlopen abstraction) support:  yes
* build nut-scanner:    yes
* build CGI programs:   yes
* install NUT-Monitor desktop application:      no
* install PyNUT binding module: yes
* use default  Python  interpreter:     /usr/bin/python
* use specific Python2 interpreter:     /usr/bin/python2.7
* use specific Python3 interpreter:     /usr/bin/python3
* build and install documentation:      man=auto
* build specific documentation format(s):       yes  man
* build and install the development files:      no
* consider basic SMF support:   no
* consider basic systemd support:       yes
* build with tighter systemd support:   yes
* build C++11 codebase (client library, etc.):  yes
* build C++ tests with CPPUNIT: yes
* build SNMP drivers:   yes
* build SNMP drivers with statically linked lib(net)snmp:       no
* User to run as:       nut
* Group of user to run as:      nut

NUT Paths:
----------

* Default installation prefix path:
* State file path:      /run/nut
* Unprivileged PID file path:   /run/nut
* Privileged PID file path:     /run/nut
* Driver program path:  /lib/nut
* CGI program path:     /usr/lib/cgi-bin/nut
* HTML file path:       /usr/share/nut/www
* Config file path:     /etc/nut
* Data file path:       /usr/share/nut
* Tool program path:    /bin
* System program path:  /sbin
* System library path:  /lib
* System exec-library path:     /usr/libexec

NUT Paths for third-party integrations:
---------------------------------------

* Default  Python  interpreter site-packages:   /usr/local/lib/python2.7/dist-packages
* Specific Python2 interpreter site-packages:   /usr/local/lib/python2.7/dist-packages
* Specific Python3 interpreter site-packages:   /usr/local/lib/python3.9/dist-packages
* pkg-config *.pc directory:    ${libdir}/pkgconfig => /lib/pkgconfig
* Service units for systemd:    /lib/systemd/system
* Shutdown hooks for systemd:   /lib/systemd/system-shutdown
* Systemd-tmpfiles configs:     /usr/lib/tmpfiles.d
* Augeas lenses directory:      /usr/share/augeas/lenses/dist
* Udev rules directory: /lib/udev

NUT Build/Target system info:
-----------------------------

* Compact version of C compiler:        gcc (Debian 10.2.1-6) 10.2.1 20210110
* Compact version of C++ compiler:      g++ (Debian 10.2.1-6) 10.2.1 20210110
* Compact version of C preprocessor:    gcc (Debian 10.2.1-6) 10.2.1 20210110
* host env spec we run on:      x86_64-pc-linux-gnu
* host env spec we built on:    x86_64-pc-linux-gnu
* host env spec we built for:   x86_64-pc-linux-gnu
* host OS short spec we run on: x86_64-linux-gnu
* host OS short spec we built on:       x86_64-linux-gnu
* host OS short spec we built for:      x86_64-linux-gnu

NUT Compiler settings:
----------------------

* CC            : gcc
* CFLAGS        : -isystem /usr/local/include -g -O2 -Wno-reserved-identifier -Wno-unknown-warning-option -std=gnu99 -Wno-system-headers -Wall -Wextra -Wsign-compare -pedantic -Wno-error
* CXX           : g++
* CXXFLAGS      : -isystem /usr/local/include -g -O2 -Wno-reserved-identifier -Wno-unknown-warning-option -std=gnu++11 -Wno-system-headers -Wall -Wextra -Wno-error
* CPP           : gcc -E
* CPPFLAGS      :
* CONFIG_FLAGS  : --prefix= --sysconfdir=/etc/nut --includedir=/usr/include --mandir=/usr/share/man --libexecdir=/usr/libexec --with-statepath=/run/nut --with-altpidpath=/run/nut --with-drvpath=/lib/nut --with-cgipath=/usr/lib/cgi-bin/nut --with-htmlpath=/usr/share/nut/www --with-pidpath=/run/nut --datadir=/usr/share/nut --with-user=nut --with-group=nut --with-udev-dir=/lib/udev --with-systemdsystemunitdir=/lib/systemd/system --with-systemdshutdowndir=/lib/systemd/system-shutdown --with-systemdtmpfilesdir=/usr/lib/tmpfiles.d --with-ssl --with-cgi --enable-inplace-runtime

PASS: nutlogtest
PASS: getvaluetest
PASS: cppunittest
============================================================================
Testsuite summary for nut 2.8.0.1
============================================================================
# TOTAL: 3
# PASS:  3
# SKIP:  0
# XFAIL: 0
# FAIL:  0
# XPASS: 0
# ERROR: 0
============================================================================

I think this is the First time that I saw this kind of output from the make -j 4 all check command in Section 6. So correct for me would be:

git clone https://github.com/networkupstools/nut
cd nut
./autogen.sh
./configure --enable-inplace-runtime --prefix= \
                         --sysconfdir=/etc/nut \
                         --includedir=/usr/include \
                 --mandir=/usr/share/man \
                 --libexecdir=/usr/libexec \
                         --with-statepath=/run/nut \
                         --with-altpidpath=/run/nut \
                         --with-drvpath=/lib/nut \
                         --with-cgipath=/usr/lib/cgi-bin/nut \
                         --with-htmlpath=/usr/share/nut/www \
                         --with-pidpath=/run/nut \
                         --datadir=/usr/share/nut \
                         --with-user=nut --with-group=nut \
                         --with-udev-dir=/lib/udev \
                 --with-systemdsystemunitdir=/lib/systemd/system \
                         --with-systemdshutdowndir=/lib/systemd/system-shutdown \
                 --with-systemdtmpfilesdir=/usr/lib/tmpfiles.d \
                         --with-ssl \
                         --with-cgi \
make -j 4 all check

Does this make sense? If my assumptions are correct it would now finally be safe to proceed with the following command:

{ sudo systemctl stop nut-monitor nut-server || true ; } && \
   { sudo systemctl stop nut-driver.service || true ; } && \
   { sudo systemctl stop nut-driver.target || true ; } && \
   { sudo systemctl stop nut.target || true ; } && \
   sudo make install && \
   sudo systemctl daemon-reload && \
   sudo systemd-tmpfiles --create && \
   sudo systemctl disable nut.target nut-driver.target nut-monitor nut-server nut-driver-enumerator.path nut-driver-enumerator.service && \
   sudo systemctl enable  nut.target nut-driver.target nut-monitor nut-server nut-driver-enumerator.path nut-driver-enumerator.service && \
   { sudo systemctl restart udev || true ; } && \
   sudo systemctl restart nut-driver-enumerator.service nut-monitor nut-server

Is that correct?

jimklimov commented 1 year ago

With a weekend and laptop here, looking at this thread from start again to hopefully make more sense of it. Seems there were at least 3 issues similar to this discussed in parallel, so comments for one could leak into another. Being similar, they still were probably relevant too :)

TL;DR: There was quite a bit of breadcrumb tracking across the logs you posted (thanks, being drowned in debug data may be annoying but is often helpful). Some of the original issues were discussed before. Some not discussed may be about the contents of systemd units delivered years ago by NUT 2.7.4, such as lack of driver restarts if they fail, and/or timing issues during start-up (upsmon logging in to watch a not yet known UPS).

It seems your system may have exposed a new issue with configure --enable-inplace-runtime discovery of setup details, possibly due to permissions. Some ideas to try are posted below; I'll also try to reproduce the situation and try to address it if I can.

So just collecting a few bullet-points from a braindump as I go through posts and screenshots; some action items should be marked with a checkbox:

Feb 22 12:22:52 pve upsmon[3991037]: Login on UPS [powerwalker@localhost] failed - got [ERR ACCESS-DENIED] Feb 22 12:22:52 pve systemd[1]: Started Network UPS Tools - power device monitor and shutdown controller.

Feb 22 12:22:53 pve systemd[1]: Started Network UPS Tools - power device driver controller.

Feb 22 12:22:54 pve upsd[3991027]: Connected to UPS [powerwalker]: usbhid-ups-powerwalker


* Looking at the timing above:
    * I suppose certain systemd dependency declarations are lacking. However `nut-monitor.service` does say it goes `After=... nut-server.service` -- but maybe systemd decides too early that `nut-server` has started (and at least does try to log in before `upsd` has actually connected to the driver).
    * Those logs report that daemons started "just a few seconds ago" so maybe `upsmon` does retry and successfully connects later?

* Regarding the "3 variants" in https://github.com/networkupstools/nut/issues/1853#issuecomment-1440404054 : 
    * The first one is a typical approach for building "everything" (e.g. in CI context) but not very much intended for installation (not customizing users/paths)
    * The second and third are about the new "in-place" configuration mode which tries to derive the critical settings from an existing NUT installation, if found. The `# --maybe-some-other-options` part refers to non-critical settings (e.g. where to store the installed drivers, if you want to override those placed by packaging into strange locations like `/lib/nut` and not `/usr/bin` like other programs).
    * The third option just elaborates more on diligent careful installation over whatever is running, and specifically for deployments with systemd. As noted before, there are hundreds of OSes without it.
* The build configuration in https://github.com/networkupstools/nut/issues/1853#issuecomment-1442254797 was on right track, so I am curious why it did not detect and suggest the correct options after `./configure --enable-inplace-runtime` -- e.g. (as you also noted earlier), although it did decide to configure bin/sbin paths:

Other questions:

Normally not. Technically it means the driver did not set up a "socket file" or "pipe" to talk to the data server. Maybe it did not do so yet and will in a couple of seconds, or it died and never will until restarted.

See usbhid-ups manpage, e.g. https://github.com/networkupstools/nut/blob/master/docs/man/usbhid-ups.txt It is just a flag setting (nothing to equate to) in an ups.conf section for the device, e.g.

[ups]
    driver = usbhid-ups
    port = auto
    pollonly
    # other options

I think it disliked the literal dollars copied in \$${prefix} (maybe one escaped dollar could work here, for configure script to substitute the prefix it would know eventually), and the $(DEB_HOST_MULTIARCH) (in debian/rules file which is essentially a Makefile it is substituted from an earlier definition; in shell this means something else). So configuration mostly looked good now, except for artifacts like:

* System library path:  $/lib

But I think these two were almost addressed by https://github.com/networkupstools/nut/issues/1853#issuecomment-1445172919 : the "Section 3" is better than the literal text in "Section 4", but to match existing packaging perfectly, the prefix should be /usr so --libdir=/usr/lib/x86_64-linux-gnu

Regarding "Section 5", the --with-nss tells it to use Mozilla NSS for crypto; otherwise it would auto-detect if NSS or OpenSSL are available. The other two options are less consequential for run-time builds.

MarvinMynx commented 1 year ago

Still Reading But I can let you know this so far:

  • One idea addressed recently (and probably your codebase does have that fix) was about inability of an arbitrary user to see into the configuration directory (e.g. /etc/nut or /etc/ups on most packaged systems) and/or read /etc/nut/*.conf files, so the configure run could fail to find the existing configuration details this way. Maybe there are use-cases missed with that.
  • [ ] As a quick fix (and check if this is the case) can you try running configure/make as root? "Should be safe" :) Or in a really safer fashion, record the permissions of ls -la /etc/nut/ and relax them so your build user may read the directory and files there, and would configure in-place more properly?

I can say that I did run everything discussed in this thread at any times with the user root logged in via "sudo -i"


Other questions:

  • Is this Message from systemctl nut-server.service also expected?

    Can't connect to UPS [powerwalker] (usbhid-ups-powerwalker): No such file or directory

Normally not. Technically it means the driver did not set up a "socket file" or "pipe" to talk to the data server. Maybe it did not do so yet and will in a couple of seconds, or it died and never will until restarted.

It seems that it did not so yet:

Feb 26 19:18:28 pve upsd[2086438]: Can't connect to UPS [powerwalker] (usbhid-ups-powerwalker): No such file or directory
Feb 26 19:18:30 pve upsd[2086438]: Connected to UPS [powerwalker]: usbhid-ups-powerwalker
.rw-r--r-- nut nut 8 B Sun Feb 26 19:18:28 2023  /run/nut/upsd.pid

  • docs for "pollonly"

See usbhid-ups manpage, e.g. https://github.com/networkupstools/nut/blob/master/docs/man/usbhid-ups.txt It is just a flag setting (nothing to equate to) in an ups.conf section for the device, e.g.

[ups]
    driver = usbhid-ups
    port = auto
    pollonly
    # other options

I'm trying this now.


I think it disliked the literal dollars copied in \$${prefix} (maybe one escaped dollar could work here, for configure script to substitute the prefix it would know eventually), and the $(DEB_HOST_MULTIARCH) (in debian/rules file which is essentially a Makefile it is substituted from an earlier definition; in shell this means something else). So configuration mostly looked good now, except for artifacts like:

* System library path:  $/lib

But I think these two were almost addressed by #1853 (comment) : the "Section 3" is better than the literal text in "Section 4", but to match existing packaging perfectly, the prefix should be /usr so --libdir=/usr/lib/x86_64-linux-gnu

Regarding "Section 5", the --with-nss tells it to use Mozilla NSS for crypto; otherwise it would auto-detect if NSS or OpenSSL are available. The other two options are less consequential for run-time builds.

Alright. So i tried to run this command now: (One time with and one time without '--with-ssl'

git clone https://github.com/networkupstools/nut
cd nut
./autogen.sh
./configure --enable-inplace-runtime --prefix= \
                         --sysconfdir=/etc/nut \
                         --includedir=/usr/include \
                 --mandir=/usr/share/man \
                 --libexecdir=/usr/libexec \
                         --with-statepath=/run/nut \
                         --with-altpidpath=/run/nut \
                         --with-drvpath=/lib/nut \
                         --with-cgipath=/usr/lib/cgi-bin/nut \
                         --with-htmlpath=/usr/share/nut/www \
                         --with-pidpath=/run/nut \
                         --datadir=/usr/share/nut \
                         --with-user=nut --with-group=nut \
                         --with-udev-dir=/lib/udev \
                 --with-systemdsystemunitdir=/lib/systemd/system \
                         --with-systemdshutdowndir=/lib/systemd/system-shutdown \
                 --with-systemdtmpfilesdir=/usr/lib/tmpfiles.d \
                         --with-ssl \
                         --with-cgi \
                         --with-pkgconfig-dir=/usr/lib/x86_64-linux-gnu/pkgconfig \
                         --libdir=/usr/lib/x86_64-linux-gnu
make -j 4 all check

It seems like in both cases 'make -j 4 all check' still errors out and I don't see any Testsuite summary in the Output.

The Configure Output in Both Cases where the Same Despite this expected difference: image

NUT Configuration summary:
==========================

* configured version:   2.8.0.1 (v2.8.0-Windows-568-gf813c1404)
* build serial drivers: yes
* build USB drivers:    yes (libusb-1.0)
* build neon based XML driver:  yes
* enable Avahi support: yes
* build Powerman PDU client driver:     yes
* build Modbus driver:  yes
* build IPMI driver:    yes (FreeIPMI)
* build Mac OS X meta-driver:   no
* build i2c based drivers:      yes
* enable SSL support:   yes (OpenSSL)
* enable libwrap (tcp-wrappers) support:        yes
* enable libltdl (Libtool dlopen abstraction) support:  yes
* build nut-scanner:    yes
* build CGI programs:   yes
* install NUT-Monitor desktop application:      no
* install PyNUT binding module: yes
* use default  Python  interpreter:     /usr/bin/python
* use specific Python2 interpreter:     /usr/bin/python2.7
* use specific Python3 interpreter:     /usr/bin/python3
* build and install documentation:      man=auto
* build specific documentation format(s):       yes  man
* build and install the development files:      no
* consider basic SMF support:   no
* consider basic systemd support:       yes
* build with tighter systemd support:   yes
* build C++11 codebase (client library, etc.):  yes
* build C++ tests with CPPUNIT: yes
* build SNMP drivers:   yes
* build SNMP drivers with statically linked lib(net)snmp:       no
* User to run as:       nut
* Group of user to run as:      nut

NUT Paths:
----------

* Default installation prefix path:
* State file path:      /run/nut
* Unprivileged PID file path:   /run/nut
* Privileged PID file path:     /run/nut
* Driver program path:  /lib/nut
* CGI program path:     /usr/lib/cgi-bin/nut
* HTML file path:       /usr/share/nut/www
* Config file path:     /etc/nut
* Data file path:       /usr/share/nut
* Tool program path:    /bin
* System program path:  /sbin
* System library path:  /usr/lib/x86_64-linux-gnu
* System exec-library path:     /usr/libexec

NUT Paths for third-party integrations:
---------------------------------------

* Default  Python  interpreter site-packages:   /usr/local/lib/python2.7/dist-packages
* Specific Python2 interpreter site-packages:   /usr/local/lib/python2.7/dist-packages
* Specific Python3 interpreter site-packages:   /usr/local/lib/python3.9/dist-packages
* pkg-config *.pc directory:    /usr/lib/x86_64-linux-gnu/pkgconfig => /usr/lib/x86_64-linux-gnu/pkgconfig
* Service units for systemd:    /lib/systemd/system
* Shutdown hooks for systemd:   /lib/systemd/system-shutdown
* Systemd-tmpfiles configs:     /usr/lib/tmpfiles.d
* Augeas lenses directory:      /usr/share/augeas/lenses/dist
* Udev rules directory: /lib/udev

NUT Build/Target system info:
-----------------------------

* Compact version of C compiler:        gcc (Debian 10.2.1-6) 10.2.1 20210110
* Compact version of C++ compiler:      g++ (Debian 10.2.1-6) 10.2.1 20210110
* Compact version of C preprocessor:    gcc (Debian 10.2.1-6) 10.2.1 20210110
* host env spec we run on:      x86_64-pc-linux-gnu
* host env spec we built on:    x86_64-pc-linux-gnu
* host env spec we built for:   x86_64-pc-linux-gnu
* host OS short spec we run on: x86_64-linux-gnu
* host OS short spec we built on:       x86_64-linux-gnu
* host OS short spec we built for:      x86_64-linux-gnu

NUT Compiler settings:
----------------------

* CC            : gcc
* CFLAGS        : -isystem /usr/local/include -g -O2 -Wno-reserved-identifier -Wno-unknown-warning-option -std=gnu99 -Wno-system-headers -Wall -Wextra -Wsign-compare -pedantic -Wno-error
* CXX           : g++
* CXXFLAGS      : -isystem /usr/local/include -g -O2 -Wno-reserved-identifier -Wno-unknown-warning-option -std=gnu++11 -Wno-system-headers -Wall -Wextra -Wno-error
* CPP           : gcc -E
* CPPFLAGS      :
* CONFIG_FLAGS  : --prefix= --sysconfdir=/etc/nut --includedir=/usr/include --mandir=/usr/share/man --libexecdir=/usr/libexec --with-statepath=/run/nut --with-altpidpath=/run/nut --with-drvpath=/lib/nut --with-cgipath=/usr/lib/cgi-bin/nut --with-htmlpath=/usr/share/nut/www --with-pidpath=/run/nut --datadir=/usr/share/nut --with-user=nut --with-group=nut --with-udev-dir=/lib/udev --with-systemdsystemunitdir=/lib/systemd/system --with-systemdshutdowndir=/lib/systemd/system-shutdown --with-systemdtmpfilesdir=/usr/lib/tmpfiles.d --with-cgi --with-pkgconfig-dir=/usr/lib/x86_64-linux-gnu/pkgconfig --libdir=/usr/lib/x86_64-linux-gnu --enable-inplace-runtime

Only the Run Excluding These Two Options entirely did run these checks successfully up until now.

                         --with-pkgconfig-dir=/usr/lib/x86_64-linux-gnu/pkgconfig \
                         --libdir=/usr/lib/x86_64-linux-gnu
MarvinMynx commented 1 year ago

huh, I can't replicate the earlier successful Build I described. That's odd... Does it make a difference if I log in via sudo -i or directly to root@host via ssh? Because yesterday I ran the command from my laptop, which doesn't have my ssh-key, so I logged in via Password. (Needs to be changed) Today I'm on my PC again using my ssh-key and then sudo -i. That's the only difference that I can remember and that I can see looking at history. Using su - root instead of sudo -i at least does not make a difference.

I don't get it... Today on the PC I'm not able to get to see the Output 'Testsuite summary...' again no matter what I do... I'm really sorry but it seems like not all of my assumptions and Outputs of Configure were correct. For like I don't know which command Produced that 'Testsuite summary...' Output successfully with the 'make -j 4 all check' command...

MarvinMynx commented 1 year ago

Okay it seems like I were able to reproduce the successful run (getting 'Testsuite summary...') once on the laptop again, and then run the same immediately again and I didn't get the same output. (Not getting 'Testsuite summary...').

I don't know how this is possible but this is definitely the case and I'm starting to question my own sanity...