Unable download from remote sabnzbd

Post any problems / bugs / issues that are Mylar-related in here.
Post Reply
roto
Posts: 4
Joined: Wed Aug 15, 2018 6:52 pm

Unable download from remote sabnzbd

Post by roto » Wed Aug 15, 2018 7:08 pm

I'm having trouble downloading from a seedbox instance of sabnzbd. I've got mylar behind a reverse proxy, so I have the hostname, base directory, and api key in the autoProcessComics.cfg. It appears that sabnzbd can reach mylar, because it's initiating an API call and mylar receives it. But after that, the logs go something like this (sanitized to hide my embarrassing reading):

Code: Select all

2018-08-15 14:00:18	ERROR	Uncaught exception: Traceback (most recent call last):
File "/opt/Mylar/mylar/logger.py", line 336, in new_run
old_run(*args, **kwargs)
File "/usr/lib/python2.7/threading.py", line 754, in run
self.__target(*self.__args, **self.__kwargs)
File "/opt/Mylar/mylar/PostProcessor.py", line 1254, in Process
self.nzb_or_oneoff_pp(tinfo=pp)
File "/opt/Mylar/mylar/PostProcessor.py", line 1670, in nzb_or_oneoff_pp
if dupthis['action'] == 'dupe_src' or dupthis['action'] == 'dupe_file':
TypeError: 'NoneType' object has no attribute '__getitem__'
2018-08-15 14:00:18	WARNING	[DUPECHECK] Make sure if you are using ComicRN, you do not have Completed Download Handling enabled (or vice-versa). Aborting
2018-08-15 14:00:18	WARNING	[DUPECHECK] File cannot be located in location specified. Something has moved or altered the name.
2018-08-15 14:00:18	INFO	[DUPECHECK] Duplicate check for ~/sabnzbd/complete/comics/ComicName
2018-08-15 14:00:18	INFO	[POST-PROCESSING] issuenzb found.
2018-08-15 14:00:18	INFO	[PPINFO-POST-PROCESSING-ATTEMPT] {'publisher': None, 'comicname': u'ComicName', 'issueid': u'111111', 'comiclocation': None, 'sarc': None, 'issuenumber': u'100', 'oneoff': None, 'comicid': u'11111'}
2018-08-15 14:00:18	INFO	Starting postprocessing for : ComicName
2018-08-15 14:00:18	INFO	ComicRN.py version: 1.01 -- autoProcessComics.py version: 2.04
2018-08-15 14:00:18	INFO	[API] Api Call from ComicRN detected - initiating script post-processing.
I've checked about a billion times and Completed Download Handling is not enabled (I couldn't get that to work either). The item is there on the server in the folder specified (~/sabnzbd/complete/comics).

I feel like I'm doing something wrong, rather than running into a bug, but I'm on dev branch version: 201d86ba4dd0deb694afce27fe5872831504ef4d in case that's relevant.

Incidentally, torrents are be working fine.

User avatar
evilhero
Site Admin
Posts: 2263
Joined: Sat Apr 20, 2013 3:43 pm
Contact:

Re: Unable download from remote sabnzbd

Post by evilhero » Wed Aug 15, 2018 7:34 pm

Is mylar running on the seedbox instance as well, or is it running on another machine?

It sounds like it's the last option, which would be problematic as mylar has no way to retrieve the file from your sabnzbd instance in order to post-process it. Normally the option labelled as "are mylar and sabnzbd on different machines" is used, however with the assumption that both are on the same network. The option allows for a directory mapping in which both machine have access to the given directory and thus can post-process from it after it's completed.

If the file could be retrieved prior to post-processing it would alleviate the problem, however that option is available for torrents only. There is a script/app called harpoon that you can run however, that might do it all for you - as sabnzbd was just added as a client. The caveat is that it's built for rtorrent clients only (it will monitor your remote rtorrent queue for completion after a snatch from mylar, download it to the machine running harpoon and then post-processes it against mylar).

Torrents work in your case as I'm assuming you're copying the file back down to your mylar instance after completion and then the folder monitor runs against it.

I could be off in my assumptions, but just trying to narrow things down based on the info provided.

roto
Posts: 4
Joined: Wed Aug 15, 2018 6:52 pm

Re: Unable download from remote sabnzbd

Post by roto » Wed Aug 15, 2018 8:42 pm

You're right in your assumptions. Mylar is on my home network, behind the reverse proxy, sabnzbd is on the seedbox, somewhere in the cloud.

I took a look at harpoon and it looks like it would meet my needs, but I'm wondering if it's overkill. Would it provide advantages over just setting up lftp on cron and downloading the comics to the post-processing folder (the same one the torrents go to)? The only issue I can see with that is that it might catch sabnzbd in the middle of a download or mylar in the middle of processing, but considering how small comic files are, that seems unlikely. I'm already running lftp to download stuff from the server nightly.

User avatar
evilhero
Site Admin
Posts: 2263
Joined: Sat Apr 20, 2013 3:43 pm
Contact:

Re: Unable download from remote sabnzbd

Post by evilhero » Wed Aug 15, 2018 9:07 pm

Harpoon is basically automated LFTP on crack for some, it definitely depends on personal workflow.

The only thing that harpoon does that is important (in this case) is that it only initiates the LFTP transfer on a completed download in the client, and does so immediately. It then uses the exact info from mylar (since it was snatched from there) and performs a direct post-processing run against that one specific snatch. In doing so, it doesn't have to scan your folder every X minutes to pick things up and/or possibly mistakingly parse incorrect information from the filename (since folder monitor relies on filename parsing only, it's usually pretty decent but it's not always accurate obviously).

Scheduling LFTP runs would work just as well, the only caveat being exactly what you mention. LFTP could start sending during a SAB download, so the file might be incomplete (which might not matter if you're using completed folders with sabnzbd). Mylar however will only post-process completed downloads in the given directory (it checks the timestamps every 10s, if it's changed since the last run it doesn't post-process it).

So basically yeah, LFTP scheduled jobs would probably work just fine especially since you already have lftp running for other items.

*a basic version of harpoon has been included in mylar for awhile, albeit just for torrent usage - but it was also the basis for what is now harpoon*

Post Reply