Raspberry Pi4 B model 4GB Ram Home Assistant installation show below error and halted

[supervisor.homeassistant.core] Error on Home Assistant installation. Retrying in 30sec
[supervisor.docker.interface] Can’t install ghcr.io/home-assistant/aarch64-hassio-supervisor:2024.06.2: 500 Server Error for http+docker://localhost/v1.45/images/create?tag=2024.06.2&fromImage=ghcr.io%2Fhome-assistant%2Faarch64-hassio-supervisor&platform=linux%2Farm64: Internal Server Error (“Get “https://ghcr.io/v2/”: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)”)
[supervisor.supervisor] Update of Supervisor failed: Can’t install ghcr.io/home-assistant/aarch64-hassio-supervisor:2024.06.2: 500 Server Error for http+docker://localhost/v1.45/images/create?tag=2024.06.2&fromImage=ghcr.io%2Fhome-assistant%2Faarch64-hassio-supervisor&platform=linux%2Farm64: Internal Server Error (“Get “https://ghcr.io/v2/”: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)”)

Trying to install Home assistant on Raspberry Pi 4 as well and I got the same error.

Any idea on how to solve it yet?

Im also using LAN ethernet cable to router.

2024-07-27 17:47:58.000 ERROR (MainThread) [supervisor.supervisor] Update of Supervisor failed: Can’t install ghcr.io/home-
assistant
/aarch64-hassio-supervisor:2024.06.2: 500 Server Error for … : Internal Server Error (“Get “https://
ghcr.io/v2/”: context deadline exceeded (Client.Timeout exceeded while awaiting headers)”)
2024-07-27 17:47:58.000 CRITICAL (MainThread) [supervisor.core] Can’t update Supervisor! This will break some Add-ons or affect future versions of Home Assistant!)

Most likely your DNS server is not correctly resolving gchr.io. probably your ISPs fault. Set it to one of the week known ones like 8.8.8.8 or 9.9.9.9.

It doesnt appear to be dns error as the versin 11.0 of Home assistant got installed without any problem. but the version 10.x and 12.x having problem in installation.

I tried changing the DNS on the router settings and it did not work either.
were you able to download Home assistant version 11.0 then Vijay_Naru?

2 Likes

Hey nickrout, I tried changing my DNS to 8.8.8.8 and also later to 1.1.1.1 and it did not fixed the issue.
would you have any other insights on this to help me out?

Have you checked the DNS server issues documentation?

What are the commands

ha dns info

and

ha network info

telling?

Yes,Without changing anything I installed version 11.0 after downloading with the similar method which I was using for other versions. And it worked.

One more thing.

One more thing is that. this is the 2nd time that I installed 11.0 in 2 days. as when I tried to update it . It again hanged. So I have to restart the entire process and now loaded 11.0. and not updating it

HI Tamsy, Thank you for the reply. Attached is a picture of the commands.
Any insights?

I appreciate the help

Hi Vijay_Naru.
Where did you find the installation file for H.A 11.0.
Im using raspberry imager to dowload H.A to the sd card, and there I can only find version 12.4.

Thank you for your help

nameservers:
 -192.168.1.1
ready: true

All good on HA’s side.

Now look closer at your router (192.168.1.1). Make sure nothing outbound is blocked.

Try “https://ghcr.io/v2/” through a webbrowser. Does it show:

unauthorized

Hi Tamsy, Thanks for te reply again.
I tried searching on the web browsr of my laptop (connected to the wifi) the link above.
the following apeared:
{“errors”:[{“code”:“UNAUTHORIZED”,“message”:“authentication required”}]}

Thank you for your help,
I still dont have a solution for installing home assistant

So we know DNS is working without issues.

Have you retried the installation? Maybe it was just a temporary eror.

I get

{
  "errors": [
    {
      "code": "UNAUTHORIZED",
      "message": "authentication required"
    }
  ]
}

I tried several times to re install. I am always getting the H.A version 12.4 from the raspberry imager.

I don`t understand why it does not work.

Weird indeed. Considering that accessing “https://ghcr.io/v2/ ” through a webbrowser from a PC/Laptop connected to the very same LAN (192.168.1.x) as your RPI is in seems to work.

Did you configure your router to use DNS servers of your choice like nickrout has suggested above?

You can also configure HA to bypass your router’s DNS and directly use another DNS server. For this to work make sure your Router allows outbound traffic LAN → WAN on port 53 with protocol UDP.

From the CLI:

ha dns options --servers dns://8.8.8.8
ha dns restart

Also make sure your ISP is not doing ‘Transparent proxying’ in the background by rerouting all DNS traffic to their DNS servers without the users knowledge. Unfortunately this is a common technique in many countries.

Do a DNS Leak Test and make sure the output only shows the DNS servers you have configured on the router’s side.

3 Likes

Also check what your MTU is on your router (should likely be on WAN settings on most routers and should default to 1500 - need to know itlf it’s set to anything else… Anything smaller on any router between you and the download can cause issues - the HAOS container uses 1500. Insert technical reason why MTU even matters later. )

Ive seen a number of these weird can’t install issues because an MTU is set too small somewhere between the client and the source server so while it resolves it won’t download - but same error message (that error needs to be updated to denote bad name resolution v. bad download IMHO)
Reference posts: (no don’t edit your MTU down unless you confirm it’s a problem…)

3 Likes

@Vijay_Naru and @automatt
First, try disabling IPv6 in your HA installation and restart HA. If this doesn’t help, try disabling IPv6 in your router.

It’s not uncommon, that the DNS for ghcr.io is only resolved to IPv6, and that can (not must) cause problems. I’d say, it’s a 50/50 chance, so worth a try. :slight_smile:

2 Likes

SOLUTION!!!
The solution I found for the problem was to edit the DNS on the raspberry side of things.
In the beginning I changed the DNS on my Router and it did not work, I set it to the Google DNS 8.8.8.8.
So I tried used commands such as “network update end0 --ipv4-nameserver 8.8.8.8” and did not have success.
I also tried " dns options–servers dns://8.8.8.8" as @Tamsy suggested and it did not work for me.

So I used the command “login” to enter a different command window , where I used “nmcli con” will display the connection and the name of your host, mine was “Supervisor end0”. So I used “nmcli con edit “Supervisor end0”” to enter the nmcli environment. If you use the command “Print” you will see all the network parameters. My DNS was blank and set to automatic. So I used “remove ipv4.dns” in order to remove all entries from the ipv4.dns value. Then use the command “set ipv4.dns 8.8.8.8” which is the same as I set in my Router before . Enter "print"again and confirm the ipv4.dns value is correct. Finally enter “save” and “quit” to apply the changes and leave the nmcli container.

Then I “exit” to be returned to a login prompt, and use “root” again to enter the “ha >” CLI . So, I used “Host restart”, waited for a couple minutes and reload my webpage windown http://192.168.1.21:8123/.

After 10 minutes Home assistant was working properly.

Thank you for all that tried to help .

3 Likes