SABnzbd deleting files from history before Sonarr/Radarr/etc., can pick them up

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.
Post Reply
Eternity8701
Newbie
Newbie
Posts: 4
Joined: November 26th, 2023, 11:20 am

SABnzbd deleting files from history before Sonarr/Radarr/etc., can pick them up

Post by Eternity8701 »

I'm running in Docker (really k3s, but same thing as far as support goes), everything works fine except for this one issue.

Once files are downloaded they are successfully moved by sab to /data/usenet/complete, but then they get immediately removed from sab's history, which is causing *arr apps to now be able to import them into my media folder. config > switches > post processing > history retention = keep all jobs. I do not have sorting on. I have .nzb files saved into a .nzb backup folder. This issue happens when an NZB is added from any source, including manually.
User avatar
safihre
Administrator
Administrator
Posts: 5513
Joined: April 30th, 2015, 7:35 am
Contact:

Re: SABnzbd deleting files from history before Sonarr/Radarr/etc., can pick them up

Post by safihre »

Sabnzbd isn't removing them, it's the Arr apps that are doing that..
You can enable Debug logging in the Status window and then after it happens again click Show Logging, then you can see exactly who requested the deletion.
If you like our support, check our special newsserver deal or donate at: https://sabnzbd.org/donate
Eternity8701
Newbie
Newbie
Posts: 4
Joined: November 26th, 2023, 11:20 am

Re: SABnzbd deleting files from history before Sonarr/Radarr/etc., can pick them up

Post by Eternity8701 »

This issue happens even when sabznbd is the only container running, no sonarr/radarr/any*arr. I'm pretty sure the issue is with the history1 db file in /config/admin. I've tried stopping sabnzbd and starting with an empty /config dir, so it initializes it's files, but then I get an error regarding the history:

2023-11-26 12:49:35,711::ERROR::[database:152] SQL Command Failed, see log
2023-11-26 12:49:35,713::INFO::[database:153] SQL: SELECT * FROM history WHERE name LIKE ? ORDER BY completed desc LIMIT ?, ?
2023-11-26 12:49:35,715::INFO::[database:154] Arguments: ['%%', 0, 1000000]
2023-11-26 12:49:35,717::INFO::[database:155] Traceback:
Traceback (most recent call last):
File "/app/sabnzbd/sabnzbd/database py", line 125, in execute
self.cursor.execute(command, args)
sqlite3.OperationalError: no such table: history


My history is already screwed up, is there some other way to get a working history db? I'm not sure why the one it makes itself would have this issue, but I must be missing something.

I had to replace . with a space in errors above since I'm a new user on the forum and it's interpreting that as a link
User avatar
safihre
Administrator
Administrator
Posts: 5513
Joined: April 30th, 2015, 7:35 am
Contact:

Re: SABnzbd deleting files from history before Sonarr/Radarr/etc., can pick them up

Post by safihre »

You need to make sure SABnzbd is really shutdown, the error above seems to indicate you deleted the file without it being shutdown.
Then just delete the history dB file.

Just make sure to enable Debug logging so you can see what is deleting the job.
If you like our support, check our special newsserver deal or donate at: https://sabnzbd.org/donate
Eternity8701
Newbie
Newbie
Posts: 4
Joined: November 26th, 2023, 11:20 am

Re: SABnzbd deleting files from history before Sonarr/Radarr/etc., can pick them up

Post by Eternity8701 »

It definitely was shutdown because it was a new container, I just did it again with a new container and entirely new directory mounted for /config, and nothing has the new API key so nothing would be able to request a removal. Here are the logs from it, I downloaded the 100MB test file. It didn't move the file but I'm guessing that's because of the SQL error?

I doubt you feel like looking at logs, but if you do then here are the logs from the entire bootup showing no files present and creating them, and running into the SQL error, and a bunch of API complaints since nothing can get to it:
https://pastebin(dot)com/kdd6wK0r


I've tried this with completely new directories so everything is initialized by sab, but every time I get the SQL error with no such table: history
User avatar
safihre
Administrator
Administrator
Posts: 5513
Joined: April 30th, 2015, 7:35 am
Contact:

Re: SABnzbd deleting files from history before Sonarr/Radarr/etc., can pick them up

Post by safihre »

The logs are a bit confusing to me, especially for a clean install. Seems problems with other Admin files like the bpsmeter (data counters) that mess up the whole startup.
Can you just start with a clean config directory and only copy your sabnzbd.ini?
Or even don't copy the sabnzbd.ini
If you like our support, check our special newsserver deal or donate at: https://sabnzbd.org/donate
Eternity8701
Newbie
Newbie
Posts: 4
Joined: November 26th, 2023, 11:20 am

Re: SABnzbd deleting files from history before Sonarr/Radarr/etc., can pick them up

Post by Eternity8701 »

Hey it's working now! I had tried clean config directories a few times, but always over the same network share. This time I just mounted /config directly to my k3s host and it worked. Either an issue with network shares in general, or an issue with just mine. I have an actual NAS coming so hopefully it is just an issue with mine and not network shares in general. Thank you for your help!
User avatar
safihre
Administrator
Administrator
Posts: 5513
Joined: April 30th, 2015, 7:35 am
Contact:

Re: SABnzbd deleting files from history before Sonarr/Radarr/etc., can pick them up

Post by safihre »

Hope the issues are resolved!
If you like our support, check our special newsserver deal or donate at: https://sabnzbd.org/donate
Post Reply