Epic fail System.FormatException ubuntu 14.04 LTS

I followed the instructions for installing on ubunto given here: https://github.com/Sonarr/Sonarr/wiki/Installation#linux
All seemed to work o.k.,
but when I try to run it it says:

[Fatal] ConsoleApp: Epic FAIL.
System FormatException: Input string was not in the correct format
.
.
.
at System.Data.SQLiteConnection.Open

I think the problem is that the file ~/.config/NzbDrone/nzbdrone.db has a size of 0
but I don’t know what I should do to fix this issue.

can I just delete this file and have it recreated?

Eyal

b.t.w. I also tried to uninstall (and delete the ~/.config/NzbDrone folder ) and re-install with the same results

Please post the full log of the error message to pastebin.

well, I have tried to uninstall and reinstall the app.
now I have reached a scenario where I don’t have an NzbDrone library under .config all all and no .bd or logs what so ever…
trying to run sudo mono /opt/NzbDrone/NzbDrone.exe does not seem to recreate those folder nor the files inside them if I try to manually create the folders…

Any recommendations on what to do next would be appreciated.

o.k. - I am new to linux…
found the log:
http://pastebin.com/pJ6TUuyR

Please run mono with the --debug switch (mono --debug /opt/NzbDrone/NzbDrone.exe).

The error looks like an issue with SQLite, but nothing I’ve seen before and the current message doesn’t contain enough details to point to what the issue could be.

Which version of SQLite/SQLite Lib are installed?

1 Like

this is from the log:
http://pastebin.com/C6uZSDXm

how do i check the sqlite version?
when I tried to run sqlite --version it said no sqlite is installed…

however sudo apt list | grep sqlite | grep installed

returns:

libmono-sqlite2.0-cil/unknown,now 3.10.0-0xamarin2 all [installed,automatic]
libmono-sqlite4.0-cil/unknown,now 3.10.0-0xamarin2 all [installed,automatic]
libqt4-sql-sqlite/trusty,now 4:4.8.5+git192-g085f851+dfsg-2ubuntu4 i386 [installed]
libqt5sql5-sqlite/trusty-updates,now 5.2.1+dfsg-1ubuntu14.2 i386 [installed]
libsqlite3-0/trusty,now 3.8.2-1ubuntu2 i386 [installed]
sqlite3/trusty,now 3.8.2-1ubuntu2 i386 [installed,automatic]

apt list works, I have the same version on my test Ubuntu 14.04 system, so it doesn’t seem like a mono error.

You have mono 3.10 installed, correct?

Where are you getting the logs from if that folder isn’t being created?

mono -V
Mono JIT compiler version 3.10.0 (tarball Wed Nov 5 13:32:50 UTC 2014)
Copyright © 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
TLS: __thread
SIGSEGV: altstack
Notifications: epoll
Architecture: x86
Disabled: none
Misc: softdebug
LLVM: supported, not enabled.
GC: sgen

my statement about the folder not being created was when I expected it to be found in my user home folder. but it does exist in /root/.config/NzbDrone/logs/nzbdrone.txt

but as you can see here:

sudo ls -laR /root/.config/NzbDrone/
[sudo] password for test:
/root/.config/NzbDrone/:
total 16
drwxr-xr-x 3 root root 4096 ינו 19 20:55 .
drwxr-xr-x 3 root root 4096 ינו 19 20:55 …
drwxr-xr-x 2 root root 4096 ינו 19 20:55 logs
-rw-r–r-- 1 root root 0 ינו 19 20:55 nzbdrone.db
-rw-r–r-- 1 root root 4 ינו 20 16:55 nzbdrone.pid

/root/.config/NzbDrone/logs:
total 20
drwxr-xr-x 2 root root 4096 ינו 19 20:55 .
drwxr-xr-x 3 root root 4096 ינו 19 20:55 …
-rw-r–r-- 1 root root 8901 ינו 20 16:55 nzbdrone.txt

the nzbdrone.db file has a size of 0

Could you download this build and test it out? https://download.sonarr.tv/v2/develop/mono/NzbDrone.develop.2.0.0.2673.mono.tar.gz

Let us know how it works out.

tanks for the assistance so far - but still

[Info] Bootstrap: Starting NzbDrone - /opt/NzbDrone/NzbDrone.exe - Version 2.0.0.2673
[Info] MigrationLogger: *** Migrating data source=/root/.config/NzbDrone/nzbdrone.db;cache size=‎-10485760;datetimekind=Utc;journal mode=Wal;pooling=True;version=3 ***

[Fatal] ConsoleApp: EPIC FAIL!

System.FormatException: Input string was not in the correct format
at System.Int32.Parse (System.String s, NumberStyles style, IFormatProvider provider) [0x00000] in :0
at System.Int32.Parse (System.String s, IFormatProvider provider) [0x00000] in :0
at System.Convert.ToInt32 (System.String value, IFormatProvider provider) [0x00000] in :0
at System.Data.SQLite.SQLiteConnection.Open () [0x00000] in :0

Is it normal for the /root/.config/NzbDrone/nzbdrone.db file to have a size of 0 ?
should i try to delete it?
will sonarr try to re-create the .db file?

Not normal, but it’s attempting to create it then failing, resulting in the 0 byte file.

any additionla suggestions ?

At this moment, no. Do have another system you can run Sonarr on to see if it works (even a VM?). Hate to blame it on something that I can’t prove, but we haven’t been able to reproduce it (and the logs don’t show much since its happening outside of Sonarr’s code).

I understand from the stack trace that the error happens within the SQLiteConnection.Open method, and that the error itself is related to not being able to convert some value from a string to an integer.
I am assuming this is related to some form of a connection string.

could you create a version that that logs this connection string before it calls SQLiteConnection.Open ?
it might help us understand where the problem is…
also / alternatively - can we try and do whatever sonarr is trying to do directly from the sqlite console?

The connection string has always been logged (from your log above):

[Info] MigrationLogger: *** Migrating data source=/root/.config/NzbDrone/nzbdrone.db;cache size=‎-10485760;datetimekind=Utc;journal mode=Wal;pooling=True;version=3 ***

Nothing out of the norm with it (mine is the same except for the path).

If you can open the connection using the connection string its possible, but that will just create the shell of the DB, none of the migrations would be run.

When I run sudo apt list | grep sqlite | grep installed I get a much shorter list:

libsqlite3-0/trusty,now 3.8.2-1ubuntu2 amd64 [installed] sqlite3/trusty,now 3.8.2-1ubuntu2 amd64 [installed,automatic]

Not sure why you’d have the libmono sqlite ones since they don’t seem to be required for normal operation.

welll I actually got it to work now.
I belive it is related to the language settings of my ubunto.
I was purchased pre-installed with its language set to hebrew.
I am guessing that some regional aspect was returning a string where a number was expected - maybe a month name or something similar.

anyway - it is now running and you have my thanks for your help.

just to clarify - it seems that the fact that I changed the main language to english did the trick - but I did not try to change back to make sure.
somewhere along the proccess I also go a message that said that the UI foldr was missing and I did an uninstall and an installl - but it sarted to work (in the sense that it did all the migrations and did not return the FAIL message BEFORE this re-install.

Thats certainly interesting, I know the zip library we use also has some issues with different cultures.

Thanks for letting us know, we’ll keep this in mind if another similar issue arises.