[Synology] No longer processing after download completes

Post any problems / bugs / issues that are Mylar-related in here.
Post Reply
User avatar
deflection
Posts: 2
Joined: Sun Mar 04, 2018 1:58 pm

[Synology] No longer processing after download completes

Post by deflection »

I have noticed of late that I got Mylar notifications of comics being grabbed and sent off to SabNZB without the corresponding download complete notifications a bit later. I finally got around to investigating and noticed that the last one that went ok is a long time ago: 2017-11-26

Build: Master, 9c65a0d37a0723291280f8425a92253637f3acfb
OS: Synology DSM 5. I run on Python 2.7.9 (maybe 2.7.13, not totally sure atm)
Problem: After a download completes in SabNZB the postprocessing script ComicRN.py hangs in SabNZB, pausing all further downloads (what got me onto this error in the first place) in my queue (not just comics). ComicRN runs version 1.0 (still, not sure why, should search in my submitted github issues maybe for the reason). The Mylar log gives me this:

Code: Select all

2018-03-04 14:06:33	ERROR	Uncaught exception: Traceback (most recent call last):
File "/volume1/@appstore/mylar/share/mylar/mylar/logger.py", line 177, in new_run
old_run(*args, **kwargs)
File "/usr/local/python/lib/python2.7/threading.py", line 754, in run
self.__target(*self.__args, **self.__kwargs)
File "/volume1/@appstore/mylar/share/mylar/mylar/PostProcessor.py", line 1124, in Process
self.nzb_or_oneoff_pp(tinfo=pp)
File "/volume1/@appstore/mylar/share/mylar/mylar/PostProcessor.py", line 1732, in nzb_or_oneoff_pp
dupthis = helpers.duplicate_filecheck(self.nzb_folder, ComicID=comicid, IssueID=issueid)
File "/volume1/@appstore/mylar/share/mylar/mylar/helpers.py", line 2064, in duplicate_filecheck
filesz = os.path.getsize(filename)
File "/usr/local/mylar/env/lib/python2.7/genericpath.py", line 57, in getsize
return os.stat(filename).st_size
OSError: [Errno 13] Permission denied: '/volume1/downloads/complete/Comics/Paper.Girls.020.2018.Digital-Empire.1'
2018-03-04 14:06:33	INFO	[DUPECHECK] Duplicate check for /volume1/downloads/complete/Comics/Paper.Girls.020.2018.Digital-Empire.1
2018-03-04 14:06:33	INFO	[POST-PROCESSING] issuenzb found.
2018-03-04 14:06:33	INFO	[PPINFO-POST-PROCESSING-ATTEMPT] {'publisher': None, 'comicname': u'Paper Girls', 'issueid': u'658771', 'comiclocation': None, 'sarc': None, 'issuenumber': u'20', 'oneoff': None, 'comicid': u'85128'}
2018-03-04 14:06:33	INFO	Starting postprocessing for : Paper.Girls.020.2018.Digital-Empire
2018-03-04 14:06:33	WARNING	Your ComicRN.py script should be v1.01, but is v1.0 and is out of date. Things may still work - but you are taking your chances.
It seems to be the case the Python module OSError throws an exception on the download path being inaccessible to the postprocessor thread running.
I have thought maybe something has changed in any number of things on my Synology installation, so I have made sure the path /volume1/downloads/complete/Comics is owned by the system user 'mylar' (including all subfolders). So far no avail, and to be honest I have been out of fiddling around with the Synology for quite some time since it ran smoothly so no clue where to look next.

Further log section in SabNZB is not very informative either, except that it obviously doesn't get a callback so 'hangs' the system:

Code: Select all

2018-03-04 14:06:30,845::INFO::[postproc:307] Starting Post-Processing on Paper.Girls.020.2018.Digital-Empire => Repair:True, Unpack:True, Delete:True, Script:ComicRN.py, Cat:comics
2018-03-04 14:06:30,918::INFO::[newsunpack:173] Running external script /usr/local/sabnzbd/var/scripts/ComicRN.py(/volume1/downloads/complete/Comics/Paper.Girls.020.2018.Digital-Empire.1, Paper.Girls.020.2018.Digital-Empire.nzb, Paper.Girls.020.2018.Digital-Empire, , comics, alt.binaries.comics.dcp, 0, )
User avatar
evilhero
Site Admin
Posts: 2883
Joined: Sat Apr 20, 2013 3:43 pm
Contact:

Re: [Synology] No longer processing after download completes

Post by evilhero »

I think your sabnzbd downloads are being set from your sabnzbd user. So the downloads directory where it's downloading to is being assigned rights from the sabnzbd user. Since the Mylar user is different, it doesn't have the proper permissions to even do a simple size check against the given file.

Is the user running Mylar in the same group as the SABnzbd user and is that group set as the default group for that particular download folder ?

I don't think this applies, but if you have Completed Download Handling enabled within Mylar, you can't have the ComicRN script running too - it's either one or the other, or else you'll get multiple pp runs against the same file & location within seconds of each other, which will result in a hung ComicRN / error.
User avatar
deflection
Posts: 2
Joined: Sun Mar 04, 2018 1:58 pm

Re: [Synology] No longer processing after download completes

Post by deflection »

Thanks for your reaction. Somehow this seemed to have been a permissions issue indeed. I believe through a totally unrelated update (Transmission) on my Synology having a new user/groups rights structure to fix some issues, some of my paths/folders were reassigned rights.

I have since added both Sab and Mylar users in this new usergroup and presto, everything worked again like a breeze.

It's true I let SAB handle the file with the ComicRN script. I have no experience with the newer function of Completed Downloading Handling in Mylar. Which one would you suggest using, given my system?
User avatar
evilhero
Site Admin
Posts: 2883
Joined: Sat Apr 20, 2013 3:43 pm
Contact:

Re: [Synology] No longer processing after download completes

Post by evilhero »

It's entirely up to you - some individuals would rather not rely on scripts but let the download be monitored from within Mylar. Others, don't want to break what isn't broken in regards to post-processing, and if it currently works fine, then why change it?

It's more of a preference - the comicRN script addition isn't going anywhere, so it will always be supported as an option for the downloader to use regardless. In the future however, it might not allow for certain things that might only be available if the download were to be monitored (there isn't any atm, but you know - just had to say it anyways)
Post Reply