Home Assistant keeps restarting. Help in analyzing log files appreciated

For the last couple of days I noticed that HA restarts randomly. The last time this night at 4 in the morning. I have studied the logs (both supervisor and home-assistant.log.1) but I’m lost how to proceed further.

The system has been rock solid for the last couple of months if not years, running the same SSD hard drive and power supply without problems.

There is a peak in CPU usage around 4 this morning but I reckon its due to the reboot.

image

Key data: core-2024.5.1, Home Assistant OS, python_version 3.12.2, 6.1.73-haos-raspi, Home Assistant OS 12.2, supervisor-2024.04.4, running Nabu Casa.

After the previous reboots , supervisor’s watchdog complained about 2 missed API calls and triggered a restart. But not in this one …

I’ll attach both supervisor and home-assistant.log.1 here and appreciate a hint on how to debug this further.

           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
supervisor.exceptions.HomeAssistantWSConnectionError: Connection was closed

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/src/supervisor/supervisor/homeassistant/websocket.py", line 326, in async_supervisor_event
    await self.async_send_message(
  File "/usr/src/supervisor/supervisor/homeassistant/websocket.py", line 268, in async_send_message
    await self._client.close()
          ^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'close'
2024-05-07 04:12:28.009 INFO (MainThread) [supervisor.homeassistant.core] Wait until Home Assistant is ready
2024-05-07 04:12:38.389 INFO (MainThread) [supervisor.resolution.evaluate] Starting system evaluation with state running
2024-05-07 04:12:38.794 INFO (MainThread) [supervisor.resolution.evaluate] System evaluation complete
2024-05-07 04:12:43.525 INFO (MainThread) [supervisor.homeassistant.core] Home Assistant Core state changed to NOT_RUNNING
2024-05-07 04:14:13.934 ERROR (MainThread) [supervisor.homeassistant.api] Timeout on call http://172.30.32.1:8123/api/core/state.
2024-05-07 04:14:38.407 INFO (MainThread) [supervisor.homeassistant.core] Home Assistant Core state changed to STARTING
2024-05-07 04:14:45.006 INFO (MainThread) [supervisor.homeassistant.core] Home Assistant Core state changed to RUNNING
2024-05-07 04:14:45.007 INFO (MainThread) [supervisor.homeassistant.core] Detect a running Home Assistant instance
2024-05-07 04:22:39.846 INFO (MainThread) [supervisor.homeassistant.api] Updated Home Assistant API token
2024-05-07 04:44:59.013 INFO (MainThread) [supervisor.resolution.check] Starting system checks with state running
2024-05-07 04:44:59.014 INFO (MainThread) [supervisor.resolution.checks.base] Run check for security/core
2024-05-07 04:44:59.016 INFO (MainThread) [supervisor.resolution.checks.base] Run check for no_current_backup/system
2024-05-07 04:44:59.017 INFO (MainThread) [supervisor.resolution.checks.base] Run check for multiple_data_disks/system
2024-05-07 04:44:59.018 INFO (MainThread) [supervisor.resolution.checks.base] Run check for docker_config/system
2024-05-07 04:44:59.020 INFO (MainThread) [supervisor.resolution.checks.base] Run check for dns_server_ipv6_error/dns_server
2024-05-07 04:44:59.088 INFO (MainThread) [supervisor.resolution.checks.base] Run check for pwned/addon
2024-05-07 04:44:59.089 INFO (MainThread) [supervisor.resolution.checks.base] Run check for free_space/system
2024-05-07 04:44:59.091 INFO (MainThread) [supervisor.resolution.checks.base] Run check for dns_server_failed/dns_server
2024-05-07 04:44:59.093 INFO (MainThread) [supervisor.resolution.checks.base] Run check for trust/supervisor
2024-05-07 04:44:59.109 INFO (MainThread) [supervisor.resolution.checks.base] Run check for disabled_data_disk/system
2024-05-07 04:44:59.110 INFO (MainThread) [supervisor.resolution.checks.base] Run check for ipv4_connection_problem/system
2024-05-07 04:44:59.110 INFO (MainThread) [supervisor.resolution.check] System checks complete
2024-05-07 04:44:59.111 INFO (MainThread) [supervisor.resolution.evaluate] Starting system evaluation with state running
2024-05-07 04:44:59.437 INFO (MainThread) [supervisor.resolution.evaluate] System evaluation complete
2024-05-07 04:44:59.437 INFO (MainThread) [supervisor.resolution.fixup] Starting system autofix at state running
2024-05-07 04:44:59.438 INFO (MainThread) [supervisor.resolution.fixup] System autofix complete
2024-05-07 04:49:50.349 INFO (MainThread) [supervisor.store.git] Update add-on https://github.com/Draggon/hassio-hdd-tools repository
2024-05-07 04:49:50.356 INFO (MainThread) [supervisor.store.git] Update add-on https://github.com/matt-FFFFFF/hassio-addon-repository repository
2024-05-07 04:49:50.366 INFO (MainThread) [supervisor.store.git] Update add-on https://github.com/sdesalve/hassio-addons repository
2024-05-07 04:49:50.372 INFO (MainThread) [supervisor.store.git] Update add-on https://github.com/alex107ivanov/hassio-addons repository
2024-05-07 04:49:50.382 INFO (MainThread) [supervisor.store.git] Update add-on https://github.com/evcc-io/hassio-addon repository
2024-05-07 04:49:50.395 INFO (MainThread) [supervisor.store.git] Update add-on https://github.com/thomasmauerer/hassio-addons repository
2024-05-07 04:49:50.406 INFO (MainThread) [supervisor.store.git] Update add-on https://github.com/sabeechen/hassio-google-drive-backup repository
2024-05-07 04:49:50.428 INFO (MainThread) [supervisor.store.git] Update add-on https://github.com/esphome/home-assistant-addon repository
2024-05-07 04:49:50.435 INFO (MainThread) [supervisor.store.git] Update add-on https://github.com/home-assistant/addons repository
2024-05-07 04:49:50.463 INFO (MainThread) [supervisor.store.git] Update add-on https://github.com/hassio-addons/repository repository
2024-05-07 04:49:52.674 WARNING (SyncWorker_0) [supervisor.addons.validate] Add-on config 'startup' with 'before' is deprecated. Please report this to the maintainer of MQTT Importer
2024-05-07 04:49:52.679 WARNING (SyncWorker_0) [supervisor.addons.validate] Add-on config 'startup' with 'before' is deprecated. Please report this to the maintainer of Openvpn Client
2024-05-07 04:49:53.451 WARNING (SyncWorker_7) [supervisor.addons.validate] Add-on config 'startup' with 'before' is deprecated. Please report this to the maintainer of MQTT Importer
2024-05-07 04:49:53.456 WARNING (SyncWorker_7) [supervisor.addons.validate] Add-on config 'startup' with 'before' is deprecated. Please report this to the maintainer of Openvpn Client
2024-05-07 04:49:53.887 INFO (MainThread) [supervisor.store] Loading add-ons from store: 90 all - 0 new - 0 remove
2024-05-07 04:49:53.887 INFO (MainThread) [supervisor.store] Loading add-ons from store: 90 all - 0 new - 0 remove
2024-05-07 04:52:46.623 INFO (MainThread) [supervisor.homeassistant.api] Updated Home Assistant API token
2024-05-07 05:22:29.568 INFO (MainThread) [supervisor.api.middleware.security] /supervisor/info access from cebe7a76_hassio_google_drive_backup
2024-05-07 05:22:29.576 INFO (MainThread) [supervisor.api.middleware.security] /backups access from cebe7a76_hassio_google_drive_backup
2024-05-07 05:22:48.464 INFO (MainThread) [supervisor.homeassistant.api] Updated Home Assistant API token
2024-05-07 05:44:59.439 INFO (MainThread) [supervisor.resolution.check] Starting system checks with state running
2024-05-07 05:44:59.440 INFO (MainThread) [supervisor.resolution.checks.base] Run check for security/core
2024-05-07 05:44:59.441 INFO (MainThread) [supervisor.resolution.checks.base] Run check for no_current_backup/system
2024-05-07 05:44:59.442 INFO (MainThread) [supervisor.resolution.checks.base] Run check for multiple_data_disks/system
2024-05-07 05:44:59.443 INFO (MainThread) [supervisor.resolution.checks.base] Run check for docker_config/system
2024-05-07 05:44:59.444 INFO (MainThread) [supervisor.resolution.checks.base] Run check for dns_server_ipv6_error/dns_server
2024-05-07 05:44:59.515 INFO (MainThread) [supervisor.resolution.checks.base] Run check for pwned/addon
2024-05-07 05:44:59.516 INFO (MainThread) [supervisor.resolution.checks.base] Run check for free_space/system
2024-05-07 05:44:59.517 INFO (MainThread) [supervisor.resolution.checks.base] Run check for dns_server_failed/dns_server
2024-05-07 05:44:59.518 INFO (MainThread) [supervisor.resolution.checks.base] Run check for trust/supervisor
2024-05-07 05:44:59.536 INFO (MainThread) [supervisor.resolution.checks.base] Run check for disabled_data_disk/system
2024-05-07 05:44:59.536 INFO (MainThread) [supervisor.resolution.checks.base] Run check for ipv4_connection_problem/system
2024-05-07 05:44:59.537 INFO (MainThread) [supervisor.resolution.check] System checks complete
2024-05-07 05:44:59.537 INFO (MainThread) [supervisor.resolution.evaluate] Starting system evaluation with state running
2024-05-07 05:44:59.866 INFO (MainThread) [supervisor.resolution.evaluate] System evaluation complete
2024-05-07 05:44:59.867 INFO (MainThread) [supervisor.resolution.fixup] Starting system autofix at state running
2024-05-07 05:44:59.868 INFO (MainThread) [supervisor.resolution.fixup] System autofix complete
2024-05-07 05:48:58.917 INFO (MainThread) [supervisor.updater] Fetching update data from https://version.home-assistant.io/stable.json
2024-05-07 05:52:51.383 INFO (MainThread) [supervisor.homeassistant.api] Updated Home Assistant API token
[snip]

home-assistant.log.1 is at Random restarts · Issue #113 · swa72/home-assistant · GitHub due to the character limit of this forum.

You did not say what hardware so I assume RPi.

How to Troubleshoot Raspberry Pi Crashing.

Yep, it is a Raspberry Pi 4. Thanks for the link. I think I’ve covered points 1-4 on that list, now I’m at 5 and seeking help in interpreting the relevant parts of the log files.

If one does not see any obvious stuff in the logs, I will follow the route outlined in 2024.5+: Tracking down instability issues caused by integrations - Community Guides - Home Assistant Community (home-assistant.io).

Power supplies go bad. Did you try another approved power supply?

Tried that already to no avail. I’m running in safe mode for a day now and have not observed another restart.