Problem
Sonarr wasn’t starting, regardless of how I tried to launch it.
Solution
Checked Sonarr log: ~/.config/NzbDrone/logs/nzbdrone.txt
Found scary message: System.Data.SQLite.SQLiteException: database disk image is malformed
Fixed it:
-
Go to Sonarr config directory:
cd ~/.config/NzbDrone
-
Backup Sonarr DB:
mv nzbdrone.db nzbdrone.bkp.db
-
Create new Sonarr DB:
touch nzbdrone.db
-
Dump backup DB contents into new DB:
sqlite3 nzbdrone.bkp.dp “.dump" | sqlite3 nzbdrone.db
source -
Remove backup:
rm nzbdrone.bkp.db