After a clean new installation of Version 0.108.9 a restart tasks more than 16 minutes

Hi, I want to install a new hassio instance for multiple home assistant use. After a simply clean new installation of home assistant with v.0.108.9 without any installed add-ons or backup’s a restart takes more than 16 minutes. I have tried this several times with different Raspberry’s (3, 3B+ and 4) and with different mSD-cards and also via VirtualBox. Always with the some result. Every restart of home assistant (no Host restart!) takes so long time. I have already two other hassio instances running on v.0.108.9. These two runs perfect. But this were getting updated from old versions to v.108.9. Is there a gerernal bug in hassio v.0.108.9 or any newer near by version v.0.108.9?

20-04-26 15:03:02 WARNING (MainThread) [supervisor.homeassistant] Don’t wait anymore of Home Assistant startup!

Did you read the instructions?

This applies to the first time you start home assistant whether you are using a pi or not.

First thanks for your answer. Yes of course I know that the first boot up takes about 20 minutes (download latest version etc.). I mean after finished the whole first installation. Every restart, just of HA takes over 16 minutes . I have already installed a few HA systems, but with earlier versions and updated them to v.0.108.9. All this installations runs perfect. Now I need one more HA instance and have this issue. After the long boot up (after first installation) the systems runs well, but if you have to wait more then 16 minutes after every restart to get HA running it’s not that great ;-).

Whats in the logfile next to the configuration.yaml file?

After the installation I get on this log:

20-04-26 19:23:55 INFO (MainThread) [supervisor.addons] Create Home Assistant add-on data folder /data/addons/data/core_configurator
20-04-26 19:23:55 INFO (SyncWorker_14) [supervisor.docker.interface] Pull image homeassistant/armv7-addon-configurator tag 5.0.0.
20-04-26 19:24:33 INFO (MainThread) [supervisor.addons] Add-on ‘core_configurator’ successfully installed
20-04-26 19:24:41 INFO (SyncWorker_6) [supervisor.docker.addon] Start Docker add-on homeassistant/armv7-addon-configurator with version 5.0.0
20-04-26 19:24:45 INFO (MainThread) [supervisor.homeassistant] Updated Home Assistant API token
20-04-26 19:24:45 INFO (MainThread) [supervisor.ingress] Update Ingress as panel for core_configurator
20-04-26 19:24:46 ERROR (MainThread) [supervisor.api.ingress] Ingress error: Cannot connect to host 172.30.33.0:8099 ssl:None [Connection refused]
2020-04-26 21:26:19 ERROR (MainThread) [aiohttp.server] Unhandled exception
Traceback (most recent call last):
File “/usr/local/lib/python3.7/site-packages/aiohttp/web_protocol.py”, line 461, in start
await prepare_meth(request)
File “/usr/local/lib/python3.7/site-packages/aiohttp/web_fileresponse.py”, line 224, in prepare
st = await loop.run_in_executor(None, filepath.stat)
File “/usr/local/lib/python3.7/concurrent/futures/thread.py”, line 57, in run
result = self.fn(*self.args, **self.kwargs)
File “/usr/local/lib/python3.7/pathlib.py”, line 1178, in stat
return self._accessor.stat(self)
FileNotFoundError: [Errno 2] No such file or directory: ‘/config/home-assistant.log’

After the first restart after installation (takes from now always over 16 minutes) I get this over ssh command (core logs were empty):

➜ ~ ha supervisor logs
20-04-26 19:46:32 INFO (MainThread) [supervisor.addons] Create Home Assistant add-on data folder /data/addons/data/a0d7b954_ssh
20-04-26 19:46:32 INFO (SyncWorker_6) [supervisor.docker.interface] Pull image hassioaddons/ssh-armv7 tag 7.4.0.
20-04-26 19:48:58 INFO (SyncWorker_3) [supervisor.docker.interface] Pull image hassioaddons/ssh-armv7 tag 7.4.0.
20-04-26 19:49:31 INFO (MainThread) [supervisor.addons] Add-on ‘a0d7b954_ssh’ successfully installed
20-04-26 19:49:31 INFO (MainThread) [supervisor.addons] Add-on ‘a0d7b954_ssh’ successfully installed
20-04-26 19:50:28 INFO (MainThread) [supervisor.ingress] Update Ingress as panel for a0d7b954_ssh
20-04-26 19:50:47 INFO (SyncWorker_19) [supervisor.docker.addon] Start Docker add-on hassioaddons/ssh-armv7 with version 7.4.0
20-04-26 19:50:49 ERROR (MainThread) [supervisor.api.ingress] Ingress error: Cannot connect to host 172.30.32.1:63085 ssl:None [Connection refused]
20-04-26 19:50:53 INFO (MainThread) [supervisor.api.security] /host/info access from a0d7b954_ssh
20-04-26 19:51:20 ERROR (MainThread) [supervisor.api.ingress] Ingress error: Cannot connect to host 172.30.32.1:63085 ssl:None [Connection refused]
20-04-26 19:51:23 ERROR (MainThread) [supervisor.api.ingress] Ingress error: Cannot connect to host 172.30.32.1:63085 ssl:None [Connection refused]
20-04-26 19:51:26 ERROR (MainThread) [supervisor.api.ingress] Ingress error: Cannot connect to host 172.30.32.1:63085 ssl:None [Connection refused]
20-04-26 19:51:31 ERROR (MainThread) [supervisor.api.ingress] Ingress error: Cannot connect to host 172.30.32.1:63085 ssl:None [Connection refused]
20-04-26 19:51:35 ERROR (MainThread) [supervisor.api.ingress] Ingress error: Cannot connect to host 172.30.32.1:63085 ssl:None [Connection refused]
20-04-26 19:51:38 ERROR (MainThread) [supervisor.api.ingress] Ingress error: Cannot connect to host 172.30.32.1:63085 ssl:None [Connection refused]
20-04-26 19:51:56 INFO (MainThread) [supervisor.api.security] /core/logs access from a0d7b954_ssh
20-04-26 19:52:04 INFO (MainThread) [supervisor.api.security] /supervisor/logs access from a0d7b954_ssh

Do you have Samsung TV in config? Try to comment it out with # and reboot.

Optionally:
add

  auth_providers:
    - type: trusted_networks
      trusted_networks:
        - 172.16.0.0/12

under homeassistant:

in your configuration.yaml…

Yes I have a Samsung TV in my Network. But this is a clean new installation without any modification.
This is the configuration.yaml after installation. I’ll try it anyway.


# Configure a default setup of Home Assistant (frontend, api, etc)
default_config:

# Uncomment this if you are using SSL/TLS, running in Docker container, etc.
# http:
#   base_url: example.duckdns.org:8123

# Text to speech
tts:
  - platform: google_translate

group: !include groups.yaml
automation: !include automations.yaml
script: !include scripts.yaml
scene: !include scenes.yaml

Is your SD card too slow?

This looks like home assistant cant connect to the ssh addon. Which is installed by default but is disabled. Try going to your profile and enabling advanced mode then checking the SSH addon.

I tested this with different SD cards and different Raspberry’s (3, 3B+, 4) and on top via VirtualBox. Always with the some result. Used mSD cards are:

  • ScanDisk extrem pro 100/90 (MB/sec read/write)
  • Tosihba M402

I don’t think the cause is the hardware

I will check this. After last restart incl. auth_providers in my empty configuartion.yaml a get this in my log:

20-04-27 06:06:38 INFO (MainThread) [supervisor.api.security] /supervisor/logs access from a0d7b954_ssh
20-04-27 06:06:40 INFO (MainThread) [supervisor.api.security] /core/logs access from a0d7b954_ssh
20-04-27 06:06:45 INFO (MainThread) [supervisor.api.security] /supervisor/logs access from a0d7b954_ssh
20-04-27 06:09:41 WARNING (MainThread) [supervisor.homeassistant] Don't wait anymore of Home Assistant startup!
20-04-27 06:09:41 ERROR (MainThread) [asyncio] Task exception was never retrieved
future: <Task finished coro=<process_lock.<locals>.wrap_api() done, defined at /usr/src/supervisor/supervisor/utils/__init__.py:22> exception=HomeAssistantError()>
Traceback (most recent call last):
  File "/usr/src/supervisor/supervisor/utils/__init__.py", line 31, in wrap_api
    return await method(api, *args, **kwargs)
  File "/usr/src/supervisor/supervisor/homeassistant.py", line 417, in restart
    await self._block_till_run()
  File "/usr/src/supervisor/supervisor/homeassistant.py", line 627, in _block_till_run
    raise HomeAssistantError()
supervisor.exceptions.HomeAssistantError
20-04-27 06:12:35 INFO (MainThread) [supervisor.host.info] Update local host information
20-04-27 06:12:35 INFO (MainThread) [supervisor.utils.gdbus] Call org.freedesktop.DBus.Properties.GetAll on /org/freedesktop/hostname1
20-04-27 06:12:36 INFO (MainThread) [supervisor.host.services] Update service information
20-04-27 06:12:36 INFO (MainThread) [supervisor.utils.gdbus] Call org.freedesktop.systemd1.Manager.ListUnits on /org/freedesktop/systemd1
20-04-27 06:12:36 INFO (MainThread) [supervisor.host.network] Update local network DNS information
20-04-27 06:12:36 INFO (MainThread) [supervisor.utils.gdbus] Call org.freedesktop.DBus.Properties.GetAll on /org/freedesktop/NetworkManager/DnsManager
20-04-27 06:12:36 INFO (MainThread) [supervisor.host.sound] Update PulseAudio information
20-04-27 06:16:12 INFO (MainThread) [supervisor.api.security] /supervisor/logs access from a0d7b954_ssh

when I start the SSH & Web Terminal addon I get this log back by the addon:

[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] permissions: applying... 
[fix-attrs.d] permissions: exited 0.
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] 00-banner.sh: executing... 
-----------------------------------------------------------
 Add-on: SSH & Web Terminal
 SSH & Web Terminal access to your Home Assistant instance
-----------------------------------------------------------
 Add-on version: 7.4.0
 You are running the latest version of this add-on.
 System: HassOS 3.13  (armv7 / raspberrypi3)
 Home Assistant Core: 0.108.9
 Home Assistant Supervisor: 219
-----------------------------------------------------------
 Please, share the above information when looking for help
 or support in, e.g., GitHub, forums or the Discord chat.
-----------------------------------------------------------
[cont-init.d] 00-banner.sh: exited 0.
[cont-init.d] 01-log-level.sh: executing... 
[cont-init.d] 01-log-level.sh: exited 0.
[cont-init.d] docker.sh: executing... 
[cont-init.d] docker.sh: exited 0.
[cont-init.d] mosquitto.sh: executing... 
[cont-init.d] mosquitto.sh: exited 0.
[cont-init.d] mysql.sh: executing... 
[cont-init.d] mysql.sh: exited 0.
[cont-init.d] ssh.sh: executing... 
[08:22:22] INFO: Password is NOT in the Have I Been Pwned database! Nice!
[08:22:23] WARNING: 
[08:22:23] WARNING: Logging in with a SSH password is security wise, a bad idea!
[08:22:23] WARNING: Please, consider using a public/private key pair.
[08:22:23] WARNING: What is this? https://kb.iu.edu/d/aews
[08:22:23] WARNING: 
[cont-init.d] ssh.sh: exited 0.
[cont-init.d] user.sh: executing... 
[08:22:28] NOTICE: Session sharing has been disabled!
[cont-init.d] user.sh: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.
[08:22:29] INFO: Starting the ttyd daemon...
[08:22:29] INFO: Starting the Home Assistant STDIN service...
[08:22:29] INFO: Starting the SSH daemon...
Server listening on 0.0.0.0 port 22.
Server listening on :: port 22.

looks ok … or?

Yeah looks ok. So that’s not the issue.

It is really strange. I just install home assistant completely new otherwise I don’t do anything and the error occurs immediately. Regardless of the hardware.
For me is the question, is my network the cause or is it a general problem? Has anyone installed a new system with the current HA version without any issues? In my network runs two other HA instances with different hostnames and dndsd service names. This two run’s perfect together. I connect them via https://github.com/lukas-hetzenecker/home-assistant-remote (btw. great job ). Now I need a new HA instance and I have this issue.

In you logging I see also DNS errors…

could there possibly something wrong there? Using custom DNS or DNS servers?

You are right … I see it. No I don’t use custom DNS or DNS Server. I have a complete unifi network (switches USG Wifi AP etc) incl. a USG which is responsible for DNS. I already find out that HA has problems if you are use multiple instance for HA with the same dnssd service name. I know if you use dnssd to publish service names which are already publish you have to handle this, like same service name plus for example add #1. Or change the name to a free one. In my system I have two HA instances running with following dnssd service names:

  • SFHome
  • VMHome

HA creates by default a dnssd service name “Home”. So I thing it should be ok.

Try this command:

ha dns info

Ok. Result is:
The Host is not right, or?

➜  ~ ha dns info       
host: 172.30.32.3
locals:
- dns://192.168.1.1
servers: []
version: "9"
version_latest: "9"

I think this is exactly the same issue. But I used the official image from home-assistant direct with etcher. Without any modification.

No, that is ok. 172.30… is the docker container network

Is your router IP address 192.168.1.1?

Is it set up to forward DNS queries?

Try running:

ha dns logs