Sonarr Installation

Status
Not open for further replies.

DWELLER_ZA

Dabbler
Joined
Jun 5, 2016
Messages
19
Hi All,

I've fairly new to Jails and CLI in BSD, and I need some assistance please.
I'm running: FreeNAS-9.10-MASTER-201608240406 (0e8142f)

I'm trying to configure a standard Jail to run: Sabnzbd, CouchPotato and Sonarr.
I got Sabnzbd and CouchPotato running with no problems at all, but Sonarr is a major pain in the backside.
I'm also a first time Sonarr user. Migrating from SickRage.

I installed it first with the "pkg install sonarr" and enabled it in the rc.conf file. It doesn't start up. Even with a manual "service sonarr start" command. I just get the message "Starting sonarr." with nothing happening.

A screenshot of my Jail config within FreeNAS:
7TO3kk3.jpg


Mono Version:

root@Downloads:/usr/local/sonarr/logs # mono -V
Mono JIT compiler version 4.4.2 (Stable 4.4.2.11/f72fe45 Tue Aug 16 01:55:53 UTC 2016)
Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
TLS: __thread
SIGSEGV: altstack
Notification: kqueue
Architecture: amd64
Disabled: none
Misc: softdebug
LLVM: supported, not enabled.
GC: sgen


My rc.conf

portmap_enable="NO"
sshd_enable="NO"
sendmail_enable="NO"
sendmail_submit_enable="NO"
sendmail_outbound_enable="NO"
sendmail_msp_queue_enable="NO"
hostname="Downloads"
devfs_enable="YES"
devfs_system_ruleset="devfsrules_common"
inet6_enable="YES"
ip6addrctl_enable="YES"
sonarr_enable="YES"
sabnzbd_enable="YES"
couchpotato_enable="YES"


When I manually try to start it up with mono in debug mode:

/usr/local/share/sonarr # /usr/local/bin/mono --debug /usr/local/share/sonarr/NzbDrone.exe

=================================================================
Got a SIGSEGV while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries
used by your application.
=================================================================

Abort
root@Downloads:/usr/local/share/sonarr #

When I look at the logs located here: /usr/local/sonarr/logs
There is no indication why Sonarr doesn't start up. As in, there is nothing in them of me even attempting to start up Sonarr. The info in there is from the first run when it started up fine. I'll paste them below:

Sonarr.Debug.txt:

16-9-10 09:25:09.7|Info|Bootstrap|Starting Sonarr - /usr/local/share/sonarr/NzbDrone.exe - Version 2.0.0.4230
16-9-10 09:25:09.9|Info|AppFolderInfo|Data directory is being overridden to [/usr/local/sonarr]

Sonarr.Trace.txt:

16-9-10 09:25:09.7|Info|Bootstrap|Starting Sonarr - /usr/local/share/sonarr/NzbDrone.exe - Version 2.0.0.4230
16-9-10 09:25:09.9|Info|AppFolderInfo|Data directory is being overridden to [/usr/local/sonarr]

Sonarr.txt: http://pastebin.com/Z5wH4UDv

My config.xml from Sonarr:

<Config>
<LogLevel>Trace</LogLevel>
<Port>8989</Port>
<UrlBase></UrlBase>
<BindAddress>*</BindAddress>
<SslPort>9898</SslPort>
<EnableSsl>False</EnableSsl>
<ApiKey>dcb50836f4ed4bd3a690eddbce475475</ApiKey>
<AuthenticationMethod>None</AuthenticationMethod>
<Branch>master</Branch>
</Config>

leeloo_BEARA.jpg
 
Last edited:

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
maybe sonarr writes to a log during startup. I'd check in /usr/local/sonarr
and post any logs you can find here

possibly this is a problem with the mono being installed? you could compile your own from ports.

if you just want to use a standard jail to have multiple programs in the same jail, you can accomplish this with plugins which should work without making worrying about the dependencies like you are doing.
you can install a plugin, then upload additional PBI files to the plugin jail on the Jails tab.
 

DWELLER_ZA

Dabbler
Joined
Jun 5, 2016
Messages
19
Thank you for the reply Joshua,

The logs I posted in my original post are from /usr/local/sonarr/logs
The additional files located in /usr/local/sonarr are:

config.xml (Which I also posted)
logs.db
logs.db-shm
logs.db-wal
nzbdrone.db
nzbdrone.db-shm
nzbdrone.db-wal
nzbdrone.pid

possibly this is a problem with the mono being installed? you could compile your own from ports.
Having spent hours on this issue, my gut tells me mono is the problem here, as I attempted to start it up in debug mode (As posted in my original post) and receive no debug information.

if you just want to use a standard jail to have multiple programs in the same jail, you can accomplish this with plugins which should work without making worrying about the dependencies like you are doing.
you can install a plugin, then upload additional PBI files to the plugin jail on the Jails tab.
I'll look into this and see how far I get :)
 

DWELLER_ZA

Dabbler
Joined
Jun 5, 2016
Messages
19
I installed Sonarr from Plugins and FreeNAS created the sonarr_1 pluginjail.
Once it was complete, the Sonarr browser wasn't accessible, so SSH'd in.

The first thing I did was execute sonarr:

root@sonarr_1:/usr/local/share/sonarr # mono --debug NzbDrone.exe

=================================================================
Got a SIGSEGV while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries
used by your application.
=================================================================

Same issue :|
 

DWELLER_ZA

Dabbler
Joined
Jun 5, 2016
Messages
19
When I try and install mono from portsnap:

if test -w /usr/ports/lang/mono/work/mono-4.4.2/mcs; then :; else chmod -R +w /usr/ports/lang/mono/work/mono-4.4.2/mcs; fi
cd /usr/ports/lang/mono/work/mono-4.4.2/mcs && gmake --no-print-directory -s NO_DIR_CHECK=1 PROFILES='binary_reference_assemblies net_4_x xbuild_12 xbuild_14 ' CC='cc' all-profiles
mkdir -p -- build/deps

=================================================================
Got a SIGSEGV while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries
used by your application.
=================================================================

gmake[7]: *** [build/profiles/basic.make:93: build/deps/basic-profile-check.exe] Abort trap
*** The compiler 'mcs' doesn't appear to be usable.
*** Trying the 'monolite' directory.

=================================================================
Got a SIGSEGV while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries
used by your application.
=================================================================

gmake[9]: *** [build/profiles/basic.make:93: build/deps/basic-profile-check.exe] Abort trap
*** The contents of your 'monolite' directory may be out-of-date
*** You may want to try 'make get-monolite-latest'
gmake[9]: *** [build/profiles/basic.make:80: do-profile-check-monolite] Error 1
gmake[8]: *** [build/profiles/basic.make:60: do-profile-check] Error 2
gmake[7]: *** [build/profiles/basic.make:88: do-profile-check-monolite] Error 2
gmake[6]: *** [build/profiles/basic.make:60: do-profile-check] Error 2
gmake[5]: *** [Makefile:49: profile-do--basic--all] Error 2
gmake[4]: *** [Makefile:45: profiles-do--all] Error 2
gmake[3]: *** [Makefile:543: all-local] Error 2
gmake[3]: Leaving directory '/usr/ports/lang/mono/work/mono-4.4.2/runtime'
gmake[2]: *** [Makefile:513: all-recursive] Error 1
gmake[2]: Leaving directory '/usr/ports/lang/mono/work/mono-4.4.2'
gmake[1]: *** [Makefile:442: all] Error 2
gmake[1]: Leaving directory '/usr/ports/lang/mono/work/mono-4.4.2'
===> Compilation failed unexpectedly.
Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure to
the maintainer.
*** Error code 1

Stop.
make: stopped in /usr/ports/lang/mono

I'm stumped. For reference, my spec:

Platform: http://www.supermicro.com/products/system/4U/6048/SSG-6048R-E1CR36N.cfm
CPU: 2 x Xeon E5-2623 v4
Memory: 12 x Samsung 16GB DDR4-2133 2Rx4 LP ECC REG RoHs (192GB Total)
SAS Controller(s): LSI 3008
Hard Drives: 36 x WD Red 8TB (9 x 4 in Z2)
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
I installed Sonarr from Plugins and FreeNAS created the sonarr_1 pluginjail.
Once it was complete, the Sonarr browser wasn't accessible, so SSH'd in.

The first thing I did was execute sonarr:



Same issue :|
were you able to start sonarr on the plugins tab?

if not you system is not working with mono that works on every other system thus far.
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
you could post a bug on the freebsd forum or bug tracker that mono isn't running on your system.
 

DWELLER_ZA

Dabbler
Joined
Jun 5, 2016
Messages
19
Unfortunately not. This is apparently a known issue, as they closed my ticket by marking it as a duplicate ticket when I reported the issue.
 

r0b07

Cadet
Joined
Nov 22, 2013
Messages
8
Unfortunately not. This is apparently a known issue, as they closed my ticket by marking it as a duplicate ticket when I reported the issue.

:(

My suspicion is that this happens on all dual socket motherboards. I've added my comments to the original FreeBSD ticket and have emailed the mono FreeBSD devs.

It seems like this bit people who were using a single CPU as well, but that it's been fixed for that case a while back.

What was your ultimate solution? No Sonarr at all?

I think I may have to run this through a bhyve vm instead of a jail. Bit sad, but doable...
 

r0b07

Cadet
Joined
Nov 22, 2013
Messages
8
After some more playing around trying to run mono both on bare metal and a VM, I've narrowed it down to what seems to be a memory issue.

I have 256G of ram in the server. If I restrict hw.physmem=140G, mono works fine. Anything above hw.physmem=150G or so seems to cause it to crash!

Changing the cpu count or cpu type (in the VM) has no impact.

Seems like something's off when there's too much memory available...

Have updated my FreeBSD bug report, let's see if someone bites.
 

r0b07

Cadet
Joined
Nov 22, 2013
Messages
8
FYI, I've figured it out.

This is the FreeBSD issue that's at the root of this:
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=200937

The fix is changing a single number from 16 to 32 in one file (see the patch attached to the issue) and everything works flawlessly for systems with lots of memory.

I've asked the maintainers to push the fix upstream but it may take some time.

My workaround is to set up my own build server and build a patched FreeBSD package, which now works. Hopefully after a little wait this will be incorporated into the FreeBSD/FreeNAS mono packages.
 
Status
Not open for further replies.
Top