Closed repiuk closed 1 year ago
Also having this issue. upsmon restarts over and over seemingly trying to shut down but never does. Below is an excerpt from my logs, this just repeats over and over.
Home Assistant 2023.7.2 Supervisor 2023.07.1 Operating System 10.3 Frontend 20230705.1 - latest NUT addon 0.12.0
Running on a RaspberryPi 3B
[10:00:37] INFO: upsmon stopped, restarting...
[10:00:39] INFO: Starting the UPS monitor and shutdown controller...
kill: No such process
0.000000 Using power down flag file /etc/killpower
0.000503 UPS: UPS@localhost (primary) (power value 1)
0.000682 [D1] debug level is '1'
0.001465 [D1] debug level is '1'
0.001915 Warning: running as one big root process by request (upsmon -p)
0.002968 [D1] Saving PID 3270 into /run/nut/upsmon.pid
Init SSL without certificate database
0.014808 [D1] Trying to connect to UPS [UPS@localhost]
10139.203959 User upsmonmaster@127.0.0.1 logged into UPS [UPS]
0.019402 [D1] Logged into UPS UPS@localhost
0.027732 [D1] Critical UPS: UPS@localhost
0.031712 [D1] Shutting down any UPSes in PRIMARY mode...
10139.221487 Client upsmonmaster@127.0.0.1 set FSD on UPS [UPS]
0.041115 [D1] This system is a primary... waiting for secondaries to logout...
0.045360 Executing automatic power-fail shutdown
{"message":"Event nut.ups_event fired."}Network UPS Tools upsmon 2.8.0
{"message":"Event nut.ups_event fired."}{"message":"Event nut.ups_event fired."}Network UPS Tools upsmon 2.8.0
Network UPS Tools upsmon 2.8.0
{"message":"Event nut.ups_event fired."}Network UPS Tools upsmon 2.8.0
s6-svscanctl: fatal: unable to control /var/run/s6/services: No such file or directory
5.084389 Unable to call shutdown command: s6-svscanctl -t /var/run/s6/services
Network UPS Tools upsmon 2.8.0
[10:00:44] INFO: upsmon stopped, restarting...
I more or less solved it by installing NUT on another NUC (or Pi) as a server and only use the NUT client of the addon in home assistant. An automation monitors NUT events and if a FSD event occurs, shuts down homeassistant with a regular homeassistant call.
There hasn't been any activity on this issue recently, so we clean up some of the older and inactive issues. Please make sure to update to the latest version and check if that solves the issue. Let us know if that works for you by leaving a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thanks!
Problem/Motivation
If the addon needs to shut down due to a FSD flag in the UPS the log shows:
Unable to call shutdown command: s6-svscanctl -t /var/run/s6/services
Expected behavior
shutdown of HA
Actual behavior
Steps to reproduce
Home Assistant 2023.7.1 Supervisor 2023.07.1 Operating System 10.3 Frontend 20230705.1 - latest
Proposed changes
Opened the container in portainer /var/run/s6/services doesn't exist /var/run/s6/service is an existing folder
ls -al total 20 drwxr-xr-x 4 root root 4096 Jul 12 09:44 . drwxr-xr-x 1 root root 4096 Jul 12 09:44 .. drwxr-xr-x 2 root root 4096 Jul 12 09:44 .s6-svscan drwxr-xr-x 4 root root 4096 Jul 12 09:44 s6-linux-init-shutdownd lrwxrwxrwx 1 root root 36 Jul 12 09:44 s6rc-fdholder -> /run/s6-rc/servicedirs/s6rc-fdholder lrwxrwxrwx 1 root root 42 Jul 12 09:44 s6rc-oneshot-runner -> /run/s6-rc/servicedirs/s6rc-oneshot-runner lrwxrwxrwx 1 root root 28 Jul 12 09:44 upsd -> /run/s6/legacy-services/upsd lrwxrwxrwx 1 root root 30 Jul 12 09:44 upsmon -> /run/s6/legacy-services/upsmon
I can't find the file s6-svscanctl