SuperioOne / nut_webgui

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

fails to find the ups and spams logs with 'Poll service error occurred: ClientError(ParseError("Unexpected variable format"))' #2

Closed sammcj closed 7 hours ago

sammcj commented 1 day ago
2024-09-25T07:15:51.859851Z DEBUG nut_webgui: Server initialized with ServerArgs { poll_freq: 60, poll_interval: 5, upsd_addr: "127.0.0.1", upsd_port: 3493, upsd_user: Some("myuser"), upsd_pass: Some("redacted"), listen: 0.0.0.0, port: 11234, log_level: Level(Debug), static_dir: "/opt/nut_webgui/static" }
2024-09-25T07:15:51.860029Z  INFO nut_webgui::ups_service::ups_poll_service: Connected to UPS daemon service. address="127.0.0.1:3493"
2024-09-25T07:15:51.861210Z DEBUG nut_webgui::ups_service::ups_poll_service: Refreshing the all available Ups devices.
2024-09-25T07:15:51.861258Z ERROR nut_webgui::ups_service::ups_poll_service: Poll service error occurred: ClientError(ParseError("CMD list does not start with correct line. Unexpected line received 'ERR DRIVER-NOT-CONNECTED'."))
2024-09-25T07:15:56.861431Z ERROR nut_webgui::ups_service::ups_poll_service: Poll service error occurred: ClientError(ParseError("Unexpected variable format"))
2024-09-25T07:16:00.797565Z DEBUG request{method=GET uri=/?section=ups_table version=HTTP/1.1}: tower_http::trace::on_request: started processing request
2024-09-25T07:16:00.797601Z DEBUG request{method=GET uri=/?section=ups_table version=HTTP/1.1}: tower_http::trace::on_response: finished processing request latency=0 ms status=200
2024-09-25T07:16:01.861110Z ERROR nut_webgui::ups_service::ups_poll_service: Poll service error occurred: ClientError(ParseError("Unexpected variable format"))
2024-09-25T07:16:06.861601Z ERROR nut_webgui::ups_service::ups_poll_service: Poll service error occurred: ClientError(ParseError("Unexpected variable format"))
2024-09-25T07:16:11.088250Z DEBUG request{method=GET uri=/ version=HTTP/1.1}: tower_http::trace::on_request: started processing request
2024-09-25T07:16:11.088298Z DEBUG request{method=GET uri=/ version=HTTP/1.1}: tower_http::trace::on_response: finished processing request latency=0 ms status=200
2024-09-25T07:16:11.861359Z ERROR nut_webgui::ups_service::ups_poll_service: Poll service error occurred: ClientError(ParseError("Unexpected variable format"))
2024-09-25T07:16:16.860755Z ERROR nut_webgui::ups_service::ups_poll_service: Poll service error occurred: ClientError(ParseError("Unexpected variable format"))
2024-09-25T07:16:21.860883Z ERROR nut_webgui::ups_service::ups_poll_service: Poll service error occurred: ClientError(ParseError("Unexpected variable format"))
2024-09-25T07:16:51.861487Z DEBUG nut_webgui::ups_service::ups_poll_service: Refreshing the all available Ups devices.
2024-09-25T07:16:51.861566Z ERROR nut_webgui::ups_service::ups_poll_service: Poll service error occurred: ClientError(ParseError("CMD list does not start with correct line. Unexpected line received 'ERR DRIVER-NOT-CONNECTED'."))
2024-09-25T07:16:56.860974Z ERROR nut_webgui::ups_service::ups_poll_service: Poll service error occurred: ClientError(ParseError("Unexpected variable format"))
2024-09-25T07:17:01.861210Z ERROR nut_webgui::ups_service::ups_poll_service: Poll service error occurred: ClientError(ParseError("Unexpected variable format"))
sbach89 commented 1 day ago
"CMD list does not start with correct line. Unexpected line received 'ERR DRIVER-NOT-CONNECTED'."))

These seems to me that your UPS is not configured correctly with NUT. Does NUT seem them at all? What does your /etc/nut/ups.conf look like?

sammcj commented 1 day ago

Hey, yes both my UPS work in NUT:

[PSA]
  driver = usbhid-ups
  port = auto
  vendorid = 10AF*
  product = .*LiebertPSA.*

[CyberPower]
  driver = usbhid-ups
  port = auto
  serial = CTLLU2000129
SuperioOne commented 9 hours ago

DRIVER-NOT-CONNECTED is an error reported by NUT service. It usually means the driver is misconfigured or not running.

At first glance, your ups.conf looks normal to me. Only possible issue is the 10AF* regexp part, but I think it should match with Liebert's vendorid (10AF) anyway.

All I can recommend for now is: double checking USB devices' serial codes and product names using lsusb -v command and verifying NUT service with upsc -L.

sammcj commented 7 hours ago

Hmm ok thanks for the advice, I appreciate that!