home-assistant / supervisor

:house_with_garden: Home Assistant Supervisor
https://home-assistant.io/hassio/
Apache License 2.0
1.74k stars 640 forks source link

Supervisor failed to set up after trying to update Core to 2023.9 #4531

Closed oleg-d closed 11 months ago

oleg-d commented 1 year ago

Describe the issue you are experiencing

I was updating from 2023.8.3 to 2023.9 and it seems the update failed. Now the supervisor is saying "failed to set up"

What type of installation are you running?

Home Assistant OS

Which operating system are you running on?

Home Assistant Operating System

Steps to reproduce the issue

  1. Have supervisor 2023.8.3 installed
  2. Update offered in the UI
  3. Click Update
  4. Update seemingly does not work
  5. Restart HA

Anything in the Supervisor logs that might be useful for us?

23-09-07 08:19:56 ERROR (MainThread) [supervisor.store.git] Can't update https://github.com/home-assistant/addons repo: Cmd('git') failed due to: exit code(128)
  cmdline: git fetch -v --update-shallow --depth=1 -- origin
  stderr: 'fatal: unable to access 'https://github.com/home-assistant/addons/': Failed to connect to github.com port 443 after 130268 ms: Couldn't connect to server'.
23-09-07 08:19:58 INFO (MainThread) [supervisor.store] Loading add-ons from store: 76 all - 0 new - 0 remove
23-09-07 08:19:58 INFO (MainThread) [supervisor.store] Loading add-ons from store: 76 all - 0 new - 0 remove
23-09-07 08:19:58 ERROR (MainThread) [asyncio] Task exception was never retrieved
future: <Task finished name='Task-52834' coro=<Repository.update() done, defined at /usr/src/supervisor/supervisor/store/repository.py:104> exception=StoreGitError()>
Traceback (most recent call last):
  File "/usr/src/supervisor/supervisor/store/git.py", line 136, in pull
    await self.sys_run_in_executor(
  File "/usr/local/lib/python3.11/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/git/remote.py", line 1015, in fetch
    res = self._get_fetch_info_from_stderr(proc, progress, kill_after_timeout=kill_after_timeout)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/git/remote.py", line 854, in _get_fetch_info_from_stderr
    proc.wait(stderr=stderr_text)
  File "/usr/local/lib/python3.11/site-packages/git/cmd.py", line 604, in wait
    raise GitCommandError(remove_password_if_present(self.args), status, errstr)
git.exc.GitCommandError: Cmd('git') failed due to: exit code(128)
  cmdline: git fetch -v --update-shallow --depth=1 -- origin
  stderr: 'fatal: unable to access 'https://github.com/home-assistant/addons/': Failed to connect to github.com port 443 after 130268 ms: Couldn't connect to server'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
  File "/usr/src/supervisor/supervisor/store/repository.py", line 108, in update
    await self.git.pull()
  File "/usr/src/supervisor/supervisor/jobs/decorator.py", line 266, in wrapper
    raise err
  File "/usr/src/supervisor/supervisor/jobs/decorator.py", line 264, in wrapper
    return await self._method(obj, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/supervisor/supervisor/store/git.py", line 178, in pull
    raise StoreGitError() from err
supervisor.exceptions.StoreGitError

System Health information

Unable to copy - there is infinite loading spinner

Supervisor diagnostics

home-assistant_hassio_2023-09-07T05-21-08.603Z.log

Additional information

No response

agners commented 1 year ago

I was updating from 2023.8.3 to 2023.9

Is that referring to the Core version?

Have supervisor 2023.8.3 installed

The current version of Supervisor on the stable channel is 2023.08.3.

In the log it seems that Supervisor can't access GitHub. Maybe this was a temporary outage?

In any case, this should not be fatal. How do you determine "Supervisor failed to set up"? The attached log seems to be from Home Assistant Core. Can you share the full Supervisor log?

Can you try to restart the Supervisor again (ha su reload).

oleg-d commented 1 year ago

This is what I am seeing image

Log attached [Uploading supervisor_2023-09-07T08-33-43.686Z.log…]()

vrioux commented 1 year ago

Same problem here. Also, ha CLI isn't workable anymore. For example:

➜ ~ ha panic: runtime error: invalid memory address or nil pointer dereference [signal SIGSEGV: segmentation violation code=0x1 addr=0x8 pc=0x1f1dc4]

goroutine 1 [running]: crypto/tls.init() /opt/hostedtoolcache/go/1.19.10/x64/src/crypto/tls/alert.go:53 +0x4

Murder3D commented 1 year ago

Can confirm, same issue here. Got the notification of update available for Supervisor v2023.9 and it seems that it failed/couldn't complete correctly. After a reboot I have this under Settings --> Devices and Services: image

Can confirm that - excluding the error message in the logs - everything seems to be working just fine at least from what I can tell (I'm far from an expert).

Web UI is reachable, automations are working, Alexa can communicate with HA via haaska, external access via DuckDNS is working...

My HA OS instance is installed on a physical machine (Dell SFF PC).

MikeDeltaHH commented 1 year ago

Have the same issue after a reboot but with Core 2023.8!

https://github.com/home-assistant/core/issues/90558

jkasten80 commented 1 year ago

Same issue here with haos vm on proxmox.

Home Assistant 2023.9.0 Supervisor 2023.08.3 Operating System 10.5 Frontend 20230906.1 - latest

Calimerorulez commented 1 year ago

Same here, on Supervisor 2023.08.3/HA 2023.9.0, Github access error:

23-09-08 07:29:53 ERROR (MainThread) [asyncio] Task exception was never retrieved
future: <Task finished name='Task-27226' coro=<Repository.update() done, defined at /usr/src/supervisor/supervisor/store/repository.py:104> exception=StoreGitError()>
Traceback (most recent call last):
  File "/usr/src/supervisor/supervisor/store/git.py", line 136, in pull
    await self.sys_run_in_executor(
  File "/usr/local/lib/python3.11/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/git/remote.py", line 1015, in fetch
    res = self._get_fetch_info_from_stderr(proc, progress, kill_after_timeout=kill_after_timeout)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/git/remote.py", line 854, in _get_fetch_info_from_stderr
    proc.wait(stderr=stderr_text)
  File "/usr/local/lib/python3.11/site-packages/git/cmd.py", line 604, in wait
    raise GitCommandError(remove_password_if_present(self.args), status, errstr)
git.exc.GitCommandError: Cmd('git') failed due to: exit code(128)
  cmdline: git fetch -v --update-shallow --depth=1 -- origin
  stderr: 'fatal: unable to access 'https://github.com/esphome/home-assistant-addon/': Failed to connect to github.com port 443 after 131351 ms: Couldn't connect to server'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
  File "/usr/src/supervisor/supervisor/store/repository.py", line 108, in update
    await self.git.pull()
  File "/usr/src/supervisor/supervisor/jobs/decorator.py", line 266, in wrapper
    raise err
  File "/usr/src/supervisor/supervisor/jobs/decorator.py", line 264, in wrapper
    return await self._method(obj, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/supervisor/supervisor/store/git.py", line 178, in pull
    raise StoreGitError() from err
supervisor.exceptions.StoreGitError

/edit: I haven't been trying to update to core 2023.9, but I'm seeing the error since the upgrade to HA 2023.9.0.

Murder3D commented 1 year ago

Hi,

to everyone experiencing this issue, please refer to the solution provided by @SalvatoreITA in this thread --> https://github.com/home-assistant/core/issues/99862

1) Settings --> System --> Network --> IPv4 --> change the DNS address to something like 1.1.1.1 or 8.8.8.8 (I was using my PiHole as both DHCP and DNS server).

2) Reboot the machine.

3) An update notification should pop-up asking you to update to 2023.9.0, do it.

4) After the update is complete, change the DNS addess to the one you had before.

5) Reboot the machine

image

image

image

SalvatoreITA commented 1 year ago

CIAO,

a tutti coloro che riscontrano questo problema, fare riferimento alla soluzione fornita da@SalvatoreITAin questo thread --> home-assistant/core#99862

  1. Impostazioni --> Sistema --> Rete --> IPv4 --> cambia l'indirizzo DNS in qualcosa come 1.1.1.1 o 8.8.8.8 (stavo usando il mio PiHole sia come server DHCP che DNS).
  2. Riavviare la macchina.
  3. Dovrebbe apparire una notifica di aggiornamento che ti chiede di aggiornare alla versione 2023.9.0, fallo.
  4. Una volta completato l'aggiornamento, modifica l'indirizzo DNS con quello che avevi prima.
  5. Riavviare la macchina

Immagine

Immagine

Immagine

Nice to have helped you

oleg-d commented 1 year ago

@Murder3D thank you that fixed it for me too. i was also using pihole dns.

Arn0uDz commented 1 year ago

I was already using 8.8.8.8 and got this error.

Metroseksuaali commented 1 year ago

Changing DNS fixed it for me.

agners commented 1 year ago

Hm, so it seems that the PiHole DNS is problematic :thinking: Using a different DNS server for Home Assistant is probably the best way out here.

Where did you install PiHole from? The one from the add-on community repository has been deprecated since quite a while (see https://github.com/hassio-addons/addon-pi-hole).

beansidhe commented 1 year ago

I had a the same problem, SW restart did not solve. I needed to do a power cycle. That solved to the supervisor startup errors

snarby2013 commented 1 year ago

changed dns to 1.1.1.1, rebooted still have issues. Also tried dns on pihole to same 1.1.1.1 but supervisor wont start

snarby2013 commented 1 year ago

Hm, so it seems that the PiHole DNS is problematic 🤔 Using a different DNS server for Home Assistant is probably the best way out here.

Where did you install PiHole from? The one from the add-on community repository has been deprecated since quite a while (see https://github.com/hassio-addons/addon-pi-hole).

my pihole is on a standalone pi4

elkarto commented 1 year ago

Same problem here. Sometimes HA starts well and others this problem arises.

Using adguard home as DNS.

github.com is resolving without issues, sometimes it resolves with one IP and sometimes with other, but it's reachable from my network in both IPs.

Tried to force resolution to only one IP in my adguard, same problem (tried twice, one IP each time).

Tried to force DNS in HA to 1.1.1.1 It seems to workaround the issue but I dont know if always or only sometimes. But this is not a solution for me as I need my local DNS names.

github-actions[bot] commented 11 months ago

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

elkarto commented 11 months ago

This is still an issue.

Core 2023.11.2 Supervisor 2023.11.0 Operating System 11.1