SynoCommunity / spksrc

Cross compilation framework to create native packages for the Synology's NAS
https://synocommunity.com
Other
3.04k stars 1.24k forks source link

Mono 4.6.2.7-8 crashes Sonarr #2558

Closed darebee closed 7 years ago

darebee commented 7 years ago

For new Package Requests, see the guidelines

Setup

_Package Name:_Mono _Package Version:_4.6.2.7-8

Sonarr Ver. 2.0.0.4230

_NAS Model:_DS1815+ _NAS Architecture:_Intel _DSM version:_DSM 6.0.2-8451 Update 6

Expected behavior

Tell us what should happen. Sonarr should not crash.

Actual behavior

Tell us what happens instead. Sonarr will start and try to get series and an error occurs:

Unable to set date of file [/volume1/data/Videos/TV.Shows/Amazing Race Canada, The/Season 4/The Amazing Race Canada - S04E10 - We're Doing It Wrong! We're In Big Trouble.mkv]: Access to the path "/volume1/data/Videos/TV.Shows/Amazing Race Canada, The/Season 4/The Amazing Race Canada - S04E10 - We're Doing It Wrong! We're In Big Trouble.mkv" is denied.

System.UnauthorizedAccessException: Access to the path "/volume1/data/Videos/TV.Shows/Amazing Race Canada, The/Season 4/The Amazing Race Canada - S04E10 - We're Doing It Wrong! We're In Big Trouble.mkv" is denied. at System.IO.File.SetLastWriteTime (System.String path, System.DateTime lastWriteTime) [0x00029] in /spksrc/native/mono/work-native/mono-4.6.2/mcs/class/corlib/System.IO/File.cs:496 at NzbDrone.Common.Disk.DiskProviderBase.FileSetLastWriteTime (System.String path, System.DateTime dateTime) [0x00048] in M:\BuildAgent\work\6c3239faf2b92630\src\NzbDrone.Common\Disk\DiskProviderBase.cs:250 at NzbDrone.Core.MediaFiles.UpdateEpisodeFileService.ChangeFileDateToLocalAirDate (System.String filePath, System.String fileDate, System.String fileTime) [0x0002b] in M:\BuildAgent\work\6c3239faf2b92630\src\NzbDrone.Core\MediaFiles\UpdateEpisodeFileService.cs:130 Close

Steps to reproduce

_1._Sonnar will be in Stopped state _2._Run Sonarr _3._within 90 seconds it will stop

Package log

Check Package Center or /usr/local/{package}/var/

I'm not sure how to access these logs be will gladly provide if someone explains how to get them. I tried WinSCP but can't get to /usr/ or /var/...

Insert the package log here

Other logs

E.g. /var/log/messages or /var/log/synopkg.log

Insert log here
Dr-Bean commented 7 years ago

That's a permissions issue, not really a crash.

Make sure the group sc-media has read/write permissions on /volume1/data/Videos/TV.Shows/. You can do that via File Manager, and it should look like this: rw

In addition, you'll also want to make sure that Sonarr can access the top-level directories (so data and Videos), and you do that by setting at least the traverse folders permission for both those directories (to be clear, if inheritance is turned on, which is the default setting, setting the permissions on data should be sufficient. The permission will apply to Videos automatically, you'll see a greyed-out sc-media group when you check those permissions)

traverse

darebee commented 7 years ago

Even though this didn't start until after the update to Mono?

Anyway, I uninstalled Mono and Sonarr (someone recommended I do this) but I can no longer see any SynoCommunity packages in the Package Center. What might I have messed up now?

Also, I don't see a File Manager . How do I launch it?

Dr-Bean commented 7 years ago

Sonarr doesn't necessarily care about Mono's version, as long as it's compatible (which, to be clear, is the point of the Mono 4.6 beta package). If Sonarr had proper permissions before, then updating Mono won't change a thing.

File Station is part of DSM, not File Manager...wrong name, apologies for the confusion. Should be available in the DSM GUI.

As for Package Center, no idea. Repository is still up and running. Tried a reboot?

Dr-Bean commented 7 years ago

...and then I noticed that you're on DSM6. Sonarr won't be able to run after reinstalling, because you're on DSM6. Our packages are not yet compatible with DSM6, we're in the process of fixing what has been broken.

darebee commented 7 years ago

Really? Since when? I've been on DSM 6.0 for quite a few months and it was all working until the Mono update on Monday...

Dr-Bean commented 7 years ago

Installation of packages on DSM5 + a subsequent upgrade to DSM6 is not an issue. The problem is with clean installations of packages that create users. Take a look at the open issues on this bugtracker tagged DSM6...

darebee commented 7 years ago

Damn, I wish I had read your post prior to someone suggesting I uninstall!!! So now I can't do anything with Sonarr until this is resolved? What if the users are created prior to the install?

mrchris76 commented 7 years ago

Having same issue, Sonarr stops after around 90secs. Checked (and reapplied) sc-media permissions to both media and download directories on my NAS. Hopefully someone can figure this out soon :(

I've also reinstalled Sonarr package and same thing happening so something has changed with a recent update. Has been working perfectly for ages.

JSLoz commented 7 years ago

Any updates on this? I can't get my Sonarr working again... I have checked all the permissions looks ok as some suggested..

mrchris76 commented 7 years ago

Is nobody else seeing this?

I'm running Sonarr version 2.0.0.3357 on DSM 5.2-5967 with Mono 4.6.2.7-8.

Sonarr still dies after 60-90 seconds. Permissions all look good still. I still think its the Mono update that caused this but no idea if I can roll back to a previous version.

Dr-Bean commented 7 years ago

Again, Mono 4.6 is a beta package. That's for a reason: beta packages can and will break, and we need to know if that happens before we add packages to the stable channel. If you're not ready for that, don't use beta packages. Downgrading is not possible. To go back to stable, you will need to uninstall Sonarr, uninstall Mono. Then before going forward, make sure you're on the stable channel (Package Center settings), then install in the opposite order. Note that on DSM6, Sonarr is still broken...as are almost all other packages. There's no resolution for that right now, things are in progress. Subscribe to #2216 if you want to keep informed.

With that out of the way, I can't reproduce it. Unless one of you can reproduce it with a clean setup, there's not much we can do.

mrchris76 commented 7 years ago

OK thank you, understood. I actually forgot I had enabled the Beta versions in the package center settings. I will remove and reinstall as suggested and also subscribe to #2216 to keep informed.

Many thanks for your help.

Dr-Bean commented 7 years ago

One other thing: if you do test on a clean setup, make sure Sonarr is updated to latest, via the built-in updater that Sonarr provides. If you're actually on 2.0.0.3357, then later updates might make a difference. Master is at 2.0.0.4427 if I'm not mistaken. With some luck, you might be able to update to latest before Sonarr crashes...

JSLoz commented 7 years ago

Ok some how I have manage to uninstall sonarr and mono and reinstalled with beta setting turned off. And got sonarr working again..

Now lucky I did backup my sonarr to my local machine.. just have to work out how to copy it back to system and restore it..

mrchris76 commented 7 years ago

All good now thanks, clean install and restored my old Sonarr config files. I'm up and running again! 👍

mrchris76 commented 7 years ago

JSLoz check this guide out to restore config:

https://github.com/Sonarr/Sonarr/wiki/Backup-and-Restore

JSLoz commented 7 years ago

@mrchris76 thanks..

JSLoz commented 7 years ago

Ok I am also 100% back in action..

Dr-Bean commented 7 years ago

What I'll do is release an update of the Sonarr package to the latest version...once I get to it. @mrchris76 indicated that he was on an outdated Sonarr version, and I know there have been fixes/additions wrt Mono 4.4 versions...not for 4.6 afaik though, but still. We don't regularly update the Sonarr package, because it has a built-in updater (via system, updates, somewhere in that neighbourhood). You can (and probably should) check on a regular basis if updates are available, if not for Mono compatibility, then for fixes and improvements to Sonarr itself.

JSLoz commented 7 years ago

Version 2.0.0.3357 Mono Version 3.10.0 (tarball Sat Mar 28 10:18:33 UTC 2015)

This is what I am running now..

Dr-Bean commented 7 years ago

Then you should check if Sonarr has updates available ;)

JSLoz commented 7 years ago

I'm too scared to touch anything on it now.. It's working for now.. :)

Dr-Bean commented 7 years ago

Well, you have a backup. And unless I'm very much mistaken, Sonarr creates a backup before upgrading.

JSLoz commented 7 years ago

Ok... Done!! You're a bad influence.. or good.. I'm not sure yet.. haha

JSLoz commented 7 years ago

Version 2.0.0.4427

mrchris76 commented 7 years ago

I am also now completely up to date. tbh I thought I had to wait for updated packages via Package Center wasn't sure if the in-built updater worked and was afraid to test :)

Dr-Bean commented 7 years ago

We would have disabled it completely if we weren't sure :) Maybe we should put a message in the install wizard, to inform people that they should check it out. How's that?

isalas16 commented 7 years ago

So I'm having the same issue with Sonarr and mono, I uninstall everything, I disabled beta version but now I cant see mono, if I click on install sonarr I get a message saying mono is missing :S is there somewhere I can download the old mono package before the beta?

martin-ericsson commented 7 years ago

This worked for me:

  1. Enable Beta-version in Synology package manager.
  2. Install Mono (4.6)
  3. Install Sonarr package, start Sonarr
  4. When Sonarr is started, go to the Sonarr UI and trigger the update to the latest version (2.0.0.4427)
  5. Stop Sonarr.
  6. Restore backup.
  7. Start Sonarr.

Ie, the latest Sonarr-release (not the one in the Synology-package though), seems to work with Mono 4.6

MarcoPescatore commented 7 years ago

@martin-ericsson This is what worked for me too! Thanks for sharing

isalas16 commented 7 years ago

AH! this appears to be working for me as well, I'm in the process of re-adding my library but so far Its been running for a couple of hours, before it wouldn't last 1 min.

darebee commented 7 years ago

How do you trigger this update to the lastest Sonarr via the UI? Will this help us DSM 6.0 folks too?

MarcoPescatore commented 7 years ago

Sonarr runs for about 30 seconds correct? In this time go to SYSTEM / UPDATES and click the green button beside "2.0.0.4427 - 10 Dec 2016" (see screen shot) I think the fist click downloaded the new version. Then you probably have to restart Sonarr again to get another 30 sec. Now click the button again to install. Done Good Luck

On Mon, Dec 19, 2016 at 8:28 PM, darebee notifications@github.com wrote:

How do you trigger this update to the lastest Sonarr via the UI? Will this help us DSM 6.0 folks too?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/SynoCommunity/spksrc/issues/2558#issuecomment-268055063, or mute the thread https://github.com/notifications/unsubscribe-auth/AXg_nPM2URK4P5b60HjN8ub6sq1rOE6fks5rJtrQgaJpZM4LNCse .

isalas16 commented 7 years ago

@darebee Im on DSM 6.0, when sonarr is installed go into Sonarr gui, click on the system menu, then updates sub menu, there should be button there to install the latest version.

darebee commented 7 years ago

Thanks everyone. I have Sonarr up and running and upgraded but if I do my restore of the settings I get the permissions problem again. I am in the process of importing Existing Series on Disk. Once this is all done I will make sure everything is working and respond back.

Okay, the restore of the Sonarr db and config did not work for me. However after the re-install and manual reconfigure I was able to Import Existing Series on Disk and I watched it fetch it's first update and all is working. Thanks to everyone for the patience and assistance.

isalas16 commented 7 years ago

Just to update, I re-added all my shows and sonarr has been running fine for over 8 hours downloading and managing files.

ujellyx commented 7 years ago

@martin-ericsson how does one restore the backup? I reinstalled mono and Sonarr and after the uninstallation my NAS also seems to have removed the backup files. I downloaded the .zip prior to that, so that's no problem (I do have the config.xml and nzbdrone.db on my harddrive), but i can't write into the backup-/database-folder with my admin-user. The folder's owner is "nzbdrone", so i guess i have to login to that user via SCP? What's the password? Am i missing something here?

darebee commented 7 years ago

ujellyx, if you log on using putty and the admin account you should be able to do sudo cp to copy. If prompted for password, it should be your admin password again... It worked for me.

ujellyx commented 7 years ago

@darebee didn't work for me unfortunately... i always get permission denied errors, because the folder is owned by a user called "nzbdrone" and i can't write into it even with root-permissions...

UkeHa commented 7 years ago

Running the update as well as setting the sc-media permissions fixed the problem for me (after the update it worked again)

schumi2004 commented 7 years ago

Sonarr runs just fine here except i can't access the GUI, error 500. Is this related?

Dr-Bean commented 7 years ago

@schumi2004 Without any further details/info/logging, I'm going to say "No".

Dr-Bean commented 7 years ago

I've published a new version of the Sonarr package, updating it to latest as of now (2.0.0.4472). This should solve issues where an outdated version of Sonarr would have compatibility issues with Mono 4.6.

schumi2004 commented 7 years ago

@Dr-Bean, Compiled it last night and works perfect.

Dr-Bean commented 7 years ago

@schumi2004 You mean you compiled the updated Sonarr package? Cool, thanks for the info. FYI then, I have made some minor corrections to it. I'll push it in a few minutes.

Carpo31 commented 7 years ago

My synology updated sonarr to version 20170106-9 and now has stopped working, tried uninstalling and reinstalling and still no luck.

Uninstalled both mono versions (synocomm one and synology one) and reinstalled and tried but still sonarr won't start

gotson commented 7 years ago

the new version of Sonarr doesn't start for me. It seems it's using the SynoCommunity Mono (4.6.2.7-8 located in /usr/local/mono/bin). Actually when i try to do a ./mono -V in Mono's folder, i get a segfault.

The mono from Synology (4.2.1 located in /bin/mono) is working fine. I changed the start-stop-status script to use the Synology Mono instead of the SynoCommunity one, now it works.

schumi2004 commented 7 years ago

@Dr-Bean, yes compiled your updated version. I saw your update but i don't think i need them for now. I'll wait until it gets updated in official repo ;)

Dr-Bean commented 7 years ago

@schumi2004 It's already part of the current package, I published the package before I pushed the updates to the repo. But, as you say, there's no big changes, so just FYI.

@ other commenters:

evtk commented 7 years ago

EDIT: ah never mind, it worked after rebooting the synobox. Second configuration works.

@gotson can you share your configuration? I have problems running sonarr since the last update, and believe it is connected to mono. So far I have tried:

MONO_PATH="/var/packages/Mono/target/usr/bin" MONO="${MONO_PATH}/mono"

MONO_PATH="/bin" MONO="${MONO_PATH}/mono"

But Sonarr won't start. Is there anyway to get some logging on this, to see what is going wrong?

thankls