/config/sonarr.db is corrupt, restore from backup if available

Sonarr version (exact version): 4.0.4.1491
Mono version (if Sonarr is not running on Windows):
OS: OMV 6.9.16-1 (Shaitan)
Debug logs:
Description of issue:

I tried a simple test case with Sonarr only (I have the same problem with Lidarr, Radarr as well). Both the container and folders were totally cleaned before trying this experiment. I don’t have access to the GUI even though OMV 6 is reporting that Sonarr is running. I tried modifying the config.xml file to select debug then trace and neither resulted in additional messages in the log (and there were no other log files, just sonarr.txt)

Used OMV 6 example compose file (basic, no VPN, see below) and started the Sonarr container. I’m not sure how to submit a log file but I’m sure this error is probably known. It basically is saying my database is corrupt even though I just created a new one. Any help will be appreciated.

Snippet from log:
2024-05-19 20:56:40.7|Info|FluentMigrator.Runner.MigrationRunner|DatabaseEngineVersionCheck migrating
2024-05-19 20:56:40.7|Info|FluentMigrator.Runner.MigrationRunner|PerformDBOperation
2024-05-19 20:56:40.7|Info|NzbDrone.Core.Datastore.Migration.Framework.NzbDroneSQLiteProcessor|Performing DB Operation
2024-05-19 20:56:40.9|Error|FluentMigrator.Runner.MigrationRunner|disk I/O error
disk I/O error

[v4.0.4.1491] code = IoErr (10), message = System.Data.SQLite.SQLiteException (0x800007FF): disk I/O error
disk I/O error
at System.Data.SQLite.SQLite3.Prepare(SQLiteConnection cnn, String strSql, SQLiteStatement previous, UInt32 timeoutMS, String& strRemain)
at System.Data.SQLite.SQLiteCommand.BuildNextCommand()
at System.Data.SQLite.SQLiteCommand.GetStatement(Int32 index)
at System.Data.SQLite.SQLiteDataReader.NextResult()
at System.Data.SQLite.SQLiteDataReader…ctor(SQLiteCommand cmd, CommandBehavior behave)
at System.Data.SQLite.SQLiteCommand.ExecuteReader(CommandBehavior behavior)
at System.Data.SQLite.SQLiteCommand.ExecuteNonQuery(CommandBehavior behavior)
at System.Data.SQLite.SQLiteCommand.ExecuteNonQuery()
at System.Data.SQLite.SQLiteConnection.Open()
at FluentMigrator.Runner.Processors.GenericProcessorBase.<>c__DisplayClass6_1.<.ctor>b__1()
at System.Lazy1.ViaFactory(LazyThreadSafetyMode mode) at System.Lazy1.ExecutionAndPublication(LazyHelper executionAndPublication, Boolean useDefaultConstructor)
at System.Lazy1.CreateValue() at System.Lazy1.get_Value()
at FluentMigrator.Runner.Processors.GenericProcessorBase.get_Connection()
at FluentMigrator.Runner.Processors.GenericProcessorBase.EnsureConnectionIsOpen()
at FluentMigrator.Runner.Processors.SQLite.SQLiteProcessor.Process(PerformDBOperationExpression expression)
at FluentMigrator.Expressions.PerformDBOperationExpression.ExecuteWith(IMigrationProcessor processor)
at FluentMigrator.Runner.MigrationRunner.<>c__DisplayClass80_0.b__1()
at FluentMigrator.Runner.StopWatch.Time(Action action)
at FluentMigrator.Runner.MigrationRunner.ExecuteExpressions(ICollection`1 expressions)

2024-05-19 20:56:41.1|Fatal|ConsoleApp|EPIC FAIL!

Compose script:

services:
sonarr:
image: lscr.io/linuxserver/sonarr:amd64-latest
container_name: sonarr
environment:
- PUID=1001
- PGID=100
- TZ=America/New_York
volumes:
- /etc/hosts:/etc/hosts:ro
- /etc/localtime:/etc/localtime:ro
- /srv/DrivePool/sonarr/config:/config
- /srv/DrivePool/sonarr/downloads:/downloads
- /srv/DrivePool/sonarr/tv-series:/tv
ports:
- 8989:8989
restart: unless-stopped

This is not going to help in the slightest with your current problem, but save yourself a headache later on and redo your paths…

Can someone please give me a few minutes of your time and take a look at this log snippet? I have over 100 hours into this and am no closer to solving it although I’ve tried every suggested remedy I could find including “uncorrupting the database” with DB Browser, Resetting all my permissions and moving the config folder into the container. Transmission and Jackett are running and working perfectly. Sonarr, Radarr, and Lidarr are not and they appear to have the same issue.

Interesting, I’ve upgraded two OMV servers (from 5.x to 6.x) in the last month (one for my son) and his worked fine until it didn’t. His Sonarr, Radarr, and Lidarr worked before I gave it back to him and now his server is acting the same way as mine (Transmission and Jackett work, others not so much). He would not/could not change anything on his OMV server so I’m thinking maybe an update caused this?

Here is the log snippet:

2024-05-20 19:29:26.2|Info|Bootstrap|Starting Radarr - /app/radarr/bin/Radarr - Version 5.6.0.8846
2024-05-20 19:29:28.8|Info|AppFolderInfo|Data directory is being overridden to [/config]
2024-05-20 19:29:29.2|Info|AppFolderInfo|Data directory is being overridden to [/config]
2024-05-20 19:29:34.5|Info|AppFolderInfo|Data directory is being overridden to [/config]
2024-05-20 19:29:36.1|Info|MigrationController|*** Migrating data source=/config/radarr.db;cache size=-20000;datetimekind=Utc;journal mode=Wal;pooling=True;version=3;busytimeout=100 ***
2024-05-20 19:29:37.2|Info|FluentMigrator.Runner.MigrationRunner|DatabaseEngineVersionCheck migrating
2024-05-20 19:29:37.5|Info|FluentMigrator.Runner.MigrationRunner|PerformDBOperation
2024-05-20 19:29:37.5|Info|NzbDrone.Core.Datastore.Migration.Framework.NzbDroneSQLiteProcessor|Performing DB Operation
2024-05-20 19:29:37.8|Error|FluentMigrator.Runner.MigrationRunner|disk I/O error
disk I/O error

[v5.6.0.8846] code = IoErr (10), message = System.Data.SQLite.SQLiteException (0x800007FF): disk I/O error
disk I/O error

vpn_radarr | at System.RuntimeMethodHandle.InvokeMethod(Object target, Span1& arguments, Signature sig, Boolean constructor, Boolean wrapExceptions) vpn_radarr | at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) vpn_radarr | at Microsoft.AspNetCore.Hosting.ConfigureBuilder.Invoke(Object instance, IApplicationBuilder builder) vpn_radarr | at Microsoft.AspNetCore.Hosting.ConfigureBuilder.<>c__DisplayClass4_0.<Build>b__0(IApplicationBuilder builder) vpn_radarr | at Microsoft.AspNetCore.Hosting.GenericWebHostBuilder.<>c__DisplayClass15_0.<UseStartup>b__1(IApplicationBuilder app) vpn_radarr | at Microsoft.AspNetCore.Mvc.Filters.MiddlewareFilterBuilderStartupFilter.<>c__DisplayClass0_0.<Configure>g__MiddlewareFilterBuilder|0(IApplicationBuilder builder) vpn_radarr | at Microsoft.AspNetCore.Hosting.GenericWebHostService.StartAsync(CancellationToken cancellationToken) vpn_radarr | at Microsoft.Extensions.Hosting.Internal.Host.StartAsync(CancellationToken cancellationToken) vpn_radarr | at Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.RunAsync(IHost host, CancellationToken token) vpn_radarr | at Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.RunAsync(IHost host, CancellationToken token) vpn_radarr | at Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.Run(IHost host) vpn_radarr | at NzbDrone.Host.Bootstrap.Start(String[] args, Action1 trayCallback) in ./Radarr.Host/Bootstrap.cs:line 79
vpn_radarr | at NzbDrone.Console.ConsoleApp.Main(String[] args) in ./Radarr.Console/ConsoleApp.cs:line 43
vpn_radarr |
vpn_radarr |
vpn_radarr | Press enter to exit…
vpn_radarr | Non-recoverable failure, waiting for user intervention…

Again, Sonarr and Lidarr look virtually the same.

Here is the compose script for Radarr. Others are cookie cut from this one. Ports are defined in the transmission-vpn service. I can post the compose script for the entire stack if that helps.

radarr:
image: lscr.io/linuxserver/radarr:latest
container_name: vpn_radarr
environment:
- PUID=1004
- PGID=100
- TZ=US/Eastern
network_mode: “service:transmission-openvpn”
volumes:
- CHANGE_TO_COMPOSE_DATA_PATH/Config/appdata/radarr:/config
- CHANGE_TO_COMPOSE_DATA_PATH/Movies:/movies
- CHANGE_TO_COMPOSE_DATA_PATH/Downloads/transmission/data:/data
restart: unless-stopped

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