I’ve been using Sonarr for many years, without much of any issue. However, I stopped the Sonarr service today, and am now unable to bring it back up.
It’s running on CentOS 6, and using the stock Sonarr init.d, and config:
InitD: https://raw.githubusercontent.com/OnceUponALoop/RandomShell/master/NzbDrone-init/nzbdrone.init.centos
Config: https://raw.githubusercontent.com/OnceUponALoop/RandomShell/master/NzbDrone-init/nzbdrone.init-cfg.centos
When starting the nzbdrone process, it seems to start up OK:
/etc/init.d/nzbdrone start
Starting nzbdrone...
nzbdrone started (pid ) [ OK ]
However the PID shows no process ID, and a status returns dead process:
/etc/init.d/nzbdrone status
nzbdrone dead but pid file exists
cat /var/run/nzbdrone.pid
I can also confirm that the mono, or nzbdrone process is also not running.
I’ve reviewed the Installation on CentOS post to make sure there were no new changes:
I’ve also compiled sqlite3.8.5 once again to ensure the DB was working correctly.
I’ve also ran a test version of Sonarr, and it seem to run fine, and was accessible (without the db):
export LPATH_BAK=$LD_LIBRARY_PATH ; export PATH_BAK=$PATH && \
export LD_LIBRARY_PATH=/opt/mono/lib:/opt/sqlite3.8.5/lib && \
export PATH=/opt/mono/bin:/opt/sqlite3.8.5/bin:$PATH && \
/opt/mono/bin/mono /opt/nzbdrone/NzbDrone.exe ; \
export PATH=$PATH_BAK ; export LD_LIBRARY_PATH=$LPATH_BAK
I’ve tried running nzbdrone manually, and the error I capture is:
/opt/mono/bin/mono /opt/nzbdrone/NzbDrone.exe
[Fatal] ConsoleApp: EPIC FAIL!
[v2.0.0.4389] System.TypeInitializationException: The type initializer for 'System.Data.SQLite.SQLiteFactory' threw an exception. ---> System.Data.SQLite.SQLiteException: SQL logic error or missing database
Failed to initialize logging.
at System.Data.SQLite.SQLiteLog.Initialize () [0x000aa] in <61a20cde294d4a3eb43b9d9f6284613b>:0
at System.Data.SQLite.SQLiteFactory..cctor () [0x00020] in <61a20cde294d4a3eb43b9d9f6284613b>:0
--- End of inner exception stack trace ---
at (wrapper managed-to-native) System.Object:__icall_wrapper_mono_generic_class_init (intptr)
at NzbDrone.Core.Datastore.Migration.Framework.MigrationDbFactory.CreateFactory () [0x00000] in <02684a2af4294daca4a93c514a294294>:0
at FluentMigrator.Runner.Processors.DbFactoryBase.get_Factory () [0x00025] in <26bb4df948464ddebb3d8de15736231d>:0
at FluentMigrator.Runner.Processors.DbFactoryBase.CreateConnection (System.String connectionString) [0x00000] in <26bb4df948464ddebb3d8de15736231d>:0
at NzbDrone.Core.Datastore.Migration.Framework.NzbDroneSqliteProcessorFactory.Create (System.String connectionString, FluentMigrator.Runner.IAnnouncer announcer, FluentMigrator.IMigrationProcessorOptions options) [0x00006] in <02684a2af4294daca4a93c514a294294>:0
at NzbDrone.Core.Datastore.Migration.Framework.MigrationController.Migrate (System.String connectionString, NzbDrone.Core.Datastore.Migration.Framework.MigrationContext migrationContext) [0x0005a] in <02684a2af4294daca4a93c514a294294>:0
at NzbDrone.Core.Datastore.DbFactory.Create (NzbDrone.Core.Datastore.Migration.Framework.MigrationContext migrationContext) [0x00048] in <02684a2af4294daca4a93c514a294294>:0
at NzbDrone.Core.Datastore.DbFactory.Create (NzbDrone.Core.Datastore.Migration.Framework.MigrationType migrationType) [0x00010] in <02684a2af4294daca4a93c514a294294>:0
at NzbDrone.Core.Datastore.DbFactory.RegisterDatabase (NzbDrone.Common.Composition.IContainer container) [0x00006] in <02684a2af4294daca4a93c514a294294>:0
at NzbDrone.Host.Bootstrap.Start (NzbDrone.Host.ApplicationModes applicationModes, NzbDrone.Common.EnvironmentInfo.StartupContext startupContext) [0x0003d] in <4afbae1fa38944e2b8b54bcf9e0b1713>:0
at NzbDrone.Host.Bootstrap.Start (NzbDrone.Common.EnvironmentInfo.StartupContext startupContext, NzbDrone.Host.IUserAlert userAlert, System.Action`1[T] startCallback) [0x00075] in <4afbae1fa38944e2b8b54bcf9e0b1713>:0
at NzbDrone.Console.ConsoleApp.Main (System.String[] args) [0x00013] in <ca19c3ec1b01476b9195ae1dd2c1f626>:0
It’s complaining about System.Data.SQLite.SQLiteException: SQL logic error or missing database, but almost certain it’s due to some missing paths or arguments such as sqlite or config path. I can confirm that my nzbdrone.db is not corrupt, and was able to open with no issues in SQLite.
I’ve updated sonarr, and reinstalled SQlite 3.8.5, and still no success.
Anyone able to shed any light on this? I’ve exhausted my resources trying to find out more, so am posting here.