ThomDietrich/home-assistant-addons

When addon fails to connect on startup, it retries a number of times, and then gives up and stops

kristianwh opened this issue · 5 comments

After a power outage where both the router and my remote home assistant instance is restarted, the addon will not always be able to connect at startup, because the internet connection is not working yet. I have enabled the watchdog, and this causes it to reconnect multiple (10?) times, but at last, it just gives up, and the addon is stopped. Thus I cannot reach the instance, and have to physically restart it. I guess this should not happen - is there a maximum retries configuration for the watchdog, or is this caused by something else?

Last log messages:
ssh: Could not resolve hostname some.xample.comm: Name does not resolve
[15:35:50] ERROR: SSH service can't be reached on remote server
s6-rc: info: service legacy-services: stopping
s6-rc: info: service legacy-services successfully stopped
s6-rc: info: service legacy-cont-init: stopping
s6-rc: info: service legacy-cont-init successfully stopped
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

Note that I used a fake hostname now, to reproduce the behaviour on another installation.

Didn't investigate so far. Sounds like an SSH issue to solve via any configuration option. Did you check?

I'll investigate a bit more, will let you know what I find.

and the addon is stopped

Today I had this happen to me as well. My problem with this issue is: The docker container behaves just fine. The environment should restart the addon however. I thought this is the job of the "Watchdog" but apparently there is some hidden logic which eventually stops the service.

It would certainly be an option to handle this inside the image but need to invest some time to code&test... Hmmm

Just realized that there is already an issue for this. Care to continue the conversation over in #17 ?