Hass.io - HomeAssistant Auto Restart

Is there anyway to get the Supervisor to auto restart the hass if it goes down?

That is literally what supervisor does…

This is exactly what I expected it to do; however, when hass crashes, the supervisor never recovers it. Hass has crashed 3 times in the last week - today for 4+ hours and the supervisor doesnt appear to log anything i would consider to be a recovery attempt - just that it can’t connect

Sounds like your power supply or sd-card to me…

Nope. It’s a VM on a stable AMD64 server running on Ubuntu.

EDIT: btw - I see a few posts about hass crashing when running hass.io and no one mentions auto restarts… Both on RPIs and VMs. Is it there out of the box? Is there additional config to do to enable it?

How did you set it up?
What is the status of the hassio-supervisor service?

I do get issues when I do a docker update that Hassio and HA containers don’t auto-restart but that is like once a month when there is a docker update and I can just start the containers again.

If it’s crashing there’s something else going on.

Thanks for the quick replies :slight_smile:

Something is wrong w/ home-assistant, but it’s the RC, so I expect issues - and i’m fine with it crashing - and if hass.io doesnt restart it - that’s fine too, I was more curious to see if it could. I’ve been reading the docs for the last 30 minutes and I dont see auto-restart a crashed instance as a feature or function anywhere. Are you sure that it does it?

As for hassio-supervisor - it seems happy. It’s continues to log when home-assistant proper is down, and it recognizes when it’s back up. My docker setup is stable. I havent changed anything in weeks.

Like I said that’s what it does. I am also running the beta (always run them) Crashes aren’t normal…

Can also confirm this behavior. If I kill the homeassistant container in portainer or something the supervisor spins it right back up.

I’ve been looking at this a bit and I think the issue is the issue may be the way home-assistant runs inside its container. When it crashes, the executing script never seems to exit, so docker doesnt know that it crashed.

So, in short, from what I’ve been able to read, the supervisor is not responsible for this. All it seems to do is set a restart policy w/ docker - but since the startup script isnt exiting for me, the policy never kicks off.

Yep, the supervisor just watches the container status.

This seems like a bug. You should report this specific crash on github.

This doesn’t seem correct to me. If I do a docker update, the Supervisor and Home Assistant containers never restart - I end up using Portainer to restart Supervisor - there seems to not be any restart-unless-stopped or any other kind of restart configured for HA in Docker. (I wish there was as all my other stuff outside Home Assistant restarts)

There is also a home-assistant service - is it started for your system? I think that is supposed to keep Supervisor running which keeps Home Assistant running. After a docker update, this service is always stopped on my system.