I think my sonarr database is corrupt, how do I tell if it is? And how do I fix it?

Sonarr version (exact version): 2.0.0.5163

Mono version (if Sonarr is not running on Windows): 5.12.0.226

OS: Unraid 6.5.1

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. Post in .txt not .doc, .rtf or some other formatted document)

Description of issue: On the advanced view in docker I clicked on the log and it is full of this:

[v2.0.0.5163] System.Data.SQLite.SQLiteException (0x80004005): attempt to write a readonly database
attempt to write a readonly database
at System.Data.SQLite.SQLite3.Reset (System.Data.SQLite.SQLiteStatement stmt) [0x00083] in <61a20cde294d4a3eb43b9d9f6284613b>:0
at System.Data.SQLite.SQLite3.Step (System.Data.SQLite.SQLiteStatement stmt) [0x0003c] in <61a20cde294d4a3eb43b9d9f6284613b>:0
at System.Data.SQLite.SQLiteDataReader.NextResult () [0x0016b] in <61a20cde294d4a3eb43b9d9f6284613b>:0
at System.Data.SQLite.SQLiteDataReader…ctor (System.Data.SQLite.SQLiteCommand cmd, System.Data.CommandBehavior behave) [0x00090] in <61a20cde294d4a3eb43b9d9f6284613b>:0
at (wrapper remoting-invoke-with-check) System.Data.SQLite.SQLiteDataReader…ctor(System.Data.SQLite.SQLiteCommand,System.Data.CommandBehavior)
at System.Data.SQLite.SQLiteCommand.ExecuteReader (System.Data.CommandBehavior behavior) [0x0000c] in <61a20cde294d4a3eb43b9d9f6284613b>:0
at System.Data.SQLite.SQLiteCommand.ExecuteScalar (System.Data.CommandBehavior behavior) [0x00006] in <61a20cde294d4a3eb43b9d9f6284613b>:0
at System.Data.SQLite.SQLiteCommand.ExecuteScalar () [0x00006] in <61a20cde294d4a3eb43b9d9f6284613b>:0
at Marr.Data.QGen.InsertQueryBuilder1[T].Execute () [0x00046] in M:\BuildAgent\work\b69c1fe19bfc2c38\src\Marr.Data\QGen\InsertQueryBuilder.cs:140 at Marr.Data.DataMapper.Insert[T] (T entity) [0x0005d] in M:\BuildAgent\work\b69c1fe19bfc2c38\src\Marr.Data\DataMapper.cs:728 at NzbDrone.Core.Datastore.BasicRepository1[TModel].Insert (TModel model) [0x0002d] in M:\BuildAgent\work\b69c1fe19bfc2c38\src\NzbDrone.Core\Datastore\BasicRepository.cs:111
at NzbDrone.Core.Messaging.Commands.CommandQueueManager.Push[TCommand] (TCommand command, NzbDrone.Core.Messaging.Commands.CommandPriority priority, NzbDrone.Core.Messaging.Commands.CommandTrigger trigger) [0x0013d] in M:\BuildAgent\work\b69c1fe19bfc2c38\src\NzbDrone.Core\Messaging\Commands\CommandQueueManager.cs:82
at (wrapper dynamic-method) System.Object.CallSite.Target(System.Runtime.CompilerServices.Closure,System.Runtime.CompilerServices.CallSite,NzbDrone.Core.Messaging.Commands.CommandQueueManager,object,NzbDrone.Core.Messaging.Commands.CommandPriority,NzbDrone.Core.Messaging.Commands.CommandTrigger)
at NzbDrone.Core.Messaging.Commands.CommandQueueManager.Push (System.String commandName, System.Nullable`1[T] lastExecutionTime, NzbDrone.Core.Messaging.Commands.CommandPriority priority, NzbDrone.Core.Messaging.Commands.CommandTrigger trigger) [0x000b7] in M:\BuildAgent\work\b69c1fe19bfc2c38\src\NzbDrone.Core\Messaging\Commands\CommandQueueManager.cs:95
at NzbDrone.Core.Jobs.Scheduler.ExecuteCommands () [0x00043] in M:\BuildAgent\work\b69c1fe19bfc2c38\src\NzbDrone.Core\Jobs\Scheduler.cs:42
at System.Threading.Tasks.Task.InnerInvoke () [0x0000f] in <71d8ad678db34313b7f718a414dfcb25>:0
at System.Threading.Tasks.Task.Execute () [0x00010] in <71d8ad678db34313b7f718a414dfcb25>:0

[Error] TaskExtensions: Task Error

Throughout most of the file, I have tried to enable debugging mode inside sonarr but it wouldn’t let me save the setting.

Edit:
Someone at unraid forums helped me work out the issue and it was to do with my permissions, got it working now

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.