Hass.io requires docker restart to start sucessfully

Hi!

I installed Hass.io on the fresh installation of Ubuntu 18.04.1 server following these instructions: https://www.home-assistant.io/hassio/installation/
It has been working almost fine since I installed it (2 months ago), but from the very beginning one thing puzzles me: Home Assistant never starts automatically when I reboot the host OS (Ubuntu).

When I login into Ubuntu and check what containers are running I get nothing:

max@maxnotaserver:~$ sudo docker ps
CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS              PORTS               NAMES
max@maxnotaserver:~$

But if I restart the docker:

max@maxnotaserver:/usr/local/bin$ sudo systemctl restart docker.service
[sudo] password for max:
max@maxnotaserver:/usr/local/bin$

And check in a couple of minutes I get everything running successfully:

max@maxnotaserver:/usr/local/bin$ sudo docker ps
CONTAINER ID        IMAGE                                    COMMAND                  CREATED             STATUS              PORTS                    NAMES
9876645a5e14        homeassistant/amd64-addon-configurator   "/run.sh"                4 minutes ago       Up 4 minutes        0.0.0.0:3218->3218/tcp   addon_core_configurator
8fab92314bfe        hassioaddons/log-viewer                  "/init"                  4 minutes ago       Up 4 minutes        0.0.0.0:4277->4277/tcp   addon_a0d7b954_logviewer
1cb208c06346        homeassistant/qemux86-64-homeassistant   "/bin/entry.sh pytho…"   5 minutes ago       Up 5 minutes                                 homeassistant
faa1814752ce        homeassistant/amd64-addon-samba          "/run.sh"                5 minutes ago       Up 5 minutes                                 addon_core_samba
6d6c7204ac44        homeassistant/amd64-addon-rpc_shutdown   "/usr/bin/entry.sh /…"   5 minutes ago       Up 5 minutes                                 addon_core_rpc_shutdown
1e8f1a61be2a        homeassistant/amd64-hassio-supervisor    "python3 -m hassio"      3 weeks ago         Up 5 minutes                                 hassio_supervisor
max@maxnotaserver:/usr/local/bin$

I would be happy to get any clues to where should I look into!

I ended up setting up a script to restart the docker service in 5 minutes after boot, which works, but is quite ugly :frowning:

Thanks!
Max.

I inspected logs with journalctl -u hassio-supervisor.service -b and I see that the daemon repeatedly reports the error and tries to restart indefinately:

Jan 05 13:42:55 maxnotaserver systemd[1]: Starting Hass.io supervisor...
Jan 05 13:42:59 maxnotaserver systemd[1]: Started Hass.io supervisor.
Jan 05 13:42:59 maxnotaserver docker[1676]: hassio_supervisor
Jan 05 13:43:03 maxnotaserver hassio-supervisor[1830]: Error response from daemon: error while creating mount source path '/usr/share/hassio': mkdir /usr/share/hassio: read-only file system
Jan 05 13:43:03 maxnotaserver hassio-supervisor[1830]: hassio_supervisor
Jan 05 13:43:06 maxnotaserver hassio-supervisor[1830]: docker: Error response from daemon: error while creating mount source path '/usr/share/hassio': mkdir /usr/share/hassio: read-only file system.
Jan 05 13:43:06 maxnotaserver hassio-supervisor[1830]: time="2019-01-05T13:43:06+03:00" level=error msg="error waiting for container: context canceled"
Jan 05 13:43:06 maxnotaserver systemd[1]: hassio-supervisor.service: Main process exited, code=exited, status=125/n/a
Jan 05 13:43:06 maxnotaserver systemd[1]: hassio-supervisor.service: Failed with result 'exit-code'.
Jan 05 13:43:11 maxnotaserver systemd[1]: hassio-supervisor.service: Service hold-off time over, scheduling restart.
Jan 05 13:43:11 maxnotaserver systemd[1]: hassio-supervisor.service: Scheduled restart job, restart counter is at 1.
Jan 05 13:43:11 maxnotaserver systemd[1]: Stopped Hass.io supervisor.
Jan 05 13:43:11 maxnotaserver systemd[1]: Starting Hass.io supervisor...
Jan 05 13:43:12 maxnotaserver docker[1976]: hassio_supervisor
Jan 05 13:43:12 maxnotaserver systemd[1]: Started Hass.io supervisor.
Jan 05 13:43:14 maxnotaserver hassio-supervisor[1997]: time="2019-01-05T13:43:14+03:00" level=error msg="error waiting for container: context canceled"
Jan 05 13:43:14 maxnotaserver hassio-supervisor[1997]: Error response from daemon: error while creating mount source path '/usr/share/hassio': mkdir /usr/share/hassio: read-only file system
Jan 05 13:43:15 maxnotaserver hassio-supervisor[1997]: hassio_supervisor
Jan 05 13:43:18 maxnotaserver hassio-supervisor[1997]: docker: Error response from daemon: error while creating mount source path '/usr/share/hassio': mkdir /usr/share/hassio: read-only file system.
Jan 05 13:43:18 maxnotaserver hassio-supervisor[1997]: time="2019-01-05T13:43:18+03:00" level=error msg="error waiting for container: context canceled"
Jan 05 13:43:18 maxnotaserver systemd[1]: hassio-supervisor.service: Main process exited, code=exited, status=125/n/a
Jan 05 13:43:18 maxnotaserver systemd[1]: hassio-supervisor.service: Failed with result 'exit-code'.
Jan 05 13:43:23 maxnotaserver systemd[1]: hassio-supervisor.service: Service hold-off time over, scheduling restart.
Jan 05 13:43:23 maxnotaserver systemd[1]: hassio-supervisor.service: Scheduled restart job, restart counter is at 2.
Jan 05 13:43:23 maxnotaserver systemd[1]: Stopped Hass.io supervisor.
Jan 05 13:43:23 maxnotaserver systemd[1]: Starting Hass.io supervisor...
Jan 05 13:43:23 maxnotaserver docker[2119]: hassio_supervisor
Jan 05 13:43:23 maxnotaserver systemd[1]: Started Hass.io supervisor.

I found a simiar issue: Files still there, but Docker container gone? Help, please!
That topic starter mentioned that he didn’t follow docker installation guidelines strictly. I figured out so did I! I installed docker not according to https://docs.docker.com/install/linux/docker-ce/ubuntu/instructions. I reinstalled everything from scratch (including host OS Ubuntu), and it now works great for me!

1 Like