NzbDrone as synology package

Hi There,

I want to switch from Sickbeard to NzbDrone, but there isn’t a synology package available. I have tried running the debian package using the mono package from synology. But this throws a lot of errors (see below). I have already opened up a request to create a package on the synocommunity: https://github.com/SynoCommunity/spksrc/issues/671

Can someone guide me with directions on how to get NzbDrone to work on a synology? I am no linux expert, but can handle the basics.

Thanks!

Errors after start with mono package.

DiskStation> mono /volume2/Downloads/NzbDrone/NzbDrone.exe
[Info] Bootstrap: Starting NzbDrone Console. Version 2.0.0.691
[Info] MigrationLogger: *** Migrating data source=/root/.config/NzbDrone/nzbdrone.db;cache size=-10485760;datetimekind=Utc;journal mode=Wal ***
[Info] MigrationLogger: *** VersionMigration migrating ***
[Fatal] ConsoleApp: EPIC FAIL!

System.EntryPointNotFoundException: sqlite3_column_database_name
at (wrapper managed-to-native) System.Data.SQLite.UnsafeNativeMethods:sqlite3_column_database_name (intptr,int)
at System.Data.SQLite.SQLite3.ColumnDatabaseName (System.Data.SQLite.SQLiteStatement stmt, Int32 index) [0x00000] in :0
at System.Data.SQLite.SQLiteDataReader.GetStatementColumnParents (System.Data.SQLite.SQLiteBase sql, System.Data.SQLite.SQLiteStatement stmt, Int32 fieldCount, System.Collections.Generic.Dictionary2& parentToColumns, System.Collections.Generic.Dictionary2& columnToParent) [0x00000] in :0
at System.Data.SQLite.SQLiteDataReader.GetSchemaTable (Boolean wantUniqueInfo, Boolean wantDefaultValue) [0x00000] in :0
at System.Data.SQLite.SQLiteDataReader.GetSchemaTable () [0x00000] in :0
at System.Data.Common.DataAdapter.BuildSchema (IDataReader reader, System.Data.DataTable table, SchemaType schemaType, MissingSchemaAction missingSchAction, MissingMappingAction missingMapAction, System.Data.Common.DataTableMappingCollection dtMapping) [0x00000] in :0
at System.Data.Common.DataAdapter.BuildSchema (IDataReader reader, System.Data.DataTable table, SchemaType schemaType) [0x00000] in :0
at System.Data.Common.DataAdapter.FillTable (System.Data.DataTable dataTable, IDataReader dataReader, Int32 startRecord, Int32 maxRecords, System.Int32& counter) [0x00000] in :0
at System.Data.Common.DataAdapter.FillInternal (System.Data.DataSet dataSet, System.String srcTable, IDataReader dataReader, Int32 startRecord, Int32 maxRecords) [0x00000] in :0
at System.Data.Common.DataAdapter.Fill (System.Data.DataSet dataSet, System.String srcTable, IDataReader dataReader, Int32 startRecord, Int32 maxRecords) [0x00000] in :0
at System.Data.Common.DbDataAdapter.Fill (System.Data.DataSet dataSet, Int32 startRecord, Int32 maxRecords, System.String srcTable, IDbCommand command, CommandBehavior behavior) [0x00000] in :0
at System.Data.Common.DbDataAdapter.Fill (System.Data.DataSet dataSet) [0x00000] in :0
at FluentMigrator.Runner.Processors.Sqlite.SqliteProcessor.Read (System.String template, System.Object[] args) [0x00000] in :0
at FluentMigrator.Runner.Processors.Sqlite.SqliteProcessor.ColumnExists (System.String schemaName, System.String tableName, System.String columnName) [0x00000] in :0
at FluentMigrator.Runner.VersionLoader.get_AlreadyMadeVersionUnique () [0x00000] in :0
at FluentMigrator.Runner.VersionLoader.LoadVersionInfo () [0x00000] in :0
at FluentMigrator.Runner.VersionLoader…ctor (IMigrationRunner runner, System.Reflection.Assembly assembly, IMigrationConventions conventions) [0x00000] in :0
at FluentMigrator.Runner.MigrationRunner…ctor (System.Reflection.Assembly assembly, IRunnerContext runnerContext, IMigrationProcessor processor) [0x00000] in :0
at NzbDrone.Core.Datastore.Migration.Framework.MigrationController.MigrateToLatest (System.String connectionString, MigrationType migrationType) [0x00000] in :0
at NzbDrone.Core.Datastore.DbFactory.Create (MigrationType migrationType) [0x00000] in :0
at NzbDrone.Core.Datastore.DbFactory.RegisterDatabase (IContainer container) [0x00000] in :0
at NzbDrone.Host.Bootstrap.Start (NzbDrone.Common.EnvironmentInfo.StartupArguments args, IUserAlert userAlert) [0x00000] in :0
at NzbDrone.Console.ConsoleApp.Main (System.String[] args) [0x00000] in :0

The error shows sqlite failing, likely its running a version not compatible with mono, there isn’t a synology package and we’re not at the stage where we’re ready to support one yet.

I don’t have a synology, so its not something I can easily test, it would be helpful to know what version on mono its running as well as the sqlite version.

Hi Markus, thanks for your reply. Here is the info from mono and sqlite:

DiskStation> mono -V
Mono JIT compiler version 2.11.1 ((no/426188e Wed Aug 29 11:04:56 CST 2012)
Copyright © 2002-2012 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
TLS: normal
SIGSEGV: normal
Notifications: epoll
Architecture: armel,soft-float
Disabled: profiler,debug,logging,soft_debug
Misc:
LLVM: supported, not enabled.
GC: Included Boehm (with typed GC and Parallel Mark)

DiskStation> sqlite3
SQLite version 3.7.3
Enter “.help” for instructions
Enter SQL statements terminated with a ";"
sqlite>

Hope this helps! Would love to run it on my synology, and it would be real nice If I can help out making it available to other users!

Yeah, thats an old version of Sqlite, released in 2010, I’m not sure if there is a newer package available, a quick google search didn’t show me anything concrete, 3.7.17 is the latest 3.7 release, but 3.8.0.2 is the latest official release.

Hopefully you’re able to update via ipkg on the synology to a newer version that works with drone (I don’t know what version that is, but there should be one out there somewhere).

ipkg can get 3.8.0.2, but I wouldn’t want to override the path for the whole system. Any way to specify where to look for sqlite3 libraries? config file? command line?

In the windows package we include sqlite.dll, but I’m not sure if you could simply add sqlite.so in the root of the drone directory and have that work or not.

well the thing is… IPKG doesn’t notice the already installed version of sqlite… so you can install it with ipkg, but then you have two versions of sqlite running. I would rather update the current version. I have this question opened at synology, but so far no luck.

Evant: while synology testing SQLite 3.8 with all of their software in a dsm upgrade would be fantastic, I would not recommend upgrading it for all apps on the system. There are obviously compatibility issues.

so this is the answer from synology…

Unfortunately there is no announced plan to support this feature at the moment. I apologize for your inconvenience. However, I have passed this message to our developers and product management group. They will have more research on such feature. Thank you for bringing this issue to our attention.

I’ll be waiting :slight_smile:

It seems that SQLite has been updated on the Synology and i’m curious to see if we might get this working on the Synology. This would mean a great new adoption group for NZBDrone.

NAS> sqlite3
SQLite version 3.8.1 2013-10-17 12:57:35

If you can install mono you can run it, you need mono 2.10+ but 3.0+ is recommended. We have no plans to build official packages at this time, but if someone wants to take it on, we will do what we can to support it.

We would love to create packages for each distro/platform, but we don’t have the time to work on that and improve drone at the same time.

hi there, will definitely try out if it works now with new sql.

EDIT: I downloaded the package from the http link manually.

After running it with mono, I get this error output:

[Info] Bootstrap: Starting NzbDrone Console. Version 2.0.0.1025
[Info] MigrationLogger: *** Migrating data source=/root/.config/NzbDrone/nzbdrone.db;cache size=-10485760;datetimekind=Utc;journal mode=Wal ***
[Info] MigrationLogger: *** VersionMigration migrating ***

[Fatal] ConsoleApp: EPIC FAIL!

System.EntryPointNotFoundException: sqlite3_column_database_name
at (wrapper managed-to-native) System.Data.SQLite.UnsafeNativeMethods:sqlite3_column_database_name (intptr,int)
at System.Data.SQLite.SQLite3.ColumnDatabaseName (System.Data.SQLite.SQLiteStatement stmt, Int32 index) [0x00000] in :0
at System.Data.SQLite.SQLiteDataReader.GetStatementColumnParents (System.Data.SQLite.SQLiteBase sql, System.Data.SQLite.SQLiteStatement stmt, Int32 fieldCount, System.Collections.Generic.Dictionary2& parentToColumns, System.Collections.Generic.Dictionary2& columnToParent) [0x00000] in :0
at System.Data.SQLite.SQLiteDataReader.GetSchemaTable (Boolean wantUniqueInfo, Boolean wantDefaultValue) [0x00000] in :0
at System.Data.SQLite.SQLiteDataReader.GetSchemaTable () [0x00000] in :0
at System.Data.Common.DataAdapter.BuildSchema (IDataReader reader, System.Data.DataTable table, SchemaType schemaType, MissingSchemaAction missingSchAction, MissingMappingAction missingMapAction, System.Data.Common.DataTableMappingCollection dtMapping) [0x00000] in :0
at System.Data.Common.DataAdapter.BuildSchema (IDataReader reader, System.Data.DataTable table, SchemaType schemaType) [0x00000] in :0
at System.Data.Common.DataAdapter.FillTable (System.Data.DataTable dataTable, IDataReader dataReader, Int32 startRecord, Int32 maxRecords, System.Int32& counter) [0x00000] in :0
at System.Data.Common.DataAdapter.FillInternal (System.Data.DataSet dataSet, System.String srcTable, IDataReader dataReader, Int32 startRecord, Int32 maxRecords) [0x00000] in :0
at System.Data.Common.DataAdapter.Fill (System.Data.DataSet dataSet, System.String srcTable, IDataReader dataReader, Int32 startRecord, Int32 maxRecords) [0x00000] in :0
at System.Data.Common.DbDataAdapter.Fill (System.Data.DataSet dataSet, Int32 startRecord, Int32 maxRecords, System.String srcTable, IDbCommand command, CommandBehavior behavior) [0x00000] in :0
at System.Data.Common.DbDataAdapter.Fill (System.Data.DataSet dataSet) [0x00000] in :0
at FluentMigrator.Runner.Processors.Sqlite.SqliteProcessor.Read (System.String template, System.Object[] args) [0x00000] in :0
at FluentMigrator.Runner.Processors.Sqlite.SqliteProcessor.ColumnExists (System.String schemaName, System.String tableName, System.String columnName) [0x00000] in :0
at FluentMigrator.Runner.VersionLoader.get_AlreadyMadeVersionUnique () [0x00000] in :0
at FluentMigrator.Runner.VersionLoader.LoadVersionInfo () [0x00000] in :0
at FluentMigrator.Runner.VersionLoader…ctor (IMigrationRunner runner, System.Reflection.Assembly assembly, IMigrationConventions conventions) [0x00000] in :0
at FluentMigrator.Runner.MigrationRunner…ctor (System.Reflection.Assembly assembly, IRunnerContext runnerContext, IMigrationProcessor processor) [0x00000] in :0
at NzbDrone.Core.Datastore.Migration.Framework.MigrationController.MigrateToLatest (System.String connectionString, MigrationType migrationType) [0x00000] in :0
at NzbDrone.Core.Datastore.DbFactory.Create (MigrationType migrationType) [0x00000] in :0
at NzbDrone.Core.Datastore.DbFactory.RegisterDatabase (IContainer container) [0x00000] in :0
at NzbDrone.Host.Bootstrap.Start (ApplicationModes applicationModes) [0x00000] in :0
at NzbDrone.Host.Bootstrap.Start (NzbDrone.Common.EnvironmentInfo.StartupContext startupContext, IUserAlert userAlert, System.Action`1 startCallback) [0x00000] in :0
at NzbDrone.Console.ConsoleApp.Main (System.String[] args) [0x00000] in :0

It tells me to hit any key to exit. If I do so, my terminal window doesn’t respond to commands :slight_smile:

Any suggestions?

Looks like our SQLite library is missing something it needs in SQLite, looks similar to the issue we have with OS X currently (incompatible SQLite version).

AS for the not responding to console, not sure whats causing it as its fine on Windows, but its an issue: https://trello.com/c/iLadoB4y/485-mono-ctrl-c-doesn-t-exit

Is there something I can do about this missing SQLite library!

Well i’m not sure, but do we still need to replace the SQLite library with SQLite.so instead of dll on mono?

sqlite.dll is for Windows only, Linux uses .so, so you’ll need a support version along side NzbDrone.exe, or as long as its available on the path it should find it (it will look locally first).

Of course the version needs to work with drone, or it won’t work at all.

Well i guess that’s the error we are having here? Since I think EvtK only used the deb version with the supplied sqlite.exe and didn’t replace it with Sqlite.so. So time to hunt down a compatible SQLite.so. Thanks for the little tips and hits. Really appreciate it. Hopefully we can make NZBDrone working on a Synology NAS

I am also a synology user who is wanting to make the switch. Hoping someone can help us out!! :smiley:

I think a lot of users are willing to make the switch, but currently there isn’t a really good option (none) to run it on a Synology (busybox) Nas :frowning:

I saw that the OS X (mac) version is nearly complete and available. It seems that the mac version was also missing due to the same issues. Hopefully the work put in to make a mac version will make providing a synology package a real possibility!

A user who got NZBDrone working on his mac here (with instructions:) http://www.reddit.com/r/usenet/comments/1v16lr/running_nzbdrone_on_osx/

It might be helpful for someone daring enough to try to get it working on a synology