Sqlite3 database faulty

Hi,

today i wanted to upgrade ha core. After that, the webui only partially loading and then restarts.

I have a supervisor installation on my Ubuntu Server with virsh. ha core logs gives me the following output:

[12:48:30] INFO: Home Assistant Core finish process received signal 4
2023-09-28 14:48:32.981 WARNING (SyncWorker_3) [homeassistant.loader] We found a custom integration ocpp which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2023-09-28 14:48:32.984 WARNING (SyncWorker_3) [homeassistant.loader] We found a custom integration tibber_custom which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2023-09-28 14:48:32.985 WARNING (SyncWorker_3) [homeassistant.loader] We found a custom integration var which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2023-09-28 14:48:32.987 WARNING (SyncWorker_3) [homeassistant.loader] We found a custom integration waste_collection_schedule which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2023-09-28 14:48:32.989 WARNING (SyncWorker_3) [homeassistant.loader] We found a custom integration dwains_dashboard which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2023-09-28 14:48:32.991 WARNING (SyncWorker_3) [homeassistant.loader] We found a custom integration watchman which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2023-09-28 14:48:32.992 WARNING (SyncWorker_3) [homeassistant.loader] We found a custom integration hacs which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2023-09-28 14:48:34.749 WARNING (Recorder) [homeassistant.components.recorder.util] The system could not validate that the sqlite3 database at //config/home-assistant_v2.db was shutdown cleanly
2023-09-28 14:48:34.807 WARNING (Recorder) [homeassistant.components.recorder.util] Ended unfinished session (id=176 from 2023-09-28 12:48:28.853815)

I’ve read about deleting the database. But everything i do, i’m not able to stop my ha core. It is always ending up with following message:

# ha core stop
Error: Another job is running for job group home_assistant_core

Any hints what i can do?

1 Like

This is the output from the ha supervisor logs output:

23-09-28 14:58:26 INFO (MainThread) [supervisor.resolution.evaluate] Starting system evaluation with state running
23-09-28 14:58:26 INFO (MainThread) [supervisor.resolution.evaluate] System evaluation complete
23-09-28 14:58:32 INFO (MainThread) [supervisor.resolution.evaluate] Starting system evaluation with state running
23-09-28 14:58:32 INFO (MainThread) [supervisor.resolution.evaluate] System evaluation complete
23-09-28 14:58:37 WARNING (MainThread) [supervisor.misc.tasks] Watchdog miss API response from Home Assistant
23-09-28 14:58:39 INFO (MainThread) [supervisor.resolution.evaluate] Starting system evaluation with state running
23-09-28 14:58:39 INFO (MainThread) [supervisor.resolution.evaluate] System evaluation complete
23-09-28 14:58:45 INFO (MainThread) [supervisor.resolution.evaluate] Starting system evaluation with state running
23-09-28 14:58:45 INFO (MainThread) [supervisor.resolution.evaluate] System evaluation complete
23-09-28 14:58:46 ERROR (MainThread) [supervisor.homeassistant.api] Error on call http://172.30.32.1:8123/api/core/state: [Errno 104] Connection reset by peer
23-09-28 14:58:46 ERROR (MainThread) [supervisor.homeassistant.api] Error on call http://172.30.32.1:8123/api/core/state: [Errno 104] Connection reset by peer
23-09-28 14:58:51 INFO (MainThread) [supervisor.resolution.evaluate] Starting system evaluation with state running
23-09-28 14:58:51 INFO (MainThread) [supervisor.resolution.evaluate] System evaluation complete

I’m not able to help any, but I’m in the same boat on my HAOS machine as of the most recent beta update

Edit 1:
I was able to roll back using “core update --version 2023.9.3” quickly after startup (you’ll need to be fast to get the command to run before the system locks up – I added it as a macro on my desktop to spam once I got past the bootloader)

Edit 2:
Others suggest restarting the supervisor can help → try this instead

ha su restart
ha core update --version 2023.9.3

Again, if it doesn’t work, you might need to reboot and retry; you’re fighting a race condition, type fast!

Hmm, i’ve give it a try, but it won’t work:

Error: System is not ready with state: setup
#  ha core update --version 2023.9.3
Error: System is not ready with state: setup
#  ha core update --version 2023.9.3
Error: Another job is running for job group home_assistant_core
#  ha core update --version 2023.9.3
Error: Another job is running for job group home_assistant_core

I’ve tried it several times, but it didn’t work.

Holy cow, this did it for me. From the CLI, I ran su restart, then immediately typed core update --version=2023.9.3 and kept pressing up arrow, then enter to repeatedly submit the command. I guess one of them went through and the display stayed on Processing... for a while until eventually it said Processing... Done. and successfully rolled back to 2023.9.3.

1 Like

Okay, this worked for me:

  1. ha supervisor restart
  2. immedatly enter core update --version=2023.9.3
  3. ha supervisor reload

et voila, HA is running again…

3 Likes

I can’t tell you how relieved I am to
A) find that someone else is having this issue and that I haven’t just managed to knacker my HA DB
B) find a solution that worked

THANK YOU!

2 Likes

Same problem for me, still there
I actually noted this issue since core 2024.1.1 and now it goes on 2024.1.6.
Never shuttted down abruptly; daily clean host.shutdown.
Before restarting, daily clean database (1 hour before)
I tried to erase the db and starting a new one but the issue is still there.

I use HAOS in a VMware environment

Logger: homeassistant.components.recorder.util
Source: components/recorder/util.py:332
Integration: Recorder (documentation, issues)
First occurred: 00:59:07 (1 occurrences)
Last logged: 00:59:07

The system could not validate that the sqlite3 database at //config/home-assistant_v2.db was shutdown cleanly