Homeassistant won't start at reboot

My hass.io homeassistant build has failed to start after a restart. I’m hoping someone might be able to explain how to start it again from the underlying resinos environment.

Just now, I was running the OZW control panel (using the ozwcp hass.io add-on), which meant that homeassistant was stopped. Then I did a hassio ho reboot (because ozwcp was playing up) and now homeassistant won’t start. I’ve tried a few cold / warm reboots, and it won’t come up.

The web server hasn’t started, nor has the SSH add-on. So I can’t access the web-front end or the SSH server. I can get into the underlying resin OS, though, with an ssh -p 22222 [email protected].

I’ve got plenty of room on the SD card. The resin-supervisor container starts fine and suggests that all is well:

root@hassio:/resin-data# docker logs resin_supervisor
...
19-02-03 22:24:47 INFO (MainThread) [__main__] Run Hass.io
19-02-03 22:24:47 INFO (MainThread) [hassio.misc.dns] Start DNS port forwarding for host add-ons
19-02-03 22:24:47 INFO (MainThread) [hassio.api] Start API on 172.30.32.2
19-02-03 22:24:47 INFO (MainThread) [hassio.addons] Startup initialize run 1 add-ons
19-02-03 22:24:48 WARNING (MainThread) [hassio.addons.addon] core_bluetooth_bcm43xx already running!
19-02-03 22:24:53 INFO (MainThread) [hassio.core] Hass.io reboot detected
19-02-03 22:24:53 INFO (MainThread) [hassio.tasks] All core tasks are scheduled
19-02-03 22:24:53 INFO (MainThread) [hassio.core] Hass.io is up and running

But there are very few containers running:

root@hassio:/resin-data# docker ps
CONTAINER ID        IMAGE                                         COMMAND               CREATED             STATUS              PORTS               NAMES
276f98094acf        homeassistant/armhf-addon-bluetooth_bcm43xx   "/run.sh"             About an hour ago   Up About an hour                        addon_core_bluetooth_bcm43xx
891be06758bb        homeassistant/armhf-hassio-supervisor         "python3 -m hassio"   2 weeks ago         Up 35 minutes                           resin_supervisor

Not only that, there don’t seem to be many docker containers at all (started or stopped) - home assistant and core ssh seem to be missing (among others):

root@hassio:/resin-data# docker ps -a
CONTAINER ID        IMAGE                                           COMMAND                  CREATED             STATUS                         PORTS                    NAMES
9ce4b7353ce0        27e642c6/armhf-addon-nodered                    "/usr/bin/entry.sh..."   About an hour ago   Exited (1) About an hour ago                            addon_27e642c6_nodered
276f98094acf        homeassistant/armhf-addon-bluetooth_bcm43xx     "/run.sh"                About an hour ago   Up About an hour                                        addon_core_bluetooth_bcm43xx
891be06758bb        homeassistant/armhf-hassio-supervisor           "python3 -m hassio"      2 weeks ago         Up 36 minutes                                           resin_supervisor
4ca1cfd4e405        homeassistant/armhf-addon-check_config          "/run.sh"                3 months ago        Exited (0) 3 months ago                                 addon_core_check_config
ffe4f74bd3c9        homeassistant/armhf-addon-configurator          "/run.sh"                6 months ago        Exited (255) 6 months ago      0.0.0.0:3218->3218/tcp   addon_core_configurator
49e1f962b2e4        homeassistant/resinos-hassio:1.3-raspberrypi3   "/bin/bash"              10 months ago       Exited (0) 35 minutes ago                               resinos

I could assume the worst: for some reason my build is burnt, but it doesn’t seem likely. What seems much more likely is that the resin-supervisor has restored the state that I was in before the first reboot, which is to say home-assistant stopped.

Is there some way I can start it again? Which container does the hassio cli run from? This doesn’t work:

root@hassio:/resin-data# docker exec -it resin_supervisor bash
bash-4.4# hassio
bash: hassio: command not found

Any help would be greatly appreciated!

In debug mode PORT 22222 see if you can find the log to see what the error is that is causing the problem… this is why you should restart home assistant not reboot the host. The restart won’t work if it fails the config check but if you reboot you’re stuck with a broken non-booting system.

Right - all of the above is from debug port 22222. I can’t find anything problematic in the logs I can read. I haven’t changed config, so don’t expect config check fail. Is there any way I can diagnose / start hass from 22222?

Similar problem here. Did you ever fix this?

My apologies - I should have provided an update. The fault was mine related to resinOS network config.

I use a local DNS / DHCP server to resolve a local naming / addressing strategy I use for the various endpoints on my home LAN. I had HA pointed to this (which is configured at the resinOS level). During my troubles with the OZW control panel, also I reconfigured the DNS / DHCP server (changed IP address, from memory), but didn’t think about the effect this would have on my HA build. When my HA server rebooted, it couldn’t get an IP address (or was it that it couldn’t see the DNS server - can’t remember). And HA refused to start.

I remember being a little bit surprised that either HA wouldn’t start anyway or that I didn’t get a more meaningful error message. But as soon as I fixed the DNS server configuration in the resinOS host all was well.