davidusb-geek / emhass-add-on

The Home Assistant Add-on for EMHASS: Energy Management Optimization for Home Assistant
MIT License
96 stars 29 forks source link

s6-overlay-suexec: fatal: can only run as pid 1 #7

Closed purcell-lab closed 2 years ago

purcell-lab commented 2 years ago

Upgrade/ Fresh install to 0.2.1 fails:

image


2022-05-13 21:53:01 ERROR (MainThread) [homeassistant.components.hassio] Failed to to call /addons/5b918bf2_emhass/stats - Container addon_5b918bf2_emhass is not running
2022-05-13 21:53:01 ERROR (MainThread) [homeassistant.components.hassio] Failed to to call /addons/5b918bf2_emhass/stats - Container addon_5b918bf2_emhass is not running
purcell-lab commented 2 years ago

Issue still present upgrading to 0.2.2

davidusb-geek commented 2 years ago

Hi, I'm working on solving this...

purcell-lab commented 2 years ago

Upgrade to 0.2.3:


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
s6-rc: info: service legacy-cont-init successfully started
s6-rc: info: service legacy-services: starting
services-up: info: copying legacy longrun emhass (no readiness notification)
s6-supervise emhass: warning: unable to spawn ./run - waiting 10 seconds
s6-supervise emhass (child): fatal: unable to exec run: Permission denied
s6-supervise emhass: warning: unable to spawn ./run - waiting 10 seconds
s6-supervise emhass (child): fatal: unable to exec run: Permission denied
s6-supervise emhass: warning: unable to spawn ./run - waiting 10 seconds
s6-supervise emhass (child): fatal: unable to exec run: Permission denied
s6-supervise emhass: warning: unable to spawn ./run - waiting 10 seconds
s6-supervise emhass (child): fatal: unable to exec run: Permission denied
davidusb-geek commented 2 years ago

Ok, they upgraded s6 overlay from v2 to v3 and that broke a lot of add-ons out there. I applied the proposed solution. Let's see if it works. An open discussion here: https://community.home-assistant.io/t/hello-world-example-addon-from-developer-docs-stopped-working-s6-overlay-issue/421486

davidusb-geek commented 2 years ago

In the meantime if that doesn't work. I upgraded the main emhass core module and it can now be used with docker in standalone mode. So not as an add-on but as an external container. It should be able to communicate fine with HA. I've added a new Model Predictive Control !!!

purcell-lab commented 2 years ago

Thanks,

Yes very much looking forward to MPC!

On Sat, 14 May 2022, 08:41 David, @.***> wrote:

In the meantime if that doesn't work. I upgraded the main emhass core module and it can now be used with docker in standalone mode. So not as an add-on but as an external container. It should be able to communicate fine with HA. I've added a new Model Predictive Control !!!

— Reply to this email directly, view it on GitHub https://github.com/davidusb-geek/emhass-add-on/issues/7#issuecomment-1126557679, or unsubscribe https://github.com/notifications/unsubscribe-auth/AS4B3XX3SE6DTA6VA2EAGXDVJ3LB3ANCNFSM5V3EYNFA . You are receiving this because you authored the thread.Message ID: @.***>

purcell-lab commented 2 years ago

Loading at start now with 0.2.5, thanks for the quick turn around with the upstream changes.

I like the additional data in the logging now as well.

I'll have a play around and check out MPC.


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
s6-rc: info: service legacy-cont-init successfully started
s6-rc: info: service legacy-services: starting
services-up: info: copying legacy longrun emhass (no readiness notification)
s6-rc: info: service legacy-services successfully started
[2022-05-14 10:14:33,808] INFO in web_server: Launching the emhass webserver at: http://0.0.0.0:5000
[2022-05-14 10:14:33,809] INFO in web_server: Home Assistant data fetch will be performed using url: http://supervisor/core/api
[2022-05-14 10:14:33,809] INFO in web_server: The base path is: /usr/src
[2022-05-14 10:14:33,814] INFO in web_server: Using core emhass version: 0.3.2