Updater Problem: Exit Code 128 - Could not resolve host github.com

Hello,

I am running a raspian system with pihole and hassio as seperate docker containers.
My hassio system log shows the following repeating error:

20-01-21 07:01:04 ERROR (MainThread) [hassio.store.git] Can't update https://github.com/hassio-addons/repository repo: Cmd('git') failed due to: exit code(128)
  cmdline: git fetch --depth=1 --update-shallow -v origin
  stderr: 'fatal: unable to access 'https://github.com/hassio-addons/repository/': Could not resolve host: github.com'.

and the warning

20-01-21 07:01:04 WARNING (MainThread) [hassio.updater] Can't fetch versions from https://version.home-assistant.io/stable.json: Cannot connect to host version.home-assistant.io:443 ssl:None [Try again]

I was wondering what this message is about?
Does this mean Hassio can’t update itself at all or has this to do with addons only?

I installed the Terminal addon and pinged github.com from within hassio and it worked.

Can somebody point me into the right direction to fix the errors?

1 Like

I’m having this exact issue. I have verified I could resolve internal and external hostnames from the terminal but I am still getting the following message.

WARNING (MainThread) [hassio.updater] Can't fetch versions from https://version.home-assistant.io/stable.json: Cannot connect to host version.home-assistant.io:443 ssl:None [Try again]

My error persists too

mine as well

20-02-03 22:58:01 ERROR (MainThread) [hassio.store.git] Can't update https://github.com/home-assistant/hassio-addons repo: Cmd('git') failed due to: exit code(128)
  cmdline: git fetch --depth=1 --update-shallow -v origin
  stderr: 'fatal: unable to access 'https://github.com/home-assistant/hassio-addons/': Could not resolve host: github.com'.

I have the same problem on my Odroid C2.
It’s stuck on version
Supervisor 195 / HassOS 3.8 / Hass 0.104.2

It can’t update Supervisor/HassOS/Hass/AddOns anymore
Will have to look where i can report the bug report for an odroid C2 base

20-02-06 07:28:17 INFO (MainThread) [hassio.updater] Fetch update data from https://version.home-assistant.io/stable.json
20-02-06 07:28:22 WARNING (MainThread) [hassio.updater] Can't fetch versions from https://version.home-assistant.io/stable.json: Cannot connect to host version.home-assistant.io:443 ssl:None [Try again]
20-02-06 08:28:17 INFO (MainThread) [hassio.store.git] Update add-on https://github.com/home-assistant/hassio-addons repository
20-02-06 08:28:17 INFO (MainThread) [hassio.store.git] Update add-on https://github.com/hassio-addons/repository repository
20-02-06 08:28:22 ERROR (MainThread) [hassio.store.git] Can't update https://github.com/home-assistant/hassio-addons repo: Cmd('git') failed due to: exit code(128)
  cmdline: git fetch --depth=1 --update-shallow -v origin
  stderr: 'fatal: unable to access 'https://github.com/home-assistant/hassio-addons/': Could not resolve host: github.com'.
20-02-06 08:28:22 ERROR (MainThread) [hassio.store.git] Can't update https://github.com/hassio-addons/repository repo: Cmd('git') failed due to: exit code(128)
  cmdline: git fetch --depth=1 --update-shallow -v origin
  stderr: 'fatal: unable to access 'https://github.com/hassio-addons/repository/': Could not resolve host: github.com'.

I filed a bug-report here
https://github.com/home-assistant/supervisor/issues/1482
got a hint from @pvizeli
probably you guys can try if it works for you.

1 Like

Thanks for the info about the hint. Within the bug report thread you mentioned its said that one should

try to set 8.8.8.8 on the network config of HassOS.

How can I do that?

My setup: I run raspian and hassio within docker. So hassio created some additional containers like hassio-dns, hassio-supervisor, and home-assistant.

1 Like

Hi,
I´ve got exact the same error. with version 0.104.3. Hassio.
I initially suspected adguard, but even if it is deactivated, it does not work. Im also not able to add new repositories from github.

Best Regards

My issue was DNS. I am running pfSense and have a static reservation for HA. My DHCP scope was configured to set DNS to HA since I am running ADGuard. With pfSense you are able to specify an alternative DNS server for specific clients. Once I changed the DNS server for my HA reservation my issues went away.

It reminds me of one of my favorite haikus.

It’s not DNS
There’s no way it’s DNS
It was DNS

2 Likes

Yes… i also removed anything regarding of dns and after a several times of restarts the hassio and my router, the updatenotification appears…

Its not DNS … this time really :slight_smile:

Thanks for push me …

As I said, I have hassio running as docker container. Within hassio I installed pihole.

How can I fix it?

Ok what I tried:
When I enter ssh and type

ping github.com

it completes successfully.

If I go with

hassio homeassistant update
hassio supervisor update

it says "command completed successfully but nothing happens.
Within the log error code 128 persists.

I looked at

hassio dns info
hassio dns logs

but found nothing that indicated a problem.

hi, the main cause is, that

[hassio.updater] Fetch update data from https://version.home-assistant.io/stable.json

isnt reachable through hassio. you can see it in the systemlog.
to resolve this issue, login into your router and reset the dns ip that points to your pihole instance into the default ip. e.g. 192.168.1.1
restart your router / restart hassio and try again.

best luck

Ok I was able to fix the problem for good. Truth is pihole add-on in deed was the culprit.
But uninstalling or not using pihole was not an alternative for me. Two things I did and now updates within hassio work:

  1. go to pihole and enter a second upstream DNS service. I just had one
  2. And I guess that does the trick: make pihole listen on all Interfaces and all origins. Mine was set to only listen to eth0. Because of that it obviously wasn’t resolving any DNS queries from docker containers running on the very same machine, like hassio. With this setting enabled my hassio docker containers like hassio-supervisor, hassio-dns, home-assistant show up as separate hosts in the pihole client table and their DNS requests get properly resolved
3 Likes

I was able to solve this issue (I’m using Adguard, not Pi-Hole). See below post.

I am having the issue of not being able to resolve github host for addons. (hassos running in a VM)
I am using pfsense firewall with the following dns being forwarded to the host: local:

~ $ hassio dns info
host: 172.30.32.3
latest_version: "1"
locals:
- dns://192.168.20.1
- dns://8.8.8.8
- dns://8.8.4.4
servers:
- dns://8.8.8.8
version: "1"

After 2 restarts, also restarted the pfsense machine, home assistant is still not able to add new repositories. What could I do to resolve this? it is starting to get on my nerves…