[SOLVED] Mono SIGABRT instantly upon service start in FreeNAS Jail

Sonarr version (exact version): Latest master as of 2017-08-15, most likely v2.0.0.4949
Mono version (if Sonarr is not running on Windows): 4.8.1
OS: FreeNAS Nightly 2017-08-18
((Debug logs)): No logs available as it is impossible to access Sonarr to enable debug logging. Changing Info to Debug in config.xml appears to make no difference.
Description of issue:
To start it off, I had to relocate the location of my torrent downloads to the same ZFS dataset as my media to speed up importing. I shut down (PBI) Sonarr via it’s web interface, moved the directories, remounted the directories so they appear identical to Sonarr, and it just stops working. Mono crashes with a SIGABRT every time I attempt to start it within about a second of a service sonarr start.

I decide to try a clean install and just port the database over, so I split the database out, then make a new non-plugin jail. I install Sonarr via pkg install sonarr and let it do it’s thing. After all is said and done, I start Sonarr once to test it, and it boots up fine and starts asking me to set it up as expected. I then shut down Sonarr and link the database I separated out (into it’s own folder to make moving installs easier) back to it’s proper location, and start up Sonarr. It immediately crashes with a SIGABRT from Mono again. I imagine it has something to do with the databases or something, but I just rebuilt my entire Sonarr database after migrating from Windows to FreeNAS and I don’t want to do it again.

As far as I can tell, the only thing Sonarr had going on before I shut everything down was a pending torrent download for a single episode.

If you can give me any instruction on solving this, it’d be much appreciated.

Thanks ahead of time.

Well, I feel like this was a grand adventure. A bunch of things went wrong that all added up to Mono completely dying. Here are their stories:

First, turns out PBI Sonarr uses the user “media” in group “wheel” whereas standard freebsd package Sonarr defaults to “sonarr:sonarr”. That needed fixing.

Then, file permissions somehow got all kinds of ruined during the seemingly innocuous transfer. Fixed those too, by CHMOD’ing them to 777. I know, not “secure” but it’s my sonarr db. not particularly concerned right now.

Next up, Sonarr silently freaking out about port access with a useless “Access Denied” error. Maybe a more descriptive error could be useful in the future? Fixed that with a quick sysctl call to allow lower than port 1024 for non-root because apparently FreeNAS doesn’t like to apply that setting to jails when I tell it to.

Finally everything starts up without dying. Then I get update issues. Sonarr can’t update because root can’t write to the database directory? CHMOD 777.

Then Sonarr can’t update because “media” can’t write to the install directory? CHMOD 777.

Lo and behold, the SIGABRT is finally gone and Sonarr is once again happily downloading various content.

What a wild ride. Marking as solved.

1 Like

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