Home Assistant Docker Container Does not always start on HassIO Boot

It seems 50/50 weather my HA starts when I reboot my HassIO machine. If the container does not start I have to SSH in and start it manually. Here’s my info:

arch 	armv7l
dev 	false
docker 	true
hassio 	true
os_name 	Linux
python_version 	3.7.3
timezone 	Europe/London
version 	0.92.2
virtualenv 	false
Lovelace
mode 	auto-gen

Running on a RPi3, good SD card, external MariaDB 10, good PSU, etc. When the container does not start, the Web UI just does not load, so I have to SSH in:

hassio > login
# docker container exec homeassistant cat /config/home-assistant.log
Error response from daemon: Container 722622fe4465720b449f8717c80c52968eac8b6a36e83a9b55709ea576d8e3df is not running
# docker container list
CONTAINER ID        IMAGE                                   COMMAND               CREATED             STATUS              PORTS               NAMES
6a0a082a993c        homeassistant/armhf-hassio-supervisor   "python3 -m hassio"   2 weeks ago         Up 10 months                            hassos_supervisor
# docker container start homeassistant
homeassistant
# docker container list
CONTAINER ID        IMAGE                                      COMMAND                  CREATED             STATUS              PORTS               NAMES
722622fe4465        homeassistant/raspberrypi3-homeassistant   "/bin/entry.sh pytho…"   5 days ago          Up 3 seconds                            homeassistant
6a0a082a993c        homeassistant/armhf-hassio-supervisor      "python3 -m hassio"      2 weeks ago         Up 10 months                            hassos_supervisor
# date
Wed May  8 16:37:55 UTC 2019
  ...
# uptime
16:47:22 up 13 min,  load average: 0.03, 0.17, 0.15

Here’s my log from the HassIO supervisor:

18-06-22 11:12:18 INFO (MainThread) [__main__] Initialize Hass.io setup
18-06-22 11:12:19 INFO (MainThread) [__main__] Setup HassIO
18-06-22 11:12:19 INFO (SyncWorker_0) [hassio.docker.supervisor] Attach to Supervisor homeassistant/armhf-hassio-supervisor with version 162
18-06-22 11:12:19 INFO (MainThread) [hassio.utils.gdbus] Introspect org.freedesktop.systemd1 on /org/freedesktop/systemd1
18-06-22 11:12:19 INFO (MainThread) [hassio.utils.gdbus] Connect to dbus: org.freedesktop.systemd1 - /org/freedesktop/systemd1
18-06-22 11:12:19 INFO (MainThread) [hassio.utils.gdbus] Introspect org.freedesktop.hostname1 on /org/freedesktop/hostname1
18-06-22 11:12:19 INFO (MainThread) [hassio.utils.gdbus] Connect to dbus: org.freedesktop.hostname1 - /org/freedesktop/hostname1
18-06-22 11:12:19 INFO (MainThread) [hassio.utils.gdbus] Introspect de.pengutronix.rauc on /
18-06-22 11:12:19 INFO (MainThread) [hassio.utils.gdbus] Connect to dbus: de.pengutronix.rauc - /
18-06-22 11:12:19 INFO (MainThread) [hassio.host.info] Update local host information
18-06-22 11:12:19 INFO (MainThread) [hassio.utils.gdbus] Call org.freedesktop.DBus.Properties.GetAll on /org/freedesktop/hostname1
18-06-22 11:12:19 INFO (MainThread) [hassio.host.services] Update service information
18-06-22 11:12:19 INFO (MainThread) [hassio.utils.gdbus] Call org.freedesktop.systemd1.Manager.ListUnits on /org/freedesktop/systemd1
18-06-22 11:12:19 INFO (MainThread) [hassio.host.apparmor] Load AppArmor Profiles: {'hassio-supervisor'}
18-06-22 11:12:19 INFO (MainThread) [hassio.host.services] Reload local service hassos-apparmor.service
18-06-22 11:12:19 INFO (MainThread) [hassio.utils.gdbus] Call org.freedesktop.systemd1.Manager.ReloadOrRestartUnit on /org/freedesktop/systemd1
18-06-22 11:12:19 INFO (SyncWorker_1) [hassio.docker.interface] Attach to homeassistant/raspberrypi3-homeassistant with version 0.92.2
18-06-22 11:12:20 INFO (MainThread) [hassio.hassos] Detect HassOS 2.11 on host system
18-06-22 11:12:20 INFO (SyncWorker_0) [hassio.docker.hassos_cli] Found HassOS CLI homeassistant/armhf-hassio-cli with version 9
18-06-22 11:12:20 INFO (MainThread) [hassio.addons.git] Load add-on /data/addons/core repository
18-06-22 11:12:20 INFO (MainThread) [hassio.addons.git] Load add-on /data/addons/git/a0d7b954 repository
18-06-22 11:12:21 INFO (MainThread) [hassio.addons] Load add-ons: 57 all - 57 new - 0 remove
18-06-22 11:12:21 INFO (SyncWorker_1) [hassio.docker.interface] Attach to homeassistant/armv7-addon-duckdns with version 1.6
18-06-22 11:12:21 INFO (SyncWorker_4) [hassio.docker.interface] Attach to homeassistant/armv7-addon-nginx_proxy with version 2.1
18-06-22 11:12:21 INFO (SyncWorker_5) [hassio.docker.interface] Attach to homeassistant/armhf-addon-git_pull with version 7.2
18-06-22 11:12:21 INFO (MainThread) [hassio.updater] Fetch update data from https://s3.amazonaws.com/hassio-version/stable.json
18-06-22 11:12:21 WARNING (MainThread) [hassio.updater] Can't fetch versions from https://s3.amazonaws.com/hassio-version/stable.json: Cannot connect to host s3.amazonaws.com:443 ssl:True [SSLCertVerificationError: (1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: certificate is not yet valid (_ssl.c:1056)')]
18-06-22 11:12:21 INFO (MainThread) [hassio.snapshots] Found 0 snapshot files
18-06-22 11:12:21 INFO (MainThread) [hassio.discovery] Load 0 messages
18-06-22 11:12:21 INFO (MainThread) [hassio.ingress] Load 0 ingress session
18-06-22 11:12:21 INFO (MainThread) [__main__] Run Hass.io
18-06-22 11:12:21 INFO (MainThread) [hassio.misc.dns] Start DNS port forwarding for host add-ons
18-06-22 11:12:21 INFO (MainThread) [hassio.api] Start API on 172.30.32.2
18-06-22 11:12:21 INFO (MainThread) [hassio.addons] Startup initialize run 0 add-ons
18-06-22 11:12:21 INFO (MainThread) [hassio.core] Hass.io reboot detected
18-06-22 11:12:21 INFO (MainThread) [hassio.tasks] All core tasks are scheduled
18-06-22 11:12:21 INFO (MainThread) [hassio.core] Hass.io is up and running
19-05-08 16:40:13 INFO (SyncWorker_19) [hassio.docker.addon] Start Docker add-on homeassistant/armv7-addon-duckdns with version 1.6
19-05-08 16:40:13 INFO (SyncWorker_4) [hassio.docker.addon] Start Docker add-on homeassistant/armv7-addon-nginx_proxy with version 2.1

Also my HassIO addons no longer auto-start, they have to be started manually.

Any idea on how I can fix this?

Thanks

1 Like

It says the Amazon AWS certificate is not yet valid.
I suspect the date & time on your machine are incorrect & set in the past.

Thanks, well spotted, it does look like the time is being set on boot up but it’s set after it checks the cert. The log files start logging 18-06-22 then end up on 19-05-08.

I’ve rebooted and logged in on SSH again to check the time:

hassio > login
# date
Thu May  9 13:47:15 UTC 2019
# ping time.google.com
time.google.com is alive!

So, is this normal behavior or if not how can I fix this?

EDIT: I’ve done another reboot and I’m getting a new error:

18-06-22 11:12:22 INFO (MainThread) [__main__] Run Hass.io
18-06-22 11:12:22 INFO (MainThread) [hassio.misc.dns] Start DNS port forwarding for host add-ons
18-06-22 11:12:22 INFO (MainThread) [hassio.api] Start API on 172.30.32.2
18-06-22 11:12:22 INFO (MainThread) [hassio.addons] Startup initialize run 0 add-ons
18-06-22 11:12:22 INFO (MainThread) [hassio.core] Hass.io reboot detected
18-06-22 11:12:22 INFO (MainThread) [hassio.tasks] All core tasks are scheduled
18-06-22 11:12:22 INFO (MainThread) [hassio.core] Hass.io is up and running
19-05-09 13:43:53 WARNING (MainThread) [hassio.tasks] Watchdog found a problem with Home Assistant Docker!
19-05-09 13:43:53 INFO (SyncWorker_0) [hassio.docker.interface] Start homeassistant/raspberrypi3-homeassistant
19-05-09 13:44:45 INFO (MainThread) [hassio.homeassistant] Detect a running Home Assistant instance
19-05-09 13:50:12 INFO (SyncWorker_18) [hassio.docker.addon] Start Docker add-on homeassistant/armv7-addon-duckdns with version 1.6
19-05-09 13:50:13 INFO (SyncWorker_19) [hassio.docker.addon] Start Docker add-on homeassistant/armv7-addon-nginx_proxy with version 2.1

The ‘Watchdog found a problem with Home Assistant Docker!’ is a new error I think, that may be why the containers are not starting?

If you are using the Hassio HassOs mage it is hard coded to get its time from Google servers. If you get access to the HAssOs you may be able to use the date command to check & set the date & time.

When I use the date command, the time is correct.

When Pinging the Google time server there is a reply.

The output from the terminal commands is in my previous post. :slight_smile:

@Codec303 did you ever find solution to your problem?
I am experiencing the same thing including the Watchdog error.

I run my Hassio in a LXC Docker environment atop a NAS.
Sometimes, when I restart the container, Hassio only starts with hassio_supervisor, hassio_dns and homeassistant. Rest has to be started manually even though it has autostart toggled.

@Codec303 did you ever find solution to your problem?

Hi @Fialad, I’m afraid not. :frowning:

I gave up trying to fix this and a few other random issues I had with HassIO, I’m now running HA under VENV with a the SystemD watchdog.

I wish I could offer a better ‘workaround’ than this, I did try NodeRED automations to launch the container, etc. but nothing worked for me.