All failed downloads go to orphaned?

Report & discuss bugs found in 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.
Post Reply
duble08
Newbie
Newbie
Posts: 5
Joined: April 19th, 2019, 12:05 am

All failed downloads go to orphaned?

Post by duble08 »

I've searched the internet and these forums for a solution to this problem, and haven't found anything relevant to whats happening to me. If a solution was already posted, I apologize in advance for asking it again...

Basic info:
OS - Windows Server 2012 x64
Sabnzbd Ver.: 2.3.8 x64

Issue:
Sonarr/Radarr/Lidarr sends an NZB to Sabnzbd, the download fails and then gets placed in "orphaned". This causes the files to hog up storage space until manually removed from "orphaned", and causes Sonarr/Radarr/Lidarr to not detect the download as failed, thus preventing it from blacklisting bad downloads and trying alternatives.

When/How it started:
I had a power outage at my house during a blizzard and it seemed to corrupt my Sabnzbd installation. I had to uninstall Sabnzbd, remove residual files, then reinstall Sabnzbd and reconfigure all the automation with the new API's as well as categories and download locations. Everything tests fine, and when downloads are good and complete, everything goes where it's supposed to, the "completed download handling" works as it should, and everything is gravy! Unfortunately, failed downloads no longer work as they used to. I'm used to seeing a failed download remain in history until sonarr/radarr/lidarr detects it as failed, which they then clear from Sabnzbd history, delete the incomplete download and attempt a new NZB. This is no longer happening as it should, and is now acting as outlined above.

Solutions I've tried / Checked for:
- Reinstalling Sabnzbd
- Updating Sabnzbd (I was using an older version before the power outage and tried using the same version after the outage but had the same issue - tried updating to resolve)
- checking if "Download all par2 files" was enabled (I read this can cause the issue - this feature was never enabled on my configuration. I enabled and disabled it just to see if I could refresh the setting. Didn't fix the problem with it turned on or off)
- Read for Linux setups it can be a permissions issue. With me running Windows, I don't see an option in Sabnzbd Config to change permissions settings. However, I did go to the temp download folder as well as completed downloads folders, changed the security settings to allow all users (administrator, current user, and even added "Everyone") full permission of read, write, modify and execute.
- Ran CCleaner to check for registry faults involving Sabnzbd. No resolution.

I've been using Sabnzbd for years now (I think since around version 0.7?). I used to use it with CouchPotato and Sickbeard in the beginning, and eventually moved on to using it with Sonnar, Radarr and Lidarr. I've never had issues with it until recently. I've used it in the past in both Linux and Windows environments without issues. I'm more than happy to send or post logs if needed.

Thanks in advance to anyone that can help!
User avatar
safihre
Administrator
Administrator
Posts: 5357
Joined: April 30th, 2015, 7:35 am
Contact:

Re: All failed downloads go to orphaned?

Post by safihre »

Seems good to inspect the logs!
In the Status and Interface settings window you should switch Logging to +Debug.
Then after it happens again, click Show Logging.
There should be a line that says "Failed to remove folder".

It can still be a permissions error, especially on Windows Server there are permissions and checks to make sure there's no malicious activity. We've seen it mess things up before :)
If you like our support, check our special newsserver deal or donate at: https://sabnzbd.org/donate
duble08
Newbie
Newbie
Posts: 5
Joined: April 19th, 2019, 12:05 am

Re: All failed downloads go to orphaned?

Post by duble08 »

Thanks for the reply. Looking through the logs, this is the closest thing I could find to what you've told me to look for:

2019-04-19 14:30:19,176::DEBUG::[misc:1162] [sabnzbd\nzbstuff.pyo.purge_data] Deleting dir \\?\C:\Temp Download\NZB\billions.s01e01.720p.bluray.x264.1-demand-Obf
2019-04-19 14:30:19,176::DEBUG::[nzbstuff:1786] Folder not removed: \\?\C:\Temp Download\NZB\billions.s01e01.720p.bluray.x264.1-demand-Obf
2019-04-19 14:30:19,240::INFO::[database:272] Added job billions.s01e01.720p.bluray.x264.1-demand-Obfuscated to history
2019-04-19 14:30:19,240::INFO::[database:261] Removing all but last 100 completed jobs from history

Is this a permissions issue? It doesn't say "failed to remove folder", but it does say "folder not removed"....
duble08
Newbie
Newbie
Posts: 5
Joined: April 19th, 2019, 12:05 am

Re: All failed downloads go to orphaned?

Post by duble08 »

Also, for the record, in Windows security settings, as mentioned above, I have already set permission in the temp download folder as well as completed downloads folders to allow Read, Write, Execute and modify permissions to the Administrator (logged in user running Sabnzbd), Users group, Administrator Group, and even "Everybody" (which usually fixes any permissions issues at the cost of security).

Another thing to note, is when a download completes successfully, Sabnzbd successfully moves the entire contents to the proper "completed" location leaving no residual files behind in the temp folder. Sonarr/Radarr/Lidarr can successfully move the files to the correct destination afterward, and cleans up residual files as it should.

The only issue is specifically with failed downloads for some reason...
User avatar
safihre
Administrator
Administrator
Posts: 5357
Joined: April 30th, 2015, 7:35 am
Contact:

Re: All failed downloads go to orphaned?

Post by safihre »

Ooooh, you have enabled "Keep maximum number of completed jobs = Specify exact amount of jobs to keep, removing the oldest ones."
So it removes all completed jobs above a 100 and also deleted all failed jobs. Only deletes them from history, but not from disk.
You should not use that in combination with Sonarr/Radarr.

Thinking about it, it's maybe a bit strange.. Why was this designed to only keep 100 completed jobs and remove failed ones directly.. Would maybe be more usefull to keep any 100 jobs.
If you like our support, check our special newsserver deal or donate at: https://sabnzbd.org/donate
User avatar
safihre
Administrator
Administrator
Posts: 5357
Joined: April 30th, 2015, 7:35 am
Contact:

Re: All failed downloads go to orphaned?

Post by safihre »

Will fix the behavior to be limited to not remove failed jobs.
If you like our support, check our special newsserver deal or donate at: https://sabnzbd.org/donate
duble08
Newbie
Newbie
Posts: 5
Joined: April 19th, 2019, 12:05 am

Re: All failed downloads go to orphaned?

Post by duble08 »

Seems like you were right on the money about the cause!

I misunderstood what that option was for. I had it enabled to try to reduce having an extremely long history log. I thought it would only remove history items (regardless of failed or completed) that were older than the last 100 items. In other words, I figured failed downloads would stay in history until either cleared by Radarr/Sonarr/Lidarr, cleared manually, or when it passed the 100 items mark.

With the setting on "keep all jobs" Everything seems to be working as it should now.

Thanks again!
User avatar
safihre
Administrator
Administrator
Posts: 5357
Joined: April 30th, 2015, 7:35 am
Contact:

Re: All failed downloads go to orphaned?

Post by safihre »

I patched the function, so for the next release it will do what you expect and not mess up failed downloads :)
If you like our support, check our special newsserver deal or donate at: https://sabnzbd.org/donate
duble08
Newbie
Newbie
Posts: 5
Joined: April 19th, 2019, 12:05 am

Re: All failed downloads go to orphaned?

Post by duble08 »

You're awesome! I look forward to trying the new version with that patch! Thanks again! :)
Post Reply