SuperioOne / nut_webgui

Web interface for Network UPS Tools
Apache License 2.0
19 stars 1 forks source link

"invalid digit found in string" spamming logs #1

Open sbach89 opened 2 days ago

sbach89 commented 2 days ago

I'm using nut_webgui with docker compose on the same VM that nut is installed.

docker-compose.yml

services:
  nutweb:
    image: ghcr.io/superioone/nut_webgui:latest
    container_name: nutweb
    environment:
      - POLL_FREQ=60
      - POLL_INTERVAL=5
      - UPSD_ADDR=127.0.0.1
      - UPSD_USER=admin
      - UPSD_PASS=xxxxx
      - PORT=9000
    restart: unless-stopped
    network_mode: host

When it's running it's spamming the following error every 30 seconds.

ERROR nut_webgui::ups_service::ups_poll_service: Poll service error occurred: ClientError(ParseError("invalid digit found in string"))

as well as, but not as often:

WARN nut_webgui::ups_service::storage_service: Partial update ignored. Ups APC2 does not exists anymore.

I have 2 UPS's classified as 'APC1' and 'APC2'. The webui works, but only APC1 shows up, after about half an hour APC2 shows up, but the ERROR and WARN logs persist. Both UPS's show up with NUT's default CGI page as well as upsc command.

SuperioOne commented 8 hours ago

Thanks for the issue report,

It appears that the issue is related to number parsing and how UPS devices reports their variables (expecting an integer as value , but getting a float instead). It also explains why APC2 doesn't show up properly.

I'll run some test on dummy-ups devices and rollout a fix soon as possible.

sbach89 commented 1 hour ago

Appreciate it, if you need any assistance with testing, let me know!