core icon indicating copy to clipboard operation
core copied to clipboard

NUT unable to start service legacy-cont-init

Open erickards opened this issue 1 year ago • 14 comments

The problem

NUT server will not start up. SNMP-UPS driver was used for my RMCARD-205 for a cyberpower UPS. I have SNMP enabled, and UPS status is able to be read from a different device.

What version of Home Assistant Core has the issue?

core-2023.5.3

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant Container

Integration causing the issue

NUT Server Addon

Link to integration documentation on our website

https://www.home-assistant.io/integrations/nut/

Diagnostics information

s6-rc: info: service s6rc-oneshot-runner: starting s6-rc: info: service s6rc-oneshot-runner successfully started s6-rc: info: service fix-attrs: starting s6-rc: info: service fix-attrs successfully started s6-rc: info: service legacy-cont-init: starting cont-init: info: running /etc/cont-init.d/nut.sh [16:29:32] INFO: Setting mode to netserver... [16:29:32] INFO: Generating /etc/nut/upsd.users... [16:29:33] INFO: Configuring user: cyber [16:29:33] INFO: Password is NOT in the Have I Been Pwned database! Nice! [16:29:34] INFO: Configuring Device named public2... [16:29:34] INFO: Starting the UPS drivers... Created directory: /var/lib/snmp/cert_indexes Startup timer elapsed, continuing... cont-init: info: /etc/cont-init.d/nut.sh exited 1 cont-init: info: running /etc/cont-init.d/nutclient.sh Network UPS Tools - UPS driver controller 2.7.4 cont-init: info: /etc/cont-init.d/nutclient.sh exited 0 cont-init: warning: some scripts exited nonzero s6-rc: warning: unable to start service legacy-cont-init: command exited 1 /run/s6/basedir/scripts/rc.init: warning: s6-rc failed to properly bring all the services up! Check your logs (in /run/uncaught-logs/current if you have in-container logging) for more information. /run/s6/basedir/scripts/rc.init: fatal: stopping the container. s6-rc: info: service fix-attrs: stopping s6-rc: info: service fix-attrs successfully stopped s6-rc: info: service s6rc-oneshot-runner: stopping s6-rc: info: service s6rc-oneshot-runner successfully stopped

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

erickards avatar May 23 '23 00:05 erickards

Hey there @bdraco, @ollo69, @pestevez, mind taking a look at this issue as it has been labeled with an integration (nut) you are listed as a code owner for? Thanks!

Code owner commands

Code owners of nut can trigger bot actions by commenting:

  • @home-assistant close Closes the issue.
  • @home-assistant rename Awesome new title Renames the issue.
  • @home-assistant reopen Reopen the issue.
  • @home-assistant unassign nut Removes the current integration label and assignees on the issue, add the integration domain after the command.

(message by CodeOwnersMention)


nut documentation nut source (message by IssueLinks)

home-assistant[bot] avatar May 23 '23 00:05 home-assistant[bot]

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

Well, I can at least say I'm running into at least a similar issue. Also with RMCARD-205.

Even throwing the add-on into TRACE logging, the only indication of errors are these three lines:

cont-init: info: /etc/cont-init.d/nut.sh exited 1

s6-rc: warning: unable to start service legacy-cont-init: command exited 1
/run/s6/basedir/scripts/rc.init: warning: s6-rc failed to properly bring all the services up! Check your logs (in /run/uncaught-logs/current if you have in-container logging) for more information.

I'd look at that log file it mentions, but not really sure where to find it outside the container.

brwyatt avatar Aug 23 '23 05:08 brwyatt

Hey Folks... I have the same issue here, it started failing suddenly without any reason

arivelli avatar Oct 07 '23 16:10 arivelli

This is not the right place, issue is related to add-on and not integration.

ollo69 avatar Oct 07 '23 17:10 ollo69

Same problem here is there any solution for this?

simposiummm avatar Oct 09 '23 11:10 simposiummm

Running into issues as well, will dig in to it.

[18:09:16] INFO: Configuring Device named myups... [18:09:16] INFO: Starting the UPS drivers... Network UPS Tools - Generic HID driver 0.47 (2.8.0) USB communication driver (libusb 1.0) 0.43 libusb1: Could not open any HID devices: insufficient permissions on everything No matching HID UPS found Driver failed to start (exit status=1) Network UPS Tools - UPS driver controller 2.8.0 cont-init: info: /etc/cont-init.d/nut.sh exited 1 cont-init: info: running /etc/cont-init.d/nutclient.sh cont-init: info: /etc/cont-init.d/nutclient.sh exited 0 cont-init: warning: some scripts exited nonzero s6-rc: warning: unable to start service legacy-cont-init: command exited 1 /run/s6/basedir/scripts/rc.init: warning: s6-rc failed to properly bring all the services up! Check your logs (in /run/uncaught-logs/current if you have in-container logging) for more information. /run/s6/basedir/scripts/rc.init: fatal: stopping the container.

Update: Weird.... was looking for insights, came to this issue but when I wanted to dig in to it, it seems to work:


s6-rc: info: service base-addon-banner successfully started s6-rc: info: service fix-attrs: starting s6-rc: info: service base-addon-timezone: starting s6-rc: info: service base-addon-log-level: starting s6-rc: info: service fix-attrs successfully started [18:21:45] INFO: Configuring timezone (Europe/Amsterdam)... s6-rc: info: service base-addon-log-level successfully started s6-rc: info: service base-addon-timezone successfully started s6-rc: info: service legacy-cont-init: starting cont-init: info: running /etc/cont-init.d/nut.sh [18:21:46] INFO: Setting mode to netserver... [18:21:46] INFO: Generating /etc/nut/upsd.users... [18:21:46] INFO: Configuring user: monuser [18:21:47] INFO: Password is NOT in the Have I Been Pwned database! Nice! [18:21:48] INFO: Configuring Device named myups... [18:21:48] INFO: Starting the UPS drivers... Using subdriver: CyberPower HID 0.6 Network UPS Tools - Generic HID driver 0.47 (2.8.0) USB communication driver (libusb 1.0) 0.43 Network UPS Tools - UPS driver controller 2.8.0 cont-init: info: /etc/cont-init.d/nut.sh exited 0 cont-init: info: running /etc/cont-init.d/nutclient.sh cont-init: info: /etc/cont-init.d/nutclient.sh exited 0 s6-rc: info: service legacy-cont-init successfully started s6-rc: info: service legacy-services: starting services-up: info: copying legacy longrun upsd (no readiness notification) services-up: info: copying legacy longrun upsmon (no readiness notification) s6-rc: info: service legacy-services successfully started [18:21:53] INFO: Starting the UPS information server... 0.000000 fopen /run/nut/upsd.pid: No such file or directory 0.000042 Could not find PID file '/run/nut/upsd.pid' to see if previous upsd instance is already running!

0.000385 [D1] debug level is '1' 0.000516 listening on 0.0.0.0 port 3493 0.000823 Connected to UPS [myups]: usbhid-ups-myups 0.001769 Running as foreground process, not saving a PID file [18:21:54] INFO: Starting the UPS monitor and shutdown controller... 0.000000 fopen /run/nut/upsmon.pid: No such file or directory 0.000036 Could not find PID file to see if previous upsmon instance is already running!

0.000278 Using power down flag file /etc/killpower 0.000419 UPS: myups@localhost (primary) (power value 1) 0.000441 [D1] debug level is '1' 0.000508 [D1] debug level is '1' 0.000513 Warning: running as one big root process by request (upsmon -p) 0.000613 [D1] Saving PID 458 into /run/nut/upsmon.pid Init SSL without certificate database 0.003469 [D1] Trying to connect to UPS [myups@localhost] 0.516718 User [email protected] logged into UPS [myups] 0.004398 [D1] Logged into UPS myups@localhost

rliessum avatar Oct 16 '23 16:10 rliessum

Hello. I have the same problem, the plugin and the integration stops working and the data is lost. cont-init: warning: some scripts exited nonzero s6-rc: warning: unable to start service legacy-cont-init: command exited 1 /run/s6/basedir/scripts/rc.init:

Any solution????

sobrarbe avatar Oct 19 '23 19:10 sobrarbe

For me, it just started to work, I truly don't know what changed other than give it time and restart a couple of times.

image

rliessum avatar Oct 24 '23 06:10 rliessum

@rliessum Hello, I restart the plugin or the UPS. Could you send the configuration you have in the plugin to compare with mine? thank you.

sobrarbe avatar Oct 24 '23 06:10 sobrarbe

@rliessum Hello, I restart the plugin or the UPS. Could you send the configuration you have in the plugin to compare with mine? thank you.

users:
  - username: monuser
    password: monuser
    instcmds:
      - all
    actions: []
devices:
  - name: myups
    driver: usbhid-ups
    port: auto
    config: []
mode: netserver
shutdown_host: false

image image

for the "monuser" you can follow the documentaton: http://homeassistant.local:8123/hassio/addon/a0d7b954_nut/documentation

rliessum avatar Oct 30 '23 10:10 rliessum

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

Hello, I have a Salicru Soho+ and with this configuration the NUT plugin does not work for me. There was a time when the plugin started and worked but now it hasn't worked for many months. I have HA updated to the latest version. If you know the possible solution please help me

.users:

  • username: Ups password: Myups instcmds:
    • all actions: [] devices:
  • name: myups driver: usbhid-ups port: auto pollonly: enabled config: [] mode: netserver shutdown_host: true list_usb_devices: false

sobrarbe avatar Jan 28 '24 12:01 sobrarbe

Issue just occurred for me out of the blue post 2024.2 upgrade.

cros13 avatar Feb 09 '24 00:02 cros13

It happened for me because of compromised password I used. After I changed it the addon started successfully.

tERB00 avatar Feb 11 '24 03:02 tERB00

Same problem here. I can see it make a connection to one of my UPS':

Detected Smart-UPS 2200 on host 10.x.y.z (mib: apcc 1.6)

But it appears to crash out before actually doing anything useful...

Startup timer elapsed, continuing...
Network UPS Tools - UPS driver controller 2.8.0
cont-init: info: /etc/cont-init.d/nut.sh exited 1
cont-init: info: running /etc/cont-init.d/nutclient.sh
cont-init: info: /etc/cont-init.d/nutclient.sh exited 0
cont-init: warning: some scripts exited nonzero
s6-rc: warning: unable to start service legacy-cont-init: command exited 1
/run/s6/basedir/scripts/rc.init: warning: s6-rc failed to properly bring all the services up! Check your logs (in /run/uncaught-logs/current if you have in-container logging) for more information.
/run/s6/basedir/scripts/rc.init: fatal: stopping the container.

marria05 avatar Feb 19 '24 14:02 marria05

Same here

s6-rc: info: service s6rc-oneshot-runner: starting
s6-rc: info: service s6rc-oneshot-runner successfully started
s6-rc: info: service base-addon-banner: starting

-----------------------------------------------------------
 Add-on: Network UPS Tools
 Manage battery backup (UPS) devices
-----------------------------------------------------------
 Add-on version: 0.13.0
 You are running the latest version of this add-on.
 System: Home Assistant OS 11.5  (aarch64 / raspberrypi4-64)
 Home Assistant Core: 2024.2.2
 Home Assistant Supervisor: 2024.01.1
-----------------------------------------------------------
 Please, share the above information when looking for help
 or support in, e.g., GitHub, forums or the Discord chat.
-----------------------------------------------------------
s6-rc: info: service base-addon-banner successfully started
s6-rc: info: service fix-attrs: starting
s6-rc: info: service base-addon-timezone: starting
s6-rc: info: service base-addon-log-level: starting
s6-rc: info: service fix-attrs successfully started
[14:44:48] INFO: Configuring timezone (Europe/Rome)...
s6-rc: info: service base-addon-log-level successfully started
s6-rc: info: service base-addon-timezone successfully started
s6-rc: info: service legacy-cont-init: starting
cont-init: info: running /etc/cont-init.d/nut.sh
[14:44:50] INFO: Setting mode to netserver...
[14:44:50] INFO: Generating /etc/nut/upsd.users...
[14:44:51] INFO: Configuring user: giorgio
[14:44:51] INFO: Password is NOT in the Have I Been Pwned database! Nice!
[14:44:53] INFO: Configuring Device named myups...
[14:44:53] INFO: Starting the UPS drivers...
libusb1: Could not open any HID devices: insufficient permissions on everything
No matching HID UPS found
Network UPS Tools - Generic HID driver 0.47 (2.8.0)
USB communication driver (libusb 1.0) 0.43
Network UPS Tools - UPS driver controller 2.8.0
Driver failed to start (exit status=1)
cont-init: info: /etc/cont-init.d/nut.sh exited 1
cont-init: info: running /etc/cont-init.d/nutclient.sh
cont-init: info: /etc/cont-init.d/nutclient.sh exited 0
cont-init: warning: some scripts exited nonzero
s6-rc: warning: unable to start service legacy-cont-init: command exited 1
/run/s6/basedir/scripts/rc.init: warning: s6-rc failed to properly bring all the services up! Check your logs (in /run/uncaught-logs/current if you have in-container logging) for more information.
/run/s6/basedir/scripts/rc.init: fatal: stopping the container.
s6-rc: info: service fix-attrs: stopping
s6-rc: info: service base-addon-timezone: stopping
s6-rc: info: service base-addon-log-level: stopping
s6-rc: info: service fix-attrs successfully stopped
s6-rc: info: service base-addon-timezone successfully stopped
s6-rc: info: service base-addon-log-level successfully stopped
s6-rc: info: service base-addon-banner: stopping
s6-rc: info: service base-addon-banner successfully stopped
s6-rc: info: service s6rc-oneshot-runner: stopping
s6-rc: info: service s6rc-oneshot-runner successfully stopped

zavorra avatar Feb 19 '24 14:02 zavorra

It seems like you meant to submit an issue for the addon

Please continue at https://github.com/hassio-addons/addon-nut/issues

bdraco avatar Mar 26 '24 06:03 bdraco