HA Supervisor Randomly Restarts

For quite a few weeks now, HA has been randomly restarting and I’m struggling to get anywhere with it! I have disabled & removed all unused integrations & add-ons. Currently, all I have running is the following:

Add-Ons:- AdGuard- ESPHome- File Editor- SQL Lite- Terminal & SSH- HACS

Integrations:- Hive- Tuya

The only partly useful logs I’ve been able to retrieve are the following from supervisor:

21-11-13 23:02:18 INFO (MainThread) [supervisor.homeassistant.api] Updated Home Assistant API token
21-11-13 23:02:59 INFO (MainThread) [supervisor.resolution.check] Starting system checks with state CoreState.RUNNING
21-11-13 23:02:59 INFO (MainThread) [supervisor.resolution.checks.base] Run check for IssueType.SECURITY/ContextType.CORE
21-11-13 23:02:59 INFO (MainThread) [supervisor.resolution.checks.base] Run check for IssueType.TRUST/ContextType.SUPERVISOR
21-11-13 23:02:59 INFO (MainThread) [supervisor.resolution.checks.base] Run check for IssueType.TRUST/ContextType.CORE
21-11-13 23:02:59 INFO (MainThread) [supervisor.resolution.checks.base] Run check for IssueType.PWNED/ContextType.ADDON
21-11-13 23:02:59 INFO (MainThread) [supervisor.resolution.checks.base] Run check for IssueType.TRUST/ContextType.PLUGIN
21-11-13 23:02:59 INFO (MainThread) [supervisor.resolution.checks.base] Run check for IssueType.FREE_SPACE/ContextType.SYSTEM
21-11-13 23:02:59 INFO (MainThread) [supervisor.resolution.check] System checks complete
21-11-13 23:02:59 INFO (MainThread) [supervisor.resolution.evaluate] Starting system evaluation with state CoreState.RUNNING
21-11-13 23:02:59 INFO (MainThread) [supervisor.resolution.evaluate] System evaluation complete
21-11-13 23:02:59 INFO (MainThread) [supervisor.resolution.fixup] Starting system autofix at state CoreState.RUNNING
21-11-13 23:02:59 INFO (MainThread) [supervisor.resolution.fixup] System autofix complete
21-11-13 23:08:49 ERROR (MainThread) [supervisor.homeassistant.api] Error on call http://172.30.32.1:443/api/config: 
21-11-13 23:08:49 WARNING (MainThread) [supervisor.misc.tasks] Watchdog miss API response from Home Assistant
21-11-13 23:17:16 INFO (MainThread) [supervisor.host.info] Updating local host information
21-11-13 23:17:16 INFO (MainThread) [supervisor.host.services] Updating service information
21-11-13 23:17:16 INFO (MainThread) [supervisor.host.network] Updating local network information
21-11-13 23:17:17 INFO (MainThread) [supervisor.host.sound] Updating PulseAudio information
21-11-13 23:17:17 INFO (MainThread) [supervisor.host.manager] Host information reload completed
21-11-13 23:17:20 ERROR (MainThread) [supervisor.homeassistant.api] Error on call http://172.30.32.1:443/api/config: 
21-11-13 23:17:20 ERROR (MainThread) [supervisor.misc.tasks] Watchdog found a problem with Home Assistant API!
21-11-13 23:17:20 INFO (SyncWorker_7) [supervisor.docker.interface] Restarting ghcr.io/home-assistant/raspberrypi4-64-homeassistant
21-11-13 23:17:49 INFO (MainThread) [supervisor.homeassistant.core] Wait until Home Assistant is ready
21-11-13 23:17:58 INFO (MainThread) [supervisor.resolution.evaluate] Starting system evaluation with state CoreState.RUNNING
21-11-13 23:17:59 INFO (MainThread) [supervisor.resolution.evaluate] System evaluation complete
21-11-13 23:18:09 INFO (MainThread) [supervisor.homeassistant.core] Detect a running Home Assistant instance
21-11-13 23:30:40 ERROR (MainThread) [supervisor.homeassistant.api] Error on call http://172.30.32.1:443/api/config: 
21-11-13 23:30:40 WARNING (MainThread) [supervisor.misc.tasks] Watchdog miss API response from Home Assistant
21-11-13 23:32:40 INFO (MainThread) [supervisor.homeassistant.api] Updated Home Assistant API token
21-11-13 23:39:29 ERROR (MainThread) [supervisor.homeassistant.api] Error on call http://172.30.32.1:443/api/config: 
21-11-13 23:39:29 ERROR (MainThread) [supervisor.misc.tasks] Watchdog found a problem with Home Assistant API!
21-11-13 23:39:29 INFO (SyncWorker_4) [supervisor.docker.interface] Restarting ghcr.io/home-assistant/raspberrypi4-64-homeassistant
21-11-13 23:39:47 INFO (MainThread) [supervisor.homeassistant.core] Wait until Home Assistant is ready
21-11-13 23:39:57 INFO (MainThread) [supervisor.resolution.evaluate] Starting system evaluation with state CoreState.RUNNING
21-11-13 23:39:57 INFO (MainThread) [supervisor.resolution.evaluate] System evaluation complete
21-11-13 23:40:29 INFO (MainThread) [supervisor.homeassistant.core] Detect a running Home Assistant instance

I’m running HA OS on a Rasp Pi 4 B with 160GB SSD connected via USB3. 4GB RAM with usage that never goes above 900mb. CPU rarely reaches 20% and never over 30% so I don’t believe its a hardware issue. Same issue was seen on an SD card before moving to SSD.

Currently running 2021.11.2 but issues have been seen for at least 3 months now (and I’ve used pretty much every other release)

The main error that always appears and seems to trigger the restart is 'Error on call http://172.30.32.1:443/api/config: '. The Pi is running on a 192.168.1.0/24 network. 172.30.32.1 is a docker. Full network details:

docker:
  address: 172.30.32.0/23
  dns: 172.30.32.3
  gateway: 172.30.32.1
  interface: hassio
host_internet: true
interfaces:
- connected: true
  enabled: true
  interface: eth0
  ipv4:
    address:
    - 192.168.1.15/24
    gateway: 192.168.1.1
    method: auto
    nameservers:
    - 192.168.1.15
    - 8.8.8.8

There is no loss of power or networking.Any help or guidance would be greatly appreciated.

I have exactly the same problem. For me, it happens mostly when I send commands through HomeKit. Here is the relevant part of the logs:

Dec 07 05:51:03 homeassistant 41aba5a02d40[468]: 21-12-07 06:51:03 ERROR (MainThread) [supervisor.homeassistant.api] Error on call http://172.30.32.1:8123/api/config:
Dec 07 05:51:03 homeassistant 41aba5a02d40[468]: 21-12-07 06:51:03 ERROR (MainThread) [supervisor.misc.tasks] Watchdog found a problem with Home Assistant API!
Dec 07 05:51:03 homeassistant hassos-supervisor[957]: 21-12-07 06:51:03 ERROR (MainThread) [supervisor.homeassistant.api] Error on call http://172.30.32.1:8123/api/config:
Dec 07 05:51:03 homeassistant hassos-supervisor[957]: 21-12-07 06:51:03 ERROR (MainThread) [supervisor.misc.tasks] Watchdog found a problem with Home Assistant API!
Dec 07 05:51:03 homeassistant 41aba5a02d40[468]: 21-12-07 06:51:03 INFO (SyncWorker_6) [supervisor.docker.interface] Restarting ghcr.io/home-assistant/raspberrypi4-64-homeassistant
Dec 07 05:51:03 homeassistant hassos-supervisor[957]: 21-12-07 06:51:03 INFO (SyncWorker_6) [supervisor.docker.interface] Restarting ghcr.io/home-assistant/raspberrypi4-64-homeassistant
Dec 07 05:51:03 homeassistant 65a70f196311[468]: [cont-finish.d] executing container finish scripts...
Dec 07 05:51:03 homeassistant 65a70f196311[468]: [cont-finish.d] done.
Dec 07 05:51:03 homeassistant 65a70f196311[468]: [s6-finish] waiting for services.

Did you get any further?

By the way, for me the problem was that a device connected via USB got stuck every now and then, and as Home Assistant is single-threaded, the main thread got blocked. The Watchdog then detected that Home Assistant was not reacting any more and restarted.

Fixed the problem by implementing a timeout when using that USB device through pyserial.

2 Likes