After restart pc all entities and integrations in homeassistant docker unavailable

Home Assistant:

  • Core2023.12.4
  • Frontend20231208.2

OS: Debian Linux

Docker container logs:

s6-rc: info: service s6rc-oneshot-runner: starting
s6-rc: info: service s6rc-oneshot-runner successfully started
s6-rc: info: service fix-attrs: starting
s6-rc: info: service fix-attrs successfully started
s6-rc: info: service legacy-cont-init: starting
s6-rc: info: service legacy-cont-init successfully started
s6-rc: info: service legacy-services: starting
services-up: info: copying legacy longrun home-assistant (no readiness notification)
s6-rc: info: service legacy-services successfully started
^[[33m2024-01-07 10:16:01.237 WARNING (Recorder) [homeassistant.components.recorder.util] The system could not validate that the sqlite3 database at //config/home-assistant_v2.db was shutdown cleanly^[[0m
^[[33m2024-01-07 10:16:01.495 WARNING (Recorder) [homeassistant.components.recorder.util] Ended unfinished session (id=2 from 2024-01-06 21:22:37.262879)^[[0m
^[[33m2024-01-07 10:16:10.242 WARNING (MainThread) [zeroconf] Error with socket 14 (('192.168.122.1', 5353))): [Errno 1] Operation not permitted
Traceback (most recent call last):
  File "/usr/local/lib/python3.11/asyncio/selector_events.py", line 1190, in sendto
    self._sock.sendto(data, addr)
PermissionError: [Errno 1] Operation not permitted^[[0m
^[[33m2024-01-07 10:16:10.265 WARNING (MainThread) [zeroconf] Error with socket 15 (('172.18.0.1', 5353))): [Errno 1] Operation not permitted
Traceback (most recent call last):
  File "/usr/local/lib/python3.11/asyncio/selector_events.py", line 1190, in sendto
    self._sock.sendto(data, addr)
PermissionError: [Errno 1] Operation not permitted^[[0m
^[[33m2024-01-07 10:16:10.266 WARNING (MainThread) [zeroconf] Error with socket 16 (('172.17.0.1', 5353))): [Errno 1] Operation not permitted
Traceback (most recent call last):
  File "/usr/local/lib/python3.11/asyncio/selector_events.py", line 1190, in sendto
    self._sock.sendto(data, addr)
PermissionError: [Errno 1] Operation not permitted^[[0m

These errors appeared after the PC was rebooted. Before that, everything was fine. Perhaps someone can suggest or point out a solution to the problem?

Seems you have database issues. One thing you can try is stop HA, rename the db to something else and start HA again, then it generates a new db.

Thank you for your help! Yes, it works. The problem was really in the database. I just deleted the database and HA created a new one.

But I wonder why this happened. How do I set up the database correctly?

Would it be better to switch from SQLite to MySQL?

Glad you got it working :slight_smile: Did you have any sudden power outages perhaps? The setup is correct out of the box.

No, there were no outages. I just turned off the PC. I assume that HA requires a special shutdown?

Probably a good idea to use graceful shutdowns in the future, yes :blush:

The thing is that for some reason I can’t find shutdown button in “Settings”:

You could shutdown the container before you turn off the computer, or even better migrate it to something you don’t shut down (Pi, NAS or whatever).