Sonarr version (exact version): 2.0.0.5085 Mono version (if Sonarr is not running on Windows): Server isn’t responding, so I can’t check it OS: zenial linux ((Debug logs)): (Make sure debug logging is enabled in settings and post the full log to hastebin/pastebin/dropbox/google drive or something similar, do not post them directly here) Description of issue:
My file server crashed during the day. When it restarted, Sonarr came back up, but it’s telling me:
I cannot access the UI to turn on debugging, so I cannot provide debug logs.
I’ve followed the directions at the linked site, exporting the data from nzbdrone.db, importing it to nzbdrone.fixed.db, making a backup of nzbdrone.db, then renaming nzbdrone.fixed.db back to nzbdrone.db
When I restart the docker, it resumes spewing out the exact same error.
I’ve also tried restoring a backup from last week by copying ‘config.xlm’, ‘nzbdrone.db’, and ‘nzbdrone.db-journal’ (a 0-byte file) into the main sonarr directory where the original nzbdrone.db lives and I’m still getting the same error message.
The wiki page for log files mentions how to enable it if you can’t access the UI. Regardless, please post more information from the logs so we can see where it’s failing.
Make sure you’re deleting the other .db-* files as mentioned on the ((backup and restore)) wiki page (including the nzbdrone.db-journal file), when you try to repair or restore from backup.
If SQLite is unable to repair the database or all the backups are corrupt you’ll need to start from scratch, but first make sure the repair/restore process is done correctly.
I followed the restore steps in the wiki, deleting the noted files then restoring my backup from 26 Jan - well before the crash. Things were working just fine yesterday, so I have no reason to think that the backup was post-corruption. Unfortunately, I’m still getting the same error.
Other than the inconvenience of having to re-import all my shows and remember the name of a special series that’s coming out in a week or 2 that I want to capture, I’m thinking that a full restore won’t be a crisis, but I’d prefer to try to get it fixed before resorting to that.
After working from xplorer2 in Win10 to delete/copy/etc. the files, I SSH’d into the server and took a look at the directory from there. This is what I find:
root@NAS:/mnt/cache/appdata/sonarr# ls -la
/bin/ls: cannot access 'nzbdrone.db-shm': No such file or directory
total 20272
drwxrwxrwx 1 nobody users 150 Feb 3 08:59 ./
drwxrwxrwx 1 nobody users 460 Jan 25 20:20 ../
drwxr-xr-x 1 nobody users 30 Dec 29 23:21 Backups/
drwxr-xr-x 1 nobody users 1082 Jan 29 15:12 MediaCover/
-rw-rw-rw- 1 nobody users 421 Feb 2 20:35 config.xml
drwxr-xr-x 1 nobody users 204 Feb 2 20:36 logs/
-rw-r--r-- 1 nobody users 6047744 Feb 2 05:58 logs.db
-rw-r--r-- 1 nobody users 65536 Feb 2 08:54 logs.db-shm
-rw-r--r-- 1 nobody users 14631160 Feb 2 08:54 logs.db-wal
-????????? ? ? ? ? ? nzbdrone.db-shm
-rw-r--r-- 1 nobody users 3 Feb 3 08:53 nzbdrone.pid
drwxr-xr-x 1 nobody users 10 Dec 22 23:29 xdg/
I don’t believe I’ve ever seen a file with ? in all those columns before! rm nzbdrone.db-shm won’t delete the file. How do I go about getting rid of this thing, since it may be causing either of the two fixes to fail?
A suggestion from a post in a different forum resolved the issue.
I copied all files except the odd-ball to a new directory, deleted the offending directory, including the bizarro file, then renamed the directory back to its original name.
A restore from the backup now has me up and running again.