Hassio on existing docker installation failing

I’m installing a new hassio etc on a Pi running docker (mainly because I find the hassio_supervisor interface too restrictive). I’m using the script at https://github.com/home-assistant/hassio-installer

It starts OK, installing hassio_dns but fails with requested access to the resource is denied\nunauthorized: authentication required when it tries to install home-assistant. Here’s the log.

Nov  1 16:06:22 docker4 hassio-supervisor[1166]: #033[32m19-11-01 16:06:22 INFO (SyncWorker_2) [hassio.docker.interface] Pull image homeassistant/armv7l-homeassistant tag landingpage.#033[0m
Nov  1 16:06:24 docker4 dockerd[617]: time="2019-11-01T16:06:24.540792840Z" level=error msg="Not continuing with pull after error: errors:\ndenied: requested access to the resource is denied\nunauthorized: authentication required\n"
Nov  1 16:06:24 docker4 dockerd[617]: time="2019-11-01T16:06:24.541020962Z" level=info msg="Ignoring extra error returned from registry: unauthorized: authentication required"
Nov  1 16:06:24 docker4 hassio-supervisor[1166]: #033[31m19-11-01 16:06:24 ERROR (SyncWorker_2) [hassio.docker.interface] Can't install homeassistant/armv7l-homeassistant:landingpage -> 404 Client Error: Not Found ("pull access denied for homeassistant/armv7l-homeassistant, repository does not exist or may require 'docker login': denied: requested access to the resource is denied").#033[0m
Nov  1 16:06:24 docker4 hassio-supervisor[1166]: #033[33m19-11-01 16:06:24 WARNING (MainThread) [hassio.homeassistant] Fails install landingpage, retry after 30sec#033[0m

I’ve used the same script successfully in the past.

1 Like

As an update, I tried doing a manual pull of homeassistant/armv7-hassio-supervisor and it fails with

Pulling repository docker.io/homeassistant/armv7-hassio-supervisor
Could not reach any registry endpoint

In fact you can list the available images in https://hub.docker.com and they correspond to the list of supported architectures “machines”: https://github.com/home-assistant/hassio-installer in the “Supported machine types” section; where you cannot find armv7, but instead, for instance: raspberrypi3

To use this machine you should execute: (use your machine type from the list inste’ad of raspberrypi3)

curl -sL https://raw.githubusercontent.com/home-assistant/hassio-installer/master/hassio_install.sh | bash -s -- -m raspberrypi3

I did that but I still had the same error as you:

"pull access denied for homeassistant/armv7l-homeassistant"

I digged a bit, and found the reason:
Like you … I executed the command:

curl -sL https://raw.githubusercontent.com/home-assistant/hassio-installer/master/hassio_install.sh | bash -s

and got message:

[ERROR] Please set machine for armv7l

I thought "Okay, I need to provide argument ‘-m armv7l’ " ==>> BAD
which I did: ==>> BAD !!!

curl -sL https://raw.githubusercontent.com/home-assistant/hassio-installer/master/hassio_install.sh | bash -s -- -m armv7l

The problem is that the script does not complain, it shall !!!
this creates the file /etc/hassio.json
with:

"homeassistant": "homeassistant/armv7l-homeassistant",

and also installs a “service” that starts the supervisor container using the script: /usr/sbin/hassio-supervisor

Ohhh, ok, let’s (try) to fix that:
if you run again the installer script and provide now the proper machine, and start again, you will find that even if /etc/hassio.json has the right value, the container still has the wrong value and complains with the same error !

The reason is in the start script: /usr/sbin/hassio-supervisor
the first time it uses : docker run ... -e HOMEASSISTANT_REPOSITORY=<value from /etc/hassio.json>
This sets the environment variable in the container :

"HOMEASSISTANT_REPOSITORY=homeassistant/armv7l-homeassistant"

which is stored in:
/var/lib/docker/containers/*/config.v2.json
but next times, it only does: docker start --attach, and does not override env vars…

So, the best thing to do since we did not create anything, it to start fresh. You could re-install from fresh OS, but it will be more efficient to do:

systemctl stop hassio-supervisor
docker stop $(docker ps -a -q)
docker rm $(docker ps -a -q)
docker rmi $(docker images -a -q)

and now, start over cleanly:

curl -sL https://raw.githubusercontent.com/home-assistant/hassio-installer/master/hassio_install.sh | bash -s -- -m raspberrypi3
journalctl -f -u  hassio-supervisor

Yeahhh…

2 Likes

Thanks, @laurent-martin.

As I was running out of time, I reverted the Pi to run the hassos image for now. However, now that you’ve found the source of the problem, I’ll rebuild the Pi again.

It shouldn’t take too long as I use Saltstack to manage my home infrastructure and I have a set of states to get from a bare Pi to a fully provisioned docker server ready to run the script on.

Gareth

However, this does look like a bug in the installer script. I opened an issue in github, so I’ll refer to this thread.

Hi guys,

I managed to get my hassio running in a docker environment, but every time I try to update homeassistant it usually fails. How do you update HA in this type of a setup?

Thanks,
Ville