Failed download handling issue from Sonarr

Get help with all aspects of SABnzbd
Forum rules
Help us help you:
  • Are you using the latest stable version of SABnzbd? Downloads page.
  • Tell us what system you run SABnzbd on.
  • Adhere to the forum rules.
  • Do you experience problems during downloading?
    Check your connection in Status and Interface settings window.
    Use Test Server in Config > Servers.
    We will probably ask you to do a test using only basic settings.
  • Do you experience problems during repair or unpacking?
    Enable +Debug logging in the Status and Interface settings window and share the relevant parts of the log here using [ code ] sections.
User avatar
shypike
Administrator
Administrator
Posts: 19774
Joined: January 18th, 2008, 12:49 pm

Re: Failed download handling issue from Sonarr

Post by shypike »

SABnzbd only removes items from the temp download folder.
All jobs start in the temp folder, never in a category folder.
If you get the error, is the item gone?
kevindd992002
Full Member
Full Member
Posts: 211
Joined: October 31st, 2012, 9:35 pm

Re: Failed download handling issue from Sonarr

Post by kevindd992002 »

If that's the case, at what point does SABnzbd use the folder path set in the TV category?

I don't see any files/folders under the temp folder. This is expected as the download was "aborted" before even beginning so no files were downloaded. The problem is why was it not removed in SAB's history when Sonarr specifically requested it to be removed there?

Is the default logging level of Sab set to "errors/warning" only?
User avatar
shypike
Administrator
Administrator
Posts: 19774
Joined: January 18th, 2008, 12:49 pm

Re: Failed download handling issue from Sonarr

Post by shypike »

The default logging is Info.
The category folder is the final destination of a job.
While the job still consists of just RAR and par files, it uses the temp folder.
Unpacking goes from the temp folder to the category folder.
The latter is where Sonarr expects the end result.
It's likely that Sonarr is too quick when trying to delete a failed job.
Or SABnzbd contains some error in handling the delete request.
kevindd992002
Full Member
Full Member
Posts: 211
Joined: October 31st, 2012, 9:35 pm

Re: Failed download handling issue from Sonarr

Post by kevindd992002 »

But I've tried this twice and it eneded up in the same result. Sonarr being too quick to delete the failed job seems to be unlikely given the two failed tests, right? How would we know the error that SABnzbd has in handling the delete request?

So the info event below is just normal?

2016-03-30 08:08:28,153::INFO::[misc:1283] Cannot remove folder \?\D:\raw\Default\Scorpion.S02E21.1080p.HDTV.X264-DIMENSION-Obfuscate__ADMIN__
User avatar
shypike
Administrator
Administrator
Posts: 19774
Joined: January 18th, 2008, 12:49 pm

Re: Failed download handling issue from Sonarr

Post by shypike »

We're already looking for a race-condition in SABnzbd code.
The same error may happen in other situations.
We just haven't found the root cause yet :(
kevindd992002
Full Member
Full Member
Posts: 211
Joined: October 31st, 2012, 9:35 pm

Re: Failed download handling issue from Sonarr

Post by kevindd992002 »

Ok.

You said that Sab only deletes file from the temp download folder. Is that why the "remove nzb and delete files" (in the old skin) button in the old skin is greyed out when a download has a category and it post process it to the category folder path afterwards? So in that case, that button is only clickable if a download fails and stays at the temp download folder?

What's the reasoning behind this? Why can't Sab delete files in the destination folder when you instruct it to delete it from the History? I mean it's not like it doesn't know where the files are. It has a record of wherever the files were extracted to.
User avatar
shypike
Administrator
Administrator
Posts: 19774
Joined: January 18th, 2008, 12:49 pm

Re: Failed download handling issue from Sonarr

Post by shypike »

SABnzbd never attempts to delete files and folders in the "complete" section.
That's because user scripts and software like Sonarr may have moved files around.
We don't want to mess with your media collection.

There are two kinds of jobs in the history queue.
Downloaded jobs that are waiting to be processed and jobs that are finished.
kevindd992002
Full Member
Full Member
Posts: 211
Joined: October 31st, 2012, 9:35 pm

Re: Failed download handling issue from Sonarr

Post by kevindd992002 »

Ok. But if Sonarr is the one requesting that the files should be deleted, Sab should be able to do so, right? A specific issue that we are troubleshooting in the Sonarr forum is when a sample release is downloaded I have to manually delete it in Sonarr's queue. Sonarr in turn will tell Sab to delete it from its History together with the files. What happens is that yes it gets deleted from Sab's history but the sample files remain because of this limit.

Is there anyway to set Sab to delete the files only if Sonarr requests it?
User avatar
shypike
Administrator
Administrator
Posts: 19774
Joined: January 18th, 2008, 12:49 pm

Re: Failed download handling issue from Sonarr

Post by shypike »

kevindd992002 wrote: Is there anyway to set Sab to delete the files only if Sonarr requests it?
The "delete" API call has a parameter that specifies whether files should be deleted or not.
However, it's likely that there is some kind of bug in SABnzbd that makes
the delete fail some times. We're looking into that.
kevindd992002
Full Member
Full Member
Posts: 211
Joined: October 31st, 2012, 9:35 pm

Re: Failed download handling issue from Sonarr

Post by kevindd992002 »

Yes, Sonarr does include that API call. So this is already existing then but just has a bug.
kevindd992002
Full Member
Full Member
Posts: 211
Joined: October 31st, 2012, 9:35 pm

Re: Failed download handling issue from Sonarr

Post by kevindd992002 »

The delete issue fails ALL the time for me. I've recreated it several times already. Any clues on this?
kevindd992002
Full Member
Full Member
Posts: 211
Joined: October 31st, 2012, 9:35 pm

Re: Failed download handling issue from Sonarr

Post by kevindd992002 »

BUMP!
User avatar
shypike
Administrator
Administrator
Posts: 19774
Joined: January 18th, 2008, 12:49 pm

Re: Failed download handling issue from Sonarr

Post by shypike »

Give us time to find this.
kevindd992002
Full Member
Full Member
Posts: 211
Joined: October 31st, 2012, 9:35 pm

Re: Failed download handling issue from Sonarr

Post by kevindd992002 »

shypike wrote:Give us time to find this.
Yeah, no problem. I just wanted to make sure that you were able to read my last message.

Thanks!
User avatar
shypike
Administrator
Administrator
Posts: 19774
Joined: January 18th, 2008, 12:49 pm

Re: Failed download handling issue from Sonarr

Post by shypike »

We can reproduce it and are close to the solution.
Post Reply