Autostart terminates with errors, manual start works

My system runs Debian and I use the Sonarr download provided in the Linux instructions under the heading “Other”.(http://update.sonarr.tv/v2/master/mono/NzbDrone.master.tar.gz)
Mono version 4.3

The contents are located in the home directory of the user that is supposed to run Sonarr. When I manually start NzbDrone.exe it starts without a problem.

mono NzbDrone/NzbDrone.exe

But running it in the background, using an startup script or cron job does not work (I can not access the WebUI). However, after running

mono NzbDrone/NzbDrone.exe &

if I try to run

mono NzbDrone/NzbDrone.exe

again, I get the error that there is another instance running (But I can not access the WebUI).

cron log:

Missing method .ctor in assembly /home/nzbget/NzbDrone/NLog.dll, type System.ServiceModel.ServiceContractAttribute
Can't find custom attr constructor image: /home/nzbget/NzbDrone/NLog.dll mtoken: 0x0a000316
Missing method .ctor in assembly /home/nzbget/NzbDrone/NLog.dll, type System.ServiceModel.ServiceContractAttribute
Can't find custom attr constructor image: /home/nzbget/NzbDrone/NLog.dll mtoken: 0x0a000316
Missing method .ctor in assembly /home/nzbget/NzbDrone/NLog.dll, type System.ServiceModel.ServiceContractAttribute
Can't find custom attr constructor image: /home/nzbget/NzbDrone/NLog.dll mtoken: 0x0a000316
Missing method .ctor in assembly /home/nzbget/NzbDrone/NLog.dll, type System.ServiceModel.ServiceContractAttribute
Can't find custom attr constructor image: /home/nzbget/NzbDrone/NLog.dll mtoken: 0x0a000316
Missing method .ctor in assembly /home/nzbget/NzbDrone/NLog.dll, type System.ServiceModel.ServiceContractAttribute
Can't find custom attr constructor image: /home/nzbget/NzbDrone/NLog.dll mtoken: 0x0a000316
Missing method .ctor in assembly /home/nzbget/NzbDrone/NLog.dll, type System.ServiceModel.ServiceContractAttribute
Can't find custom attr constructor image: /home/nzbget/NzbDrone/NLog.dll mtoken: 0x0a000316
* Assertion at class.c:5607, condition `!mono_loader_get_last_error ()' not met

Stacktrace:

  at  <0xffffffff>
  at (wrapper managed-to-native) System.MonoCustomAttrs.IsDefinedInternal (System.Reflection.ICustomAttributeProvider,System.Type) <0xffffffff>
  at System.MonoCustomAttrs.IsDefined (System.Reflection.ICustomAttributeProvider,System.Type,bool) <0x00073>
  at System.MonoType.IsDefined (System.Type,bool) <0x0001b>
  at NLog.Config.MethodFactory`2.RegisterType (System.Type,string) <0x0004c>
  at NLog.Config.MethodFactory`2.ScanAssembly (System.Reflection.Assembly,string) <0x0012b>
  at NLog.Config.ConfigurationItemFactory.RegisterItemsFromAssembly (System.Reflection.Assembly,string) <0x00109>
  at NLog.Config.ConfigurationItemFactory.RegisterItemsFromAssembly (System.Reflection.Assembly) <0x00023>
  at NLog.Config.ConfigurationItemFactory..ctor (System.Reflection.Assembly[]) <0x004a7>
  at NLog.Config.ConfigurationItemFactory.BuildDefaultFactory () <0x00077>
  at NLog.Config.ConfigurationItemFactory..cctor () <0x0000b>
  at (wrapper runtime-invoke) object.runtime_invoke_void (object,intptr,intptr,intptr) <0xffffffff>
  at  <0xffffffff>
  at NLog.Conditions.ConditionParser.ParseExpression (string) <0x0000f>
  at NLog.Conditions.ConditionExpression.op_Implicit (string) <0x0000f>
  at NLog.Targets.ColoredConsoleTarget..cctor () <0x0009f>
  at (wrapper runtime-invoke) object.runtime_invoke_void (object,intptr,intptr,intptr) <0xffffffff>
  at  <0xffffffff>
  at NzbDrone.Common.Instrumentation.NzbDroneLogger.RegisterConsole () <0x0002b>
  at NzbDrone.Common.Instrumentation.NzbDroneLogger.Register (NzbDrone.Common.EnvironmentInfo.IStartupContext,bool,bool) <0x000c3>
  at NzbDrone.Console.ConsoleApp.Main (string[]) <0x00053>
  at (wrapper runtime-invoke) .runtime_invoke_void_object (object,intptr,intptr,intptr) <0xffffffff>

Native stacktrace:

        mono() [0x4b3f7c]
        /lib/x86_64-linux-gnu/libpthread.so.0(+0xf8d0) [0x7fb596c888d0]
        /lib/x86_64-linux-gnu/libc.so.6(gsignal+0x37) [0x7fb596905107]
        /lib/x86_64-linux-gnu/libc.so.6(abort+0x148) [0x7fb5969064e8]
        mono() [0x636e59]
        mono() [0x637067]
        mono() [0x6371b6]
        mono() [0x51ea28]
        mono(mono_class_get_full+0x112) [0x51fbb2]
        mono(mono_class_from_name+0x107) [0x51fde7]
        mono(mono_class_from_typeref+0x10e) [0x51f73e]
        mono() [0x546845]
        mono() [0x5469e3]
        mono(mono_get_method_full+0xbe) [0x546f1e]
        mono(mono_custom_attrs_from_index+0x129) [0x5b83f9]
        mono() [0x53c6c5]
        [0x41fd0ab8]

Debug info from gdb:


=================================================================
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.
=================================================================

Aborted

I have been trying to get this to run for days, if anyone could help me with this I would really appreciate it!

Thanks in advance!

Seems like a problem with the mono version. I have it running in Debian wheezy with mono version 4.0.3 and init script for starting.

The mono version I use is not the stock wheezy one, is from the mono repos.

Are you sure is version 4.3 and not 4.0.3?

I compiled the mono source from git (version query below).

I really don’t get what happens when starting Sonarr. If I start it in the foreground everything works without a problem, but as soon as I try to let it run in the background it seems to pause. When trying to start it in the background using the terminal it just instantly pauses and can be unpaused using “fg” to get it to the foreground.

I tried to install mono using the mono repository, but that leaves me with errors:

 mono-complete : Depends: mono-devel (= 4.0.4.1-0xamarin1) but it is not going to be installed
                 Depends: mono-4.0-service (= 4.0.4.1-0xamarin1) but it is not going to be installed
                 Depends: libmono-cil-dev (= 4.0.4.1-0xamarin1) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

mono --version output:

$ mono --version
Mono JIT compiler version 4.3.0 (master/99fddab Thu Sep 17 16:25:46 CEST 2015)
Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
        TLS:           __thread
        SIGSEGV:       altstack
        Notifications: epoll
        Architecture:  amd64
        Disabled:      none
        Misc:          softdebug
        LLVM:          supported, not enabled.
        GC:            sgen

My guess is you’ll have to purge the whole mono runtime you have running there to install the xamarin one. Do you need such a high runtime of mono?

I guess I will try that, thanks for your feedback!

I only need mono to run Sonarr, so as long as that works I don’t care which version I run.

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