basnijholt / addon-otmonitor

OpenTherm Monitor Home Assistant supervisor add-on
17 stars 11 forks source link

S6 init issue? #41

Closed andriej closed 2 years ago

andriej commented 2 years ago

I've reinstalled HA on my host and while trying to install add-on I have an error:

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/nginx.sh
/package/admin/s6-overlay-3.1.0.1/etc/s6-rc/scripts/cont-init: 14: /etc/cont-init.d/nginx.sh: Permission denied
cont-init: info: /etc/cont-init.d/nginx.sh exited 126
cont-init: info: running /etc/cont-init.d/otmonitor.sh
[20:19:45] INFO: Initializing service configuration.
[20:19:47] INFO: Using manually provided MQTT credentials
[20:19:48] INFO: Finished updating otmonitor config file.
cont-init: info: /etc/cont-init.d/otmonitor.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

which seem to be quite odd?

It's HA OS installation

andriej commented 2 years ago

@fliphess I see update in config.json to fix that probably? config is:

otgw:
  host: REDACTED
  port: REDACTED
  relay_port: 7686
mqtt:
  autoconfig: false
  broker: addon_core_mosquitto
  port: 1883
  username: REDACTED
  password: REDACTED
  client_id: otmonitor
  action_topic: actions/otmonitor
  event_topic: events/central_heating/otmonitor
  data_format: raw
  all_messages: false
  qos: 1
  retransmit: 10
email:
  enable: false
  recipient: recipient_here
  sender: sender_here
  user: user_here
  password: password_here
  server: mail_server_here
  port: 25
  secure: Plain
tspeak:
  enable: false
  key: key_here
  interval: 120
  sync: true
html_templates:
  enabled: false
  editable: false
fliphess commented 2 years ago

@andriej I was trying to fix the issues related to the upgrade of the s6-overlay in the hass base container but couldn't find why it was stil crashing...

The exit code 126 stands for “command not executable", so I think I know how to fix it (Setting +x permissions on all run scripts)

The fix is easy:

$ git update-index --chmod=+x rootfs/etc/service.d/my-service/run

(As mentioned in the hass docs)

I hope I can make some time to push a fix later this week, but I'm very busy with work lately, (And tbh because of the nice weather it's even harder to get behind a screen to fix stuff), so if you are in the mood for making a PR, be my highly appreciated guest :)

andriej commented 2 years ago

I've encountered problem after... SSD died and trying to get everything back online. I even switched to HA OS so don't have good direct access to any dev installations yet (even tho I'm not that much into running dockers unfortunately ;-))...

Will patiently wait for fix, currently managed to connect HA directly

fliphess commented 2 years ago

@andriej Luckily it's summertime so you won't be using it that much :)

I'll push a fix soon 👍

fliphess commented 2 years ago

It's such a small fix, the time I needed to respond on your issue took longer than the fix..... @andriej Can you give it a try and let me know if it works now?

andriej commented 2 years ago

I had to remove and re-add addon as releases under 'dev' don't show as new version - right? image but anyway - it started, I can see OTmonitor.

Now back to HA and connect it back... :-) Thanks!