System.Data.SQLite.SQLiteException: database disk image is malformed
database disk image is malformed
at System.Data.SQLite.SQLite3.Reset (System.Data.SQLite.SQLiteStatement) <0x00267>
at System.Data.SQLite.SQLite3.Step (System.Data.SQLite.SQLiteStatement) <0x0013e>
at System.Data.SQLite.SQLiteDataReader.NextResult () <0x0052f>
at System.Data.SQLite.SQLiteDataReader…ctor (System.Data.SQLite.SQLiteCommand,System.Data.CommandBehavior) <0x001ef>
at (wrapper remoting-invoke-with-check) System.Data.SQLite.SQLiteDataReader…ctor (System.Data.SQLite.SQLiteCommand,System.Data.CommandBehavior) <0x00047>
at System.Data.SQLite.SQLiteCommand.ExecuteReader (System.Data.CommandBehavior) <0x00043>
at System.Data.SQLite.SQLiteCommand.ExecuteScalar () <0x0002f>
at Marr.Data.DataMapper.ExecuteScalar (string) <0x0007b>
at Marr.Data.QGen.QueryBuilder1<NzbDrone.Core.Instrumentation.Log>.GetRowCount () <0x00123> at Marr.Data.QGen.SortBuilder1<NzbDrone.Core.Instrumentation.Log>.GetRowCount () <0x0001b>
at NzbDrone.Core.Datastore.BasicRepository1<NzbDrone.Core.Instrumentation.Log>.GetPaged (NzbDrone.Core.Datastore.PagingSpec1<NzbDrone.Core.Instrumentation.Log>) <0x0008e>
at NzbDrone.Core.Instrumentation.LogService.Paged (NzbDrone.Core.Datastore.PagingSpec1<NzbDrone.Core.Instrumentation.Log>) <0x0002b> at NzbDrone.Api.NzbDroneRestModule1<NzbDrone.Api.Logs.LogResource>.ApplyToPage<NzbDrone.Core.Instrumentation.Log> (System.Func2<NzbDrone.Core.Datastore.PagingSpec1<NzbDrone.Core.Instrumentation.Log>, NzbDrone.Core.Datastore.PagingSpec1<NzbDrone.Core.Instrumentation.Log>>,NzbDrone.Core.Datastore.PagingSpec1<NzbDrone.Core.Instrumentation.Log>) <0x00029>
at NzbDrone.Api.Logs.LogModule.GetLogs (NzbDrone.Api.PagingResource1<NzbDrone.Api.Logs.LogResource>) <0x0220b> at NzbDrone.Api.REST.RestModule1<NzbDrone.Api.Logs.LogResource>.<set_GetResourcePaged>b__d (object) <0x00036>
at (wrapper dynamic-method) object.CallSite.Target (System.Runtime.CompilerServices.Closure,System.Runtime.CompilerServices.CallSite,System.Func`2<object, object>,object) <0x000a0>
at Nancy.Routing.Route/<>c__DisplayClass4.b__3 (object,System.Threading.CancellationToken) <0x00137>
So it looks like my DB has issues. I tried restoring from the back up and it got worse - sonarr wouldn’t give me any gui to work with in my browser.
So I put the ‘bad’ db & config back and now I only get api/queue errors on pop up.
Thoughts?
EDIT: Lost my indexer & downloader settings. Grrrr . . .Possibly others, but haven’t gone thru yet to see.
EDIT2: I’ve also apparently lost all torrent options as well. Sigh . . .
That log snippet shows a problem with log.db, deleting that should be sufficient to get it back to working, or if there is something wrong with nzbdrone.db it should log errors when accessing it.
You can open up nzbdrone.db in a sqlite editor to see if those config settings are actually gone (they have their own tables), but I suspect the log.db issues are part of the problem.
If I completely purge sonaar & then reinstall via apt-get on the devel version, & restore from back up, in theory, will all my series & settings come back?
Yup, as long as the backup isn’t damaged (which it shouldn’t be). Depending on the damage you might be able to recover the DB, but the backup is taken just before the upgrade, so it shouldn’t cause any loss if you roll back to it.
apt-get install nzbdrone (It looks like it grabs mono packages too?)
then run drone specifing the /usr/local/mono package and I get this:
[Info] Bootstrap: Starting NzbDrone - /opt/NzbDrone/NzbDrone.exe - Version 2.0.0.2278
Assertion at processes.c:2595, condition `mp’ not met
Stacktrace:
at <0xffffffff>
at (wrapper managed-to-native) System.Diagnostics.Process.ExitCode_internal (intptr) <0xffffffff>
at System.Diagnostics.Process.get_HasExited () <0x00033>
at (wrapper remoting-invoke-with-check) System.Diagnostics.Process.get_HasExited () <0xffffffff>
at NzbDrone.Common.Processes.ProcessProvider.ConvertToProcessInfo (System.Diagnostics.Process) <0x00163>
at NzbDrone.Common.Processes.ProcessProvider.GetCurrentProcess () <0x00013>
at NzbDrone.Common.Processes.PidFileProvider.Write () <0x00087>
at NzbDrone.Host.Bootstrap.Start (NzbDrone.Common.EnvironmentInfo.StartupContext,NzbDrone.Host.IUserAlert,System.Action`1<NzbDrone.Common.Composition.IContainer>) <0x0016a>
at NzbDrone.Console.ConsoleApp.Main (string[]) <0x0007b>
at (wrapper runtime-invoke) .runtime_invoke_void_object (object,intptr,intptr,intptr) <0xffffffff>
=================================================================
Got a SIGABRT while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries
used by your application.
We’re currently hosting mono 3.10 in our apt-get repo (we’ll be updating that to 3.12 since its now available, assuming its stable), so there should be no reason to compile it yourself now.
Following that guide you would clone down the latest code from master, which is now 3.12, not 3.6 (like it was when it was written).
https://github.com/Sonarr/Sonarr/wiki/Installation#debianubuntu - remove any old nzbdrone repo, add the new one listed on the wiki and update/install, it should pull in the latest version, switch “master” to “develop” to use the develop branch instead.
Back up. Thanks for the help. I’m having one of those weeks where everything is broken. This, car’s brakes, heater, main tv at home, and a stupid printer at work.
the branch is develop not development if you use an invalid branch it will default back to master. Which is behind torrents, so that could cause settings to be missing.
BTW, I forgot that /opt/NzbDrone was owned by root, but that the drone process runs as a local user. So when I did an update from the gui, it managed to delete all the files in /opt/NzbDrone (didn’t check the sub-dirs).
I did apt-get install --re-install nzbdrone, then chmod’d the folder & all’s well and should be good going forward.