XmlException Syntax Error


#25

I ran into this error on freenas 11 using the Sonarr plugin version 2.0.0.3732 PBI sonarr-2.0.0.3732-amd64.

pkg install mono was upgrading the system mono, but sonarr wasn’t updating because it was using its own mono binary:

# cat /usr/local/etc/rc.d/sonarr | grep mono
procname="/usr/pbi/sonarr-amd64/bin/mono"

I switched that procname in the start up script /usr/local/etc/rc.d/sonarr:

# cat /usr/local/etc/rc.d/sonarr
#!/bin/sh
#
# Author: Mark Felder <feld@FreeBSD.org>
#
# $FreeBSD$
#

# PROVIDE: sonarr
# REQUIRE: LOGIN
# KEYWORD: shutdown

# Add the following lines to /etc/rc.conf to enable sonarr:
# sonarr_enable="YES"

. /etc/rc.subr

name="sonarr"
rcvar=sonarr_enable

load_rc_config $name

: ${sonarr_enable="NO"}
: ${sonarr_user:="sonarr"}
: ${sonarr_data_dir:="/usr/pbi/sonarr-amd64/sonarr"}

pidfile="${sonarr_data_dir}/nzbdrone.pid"
procname="/usr/local/bin/mono"
command="/usr/sbin/daemon"
command_args="-f ${procname} /usr/pbi/sonarr-amd64/share/sonarr/NzbDrone.exe --nobrowser --data=${sonarr_data_dir}"
start_precmd=sonarr_precmd

sonarr_precmd()
{
	export XDG_CONFIG_HOME=${sonarr_data_dir}

	if [ ! -d ${sonarr_data_dir} ]; then
		install -d -o ${sonarr_user} ${sonarr_data_dir}
	fi
}

run_rc_command "$1"

I was then getting a SIGSEGV related to my sqlite install. I removed my system version of sqlite3 (sqlite3-3.23.1) and downgraded to sqlite3-3.13.0 and then restarting sonarr got everything back up and running correctly again:

root@sonarr_1:~ # pkg delete -f sqlite3
Checking integrity... done (0 conflicting)
Deinstallation has been requested for the following 1 packages (of 0 packages in the universe):

Installed packages to be REMOVED:
	sqlite3-3.23.1

Number of packages to be removed: 1

The operation will free 5 MiB.

Proceed with deinstalling packages? [y/N]: y
[sonarr_1] [1/1] Deinstalling sqlite3-3.23.1...
[sonarr_1] [1/1] Deleting files for sqlite3-3.23.1: 100%
root@sonarr_1:~ # fetch "http://pkg.freebsd.org/freebsd:11:x86:64/release_0/All/sqlite3-3.13.0.txz"
sqlite3-3.13.0.txz                            100% of  677 kB 1071 kBps 00m00s
root@sonarr_1:~ #
root@sonarr_1:~ #
root@sonarr_1:~ # pkg add sqlite3-3.13.0.txz
[sonarr_1] Installing sqlite3-3.13.0...
[sonarr_1] Extracting sqlite3-3.13.0: 100%

Hopefully this helps


#26

Thanks this worked for me (editing the rc.d init file) although I didn’t need to downgrade sqlite3


#27

Hi,

Am having same error since Saturday, 9th.

Have sonarr as package installed on OpenMediaView and can’t upgrade Mono easily as a newbie.

Anything else I can try please?


#28

I am having this same issue as well. Any NZB file produces the syntax error as noted above.

Sonarr Version
2.0.0.5163
Mono Version
3.10.0
Rasberry Pi 3 Raspbian

Any thoughts or ideas on this would be very welcome


#29

I am also having this “syntax error” for all downloads since 6/9/2018. I have Sonarr installed on a Pi 3 (Jessie) with Mono 3.10. I used Google to figure out the commands to update Mono, but it didn’t take after re-install (i did re-install to 4.2 I think, but still says 3.10). If anyone could perhaps let me know step-by-step (for newb) I would greatly appreciate it. Thank you


#30

I’m pretty sure the problem is you have two versions of mono installed and sonarr is using the old one, I have no idea how to fix it yet.

I am using FreeNAS 11.1 and installed sonar through the plugin menu. I never installed mono manually.

If I run pkg info mono in my sonarr jail I get told that there is no matching package matching mono. However if I run mono -V I get the version info for mono 3.10.0. So mono is there it just isn’t known to pkg.

I have no idea how to update this mono version though since it wasn’t installed through the pkg command.

Installing the new mono through the pkg command also doesn’t look like it will work as sonarr will still be using the old version of mono.

It seems from above it is possible to edit the sonarr startup config to use the updated pkg installed version of mono rather than the default 3.10.0 version. But that is beyond my freenas knowledge at the moment.

I am still hoping I can just update the 3.10.0 version it uses, but I have made 0% progress on that front.


#31

The solution was provided earlier, though depending on your system the steps are different:

A) Upgrade mono to 4.6+. If you are on a FreeNas system, pkg install mono will do the trick. Other systems should have similar procedures.

B) Tell Sonarr to use the new Mono installation. In a FreeNAS or other Linux system, the entry for it in rc.d (/usr/local/etc/rc.d/sonarr for a FreeNAS jail) change the procname to use the new install, i.e. procname="/usr/local/bin/mono"

Restart Sonarr or Jail/container it runs under, check the Sonaar systems page, and it will show the new version of Mono in use.

I had the exact same problem as described here with my FreeNAS 9.10U6 install of Sonarr in a jail and this fixed it immediately.


#32

I had the same problem with a raspberry.

You need to update from Jessie to stretch. Then update all packages. This gives you mono 4.6 and sonarr works again


#33

Thanks! I thought that was the way to fix it but wasn’t really sure. All working again now.


#35

I updated from Jessie to Stretch, however Mono version was still 3.10 (using ‘mono --version’ to check). I then followed the instructions to install Mono from their website. Still version 3.10. It looks like it installs the latest version, but the check doesn’t see it. I read the posts above which say that perhaps Sonarr is using its own copy, but the instructions and location for FreeNAS do not match my Pi.

I also changed DAEMON=$(which mono) to DAEMON=/usr/local/bin/mono in /etc/init.d/nzbdrone, but that did noting.

Any suggestions? Thank you very much!


#36

For those using the Sonarr plugin in FreeNas:

The location of the startup script where the procfile parameter is updated is

/usr/local/etc/rc.d/sonarr


#37

Obviously I am on freenas so I am not 100% sure.

Do you have the file /usr/local/etc/rc.d/sonarr with the procname value?


#38

I have no /rc.d/sonarr. I have /etc/mono though. I really don’t want to re-install and configure the entire Pi. But, maybe I need to look at tools for doing for. I do not understand what’s going on because, again, it looks like the new version of Mono installs, but Sonarr and --version don’t see it. I’ve searched Google for hours and days now. Is there a way I can point Sonarr to the right Mono location perhaps? Thanks so much again for helping out a newbie.


#39

You are on the right site. I used the same and it works.

I assume you got mono not from the normal raspbian repositories but from somewhere else ? From example installing a dpkg file ?
then i would suggest to completly remove this mono package:
sudo dpkg -r <package_name>

also check your /etc/apt/sources that it does not get mono from somewhere else than the raspbian repo:
more /etc/apt/sources.list
ls more /etc/apt/sources.list.d

then install it again using sudo apt-get install mono-complete

-> should give you mono 4.x
then follow the guide in the mono page to go to mono 5


#40

This worked for me! Much thanks for your contribution


#41

Thank you! Although, similar to zedfrx I didn’t have to do anything with sqlite3.


#42

It worked! Here’s what I did (I hope this helps others)…

Removed all custom entries/lines from sources.list

sudo nano /etc/apt/sources.list

Then

sudo apt-get update
sudo apt-get upgrade -y

Removed Mono

sudo dpkg -r mono

Installed Mono

sudo apt-get install mono-complete

However, version check…

mono --version

returns

-bash: /usr/local/bin/mono: No such file or directory

But, nonetheless, Sonarr works now! Thank you so much!


#43

Ok so I have this same issue but I cannot upgrade Mono on my NAS (old QNAP using ARM). Is there any other way to get round this?


#44

In case any one missed it, for the Mac you need to update your version of Mono.

http://www.mono-project.com/docs/getting-started/install/mac/

Install this, reboot… should be golden.


#45

I’m using FreeNas with Sonarr in it’s own jail.
It’s using it’s own 3.10 mono and for the life of me, I can’t get it to run using an updated version of mono.

I’ve tried the same mono update commands and it updates mono elsewhere in the jail, not the actual mono that sonarr is using.

This is the error I’m getting when I try to add a nzb (sending it to sabnzbd)
Syntax Error after ‘<!’ characters, http://www.newzbin.com/DTD/nzb/nzb-1.1.dtd Line 3, postition 4

If I check the mono version here (which I assume is what comes with sonarr)
/usr/pbi/sonarr-amd64/bin/mono -V
Mono JIT compiler version 3.10.0 (tarball Thu Feb 4 00:22:52 PST 2016)

–but I do have a newer version of mono here as well:
/usr/bin/mono -V
Mono JIT compiler version 5.2.0 (5.2.0.215 Thu Jun 7 01:30:19 UTC 2018)

In my /usr/local/etc/rc.d/sonarr
I have:
procname="/usr/pbi/sonarr-amd64/bin/mono"
I tried to update it to procname="/usr/bin/mono" and the service will no longer start.

I’m simply out of ideas and some of the “this worked for me” posts just don’t work for me.
I’ve restarted the jail after every change - nothing seems to work other than going back to my old 3.10 version and not using nzbs and that’s just not a good solution.
I didn’t change a thing after this has been running perfectly fine for months - why it would just break like this out of the blue is really puzzling to me.