start-stop-daemon: 1 process refused to stop #260

Open
opened 10 months ago by eruditas · 5 comments
sudo /etc/init.d/homeassistant stop
 * Stopping homeassistant ...
 * start-stop-daemon: 1 process refused to stop
 * Failed to stop homeassistant                                                                                                                        [ !! ]
 * ERROR: homeassistant failed to stop

When i try to stop it again, completes successfully.
Might be related to this:

2022-02-06 22:35:53 WARNING (Recorder) [homeassistant.components.recorder.util] The system could not validate that the sqlite3 database at //etc/homeas
sistant/home-assistant_v2.db was shutdown cleanly

Every time I restart the server, homeassistant has to be manually restarted again to work.

```bash sudo /etc/init.d/homeassistant stop * Stopping homeassistant ... * start-stop-daemon: 1 process refused to stop * Failed to stop homeassistant [ !! ] * ERROR: homeassistant failed to stop ``` When i try to stop it again, completes successfully. Might be related to this: ```python 2022-02-06 22:35:53 WARNING (Recorder) [homeassistant.components.recorder.util] The system could not validate that the sqlite3 database at //etc/homeas sistant/home-assistant_v2.db was shutdown cleanly ``` Every time I restart the server, homeassistant has to be manually restarted again to work.
onkelbeh added the
Bug
label 10 months ago
Owner

is it a new install? perhaps the sqlite db is broken.

is it a new install? perhaps the sqlite db is broken.
Poster

It's been through like 10 versions of upgrades, been like this since the first install as far as I remember.

It's been through like 10 versions of upgrades, been like this since the first install as far as I remember.
Owner

try to recreacte the db from a dump, like

sqlite3 mydata.db ".dump" | sqlite3 new.db

try to recreacte the db from a dump, like sqlite3 mydata.db ".dump" | sqlite3 new.db
Poster
cp home-assistant_v2.db backup.db
sqlite3 home-assistant_v2.db ".dump" | sqlite3 new.db
rm home-assistant_v2.db
mv new.db home-assistant_v2.db
chown -R homeassistant:homeassistant *
ls -lha

-rw-r--r--  1 homeassistant homeassistant 2.7G Feb  7 00:06 backup.db
-rw-r--r--  1 homeassistant homeassistant 2.5G Feb  7 00:11 home-assistant_v2.db
2022-02-07 00:17:44 WARNING (Recorder) [homeassistant.components.recorder.util] The system could not validate that the sqlite3 database at //etc/homeas
sistant/home-assistant_v2.db was shutdown cleanly
```bash cp home-assistant_v2.db backup.db sqlite3 home-assistant_v2.db ".dump" | sqlite3 new.db rm home-assistant_v2.db mv new.db home-assistant_v2.db chown -R homeassistant:homeassistant * ``` ```bash ls -lha -rw-r--r-- 1 homeassistant homeassistant 2.7G Feb 7 00:06 backup.db -rw-r--r-- 1 homeassistant homeassistant 2.5G Feb 7 00:11 home-assistant_v2.db ``` ```bash 2022-02-07 00:17:44 WARNING (Recorder) [homeassistant.components.recorder.util] The system could not validate that the sqlite3 database at //etc/homeas sistant/home-assistant_v2.db was shutdown cleanly ```
Owner

2.7GB is big for sqlite

I'd recommend that you change from using Recorder with sqllite to a better database like Mysql or MariaDB. I have MariaDB running with 2 months of ~1200 entities without a problem for years.

https://www.home-assistant.io/integrations/recorder/#custom-database-engines

https://community.home-assistant.io/t/migrating-home-assistant-database-from-sqlite-to-mariadb/96895

Simple fix would be to delete the database. You would lose your history and statistics. Home Assistant will recreate a clean DB on next startup.

2.7GB is big for sqlite I'd recommend that you change from using Recorder with sqllite to a better database like Mysql or MariaDB. I have MariaDB running with 2 months of ~1200 entities without a problem for years. https://www.home-assistant.io/integrations/recorder/#custom-database-engines https://community.home-assistant.io/t/migrating-home-assistant-database-from-sqlite-to-mariadb/96895 Simple fix would be to delete the database. You would lose your history and statistics. Home Assistant will recreate a clean DB on next startup.
Sign in to join this conversation.
No Milestone
No Assignees
2 Participants
Notifications
Due Date

No due date set.

Dependencies

No dependencies set.

Reference: onkelbeh/HomeAssistantRepository#260
Loading…
There is no content yet.