Error "Applications are not running" and stuck on "Initializing Apps Service" after upgrading to Dragonfish

I ran into this recently. My symptoms were a little more like what is shown in this old community post. That is, in my case, I had an unexpected power outage. My Applications, though, were in the same state. I tried the solution that is suggested in that thread and it didn’t work (moving/renaming the $app_pool/ix-applications/k3s/server/token file). But then I found a solution.

When I ran systemctl status k3s I would see:

time="2024-06-01T15:43:45-04:00" level=error msg="failed to ping connection: malformed database schema (sqlite_sequence)"

I found the state.db database in /mnt/data/ix-applications/k3s/server/db/state.db (/mnt/data is my RAID volume).

I did these commands to save a copy of state.db just in case, recover what could be recovered from the database, and then restart the k3s service with the recovered state.db.

  1. systemctl stop k3s
  2. cd /mnt/data/ix-applications/k3s/server/db/
  3. cp state.db state.db.save
  4. sqlite3 state.db.save ".dump" > recovered.sql
  5. sqlite3 state.db.recovered < recovered.sql
  6. cp state.db.recovered state.db
  7. systemctl start k3s

Then check on the service by using systemctl status k3s

Lots of help online will have you combine steps 4 and 5 into a single pipeline. But I did it this way in case some of the SQL ended up needing to be edited by hand. It didn’t. But that was my reasoning.

After i did that, I could see the apps I had launched. I stopped them, updated them, and now I’m in the process of relaunching them. I’m not quite recovered, yet, but I’m a lot closer to being recovered than before I started.

1 Like