articles download but fail unpacking from a single indexer.

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
fuminshou
Newbie
Newbie
Posts: 9
Joined: February 1st, 2023, 10:22 pm

articles download but fail unpacking from a single indexer.

Post by fuminshou »

Hello,

I've got an issue I'm hoping is just something silly that I'm missing. I have one indexer with which each article I grab from them ends up in the completed folder renamed as _FAILED_ because of an unpacking error. According to logs "7za return code: 2" appears to be part of the issue.

My current set up is a truenas jail for sabnzbd on version 3.7.1 with sonarr on the latest build in a docker container on an ubuntu server vm. Other indexers work as far as I can tell without issue.

I've also tested this same indexer on macos with sabnzbd 3.7.1 and sonarr local and it works but if I send it from my macos sonarr to my truenas jail it will fail again.

Here are the debug logs, I sanitized the article name for brevity sake. The [sab<USERNAME>d] parts are weird as well, when the jail was initially set up I named the user nzb so I think that is a artifact from that, but thats just a guess. Please let me know if any more information is needed. Thanks in advance!

Code: Select all

2023-02-01 22:11:42,337::INFO::[newsunpack:304] 7za starting on /mnt/incomplete/Am
2023-02-01 22:11:42,337::INFO::[newsunpack:979] Starting extract on 7zip set/file: Ry3dM8.7z 
2023-02-01 22:11:42,337::INFO::[misc:806] Found a password that was set by the user: 74744567bnbnvbnb
2023-02-01 22:11:42,338::INFO::[misc:817] Read 1 passwords from meta data in NZB: ['74744567bnbnvbnb']
2023-02-01 22:11:42,338::DEBUG::[newsunpack:1019] Trying 7zip with password "74744567bnbnvbnb"
2023-02-01 22:11:42,339::INFO::[misc:1166] [sab<USERNAME>d.newsunpack.seven_extract_core] Running external command: ['/usr/local/bin/7zz', 'x', '-y', '-aou', '-ssc', '-p74744567bnbnvbnb', '-o/mnt/complete/tvshows/_UNPACK_Am', '/mnt/incomplete/Am']
2023-02-01 22:11:45,602::DEBUG::[newsunpack:1060] 7za output: 
7-Zip (z) 22.01 (x64) : Copyright (c) 1999-2022 Igor Pavlov : 2022-07-15
 64-bit locale=en_US.UTF-8 Threads:24

Scanning the drive for archives:
1 file, 52428800 bytes (50 MiB)

Extracting archive: /mnt/incomplete/Am
--
Path = /mnt/incomplete/Am
Type = Split
Physical Size = 52428800
Volumes = 14
Total Physical Size = 696753610
----
Path = Ry3dM8.7z
Size = 696753610
--
Path = Ry3dM8.7z
Type = 7z
Physical Size = 696753610
Headers Size = 330
Method = Copy 7zAES
Solid = -
Blocks = 1

ERROR: Cannot set file attribute : errno=1 : Operation not permitted : /mnt/complete/tvshows/_UNPACK_Am
ERROR: Cannot set file attribute : errno=1 : Operation not permitted : /mnt/complete/tvshows/_UNPACK_Am

Sub items Errors: 2

Archives with Errors: 1

Sub items Errors: 2

2023-02-01 22:11:45,603::INFO::[newsunpack:1083] 7za return code: 2
2023-02-01 22:11:45,604::INFO::[misc:1166] [sab<USERNAME>d.newsunpack.seven_extract_core] Running external command: ['/usr/local/bin/7zz', 'x', '-y', '-aou', '-ssc', '-p', '-o/mnt/complete/tvshows/_UNPACK_Am', '/mnt/incomplete/Am']
2023-02-01 22:11:45,605::DEBUG::[misc:1167] Popen arguments: {'stdin': -1, 'stdout': -1, 'stderr': -2, 'startupinfo': None, 'creationflags': 0}
2023-02-01 22:11:45,986::DEBUG::[newsunpack:1060] 7za output: 
7-Zip (z) 22.01 (x64) : Copyright (c) 1999-2022 Igor Pavlov : 2022-07-15
 64-bit locale=en_US.UTF-8 Threads:24

Scanning the drive for archives:
1 file, 52428800 bytes (50 MiB)

Extracting archive: /mnt/incomplete/Am
ERROR: /mnt/incomplete/Am
Cannot open encrypted archive. Wrong password?


Can't open as archive: 1
Files: 0
Size:       0
Compressed: 0

2023-02-01 22:11:45,987::INFO::[newsunpack:1083] 7za return code: 2
2023-02-01 22:11:45,988::INFO::[newsunpack:308] 7za finished on /mnt/incomplete/Am
2023-02-01 22:11:45,988::INFO::[postproc:430] Unpacked files []
2023-02-01 22:11:45,989::INFO::[filesystem:319] Checking if any resulting filenames need to be sanitized
2023-02-01 22:11:45,989::INFO::[postproc:434] Finished unpack_magic on Am
2023-02-01 22:11:45,990::DEBUG::[filesystem:604] Applying permissions 0o100660 (octal) to /mnt/complete/tvshows/_UNPACK_Am
2023-02-01 22:11:45,990::DEBUG::[filesystem:611] Could not change permissions of /mnt/complete/tvshows/_UNPACK_Am
2023-02-01 22:11:45,991::INFO::[postproc:1193] Collapsing /mnt/complete/tvshows/_FAILED_Am
2023-02-01 22:11:45,992::DEBUG::[filesystem:866] Renaming "/mnt/complete/tvshows/_UNPACK_Am" to "/mnt/complete/tvshows/_FAILED_Am"
2023-02-01 22:11:45,993::DEBUG::[filesystem:909] [sab<USERNAME>d.postproc.rename_and_collapse_folder] Removing dir /mnt/complete/tvshows/_UNPACK_Am
User avatar
sander
Release Testers
Release Testers
Posts: 8812
Joined: January 22nd, 2008, 2:22 pm

Re: articles download but fail unpacking from a single indexer.

Post by sander »

Two (related or unrelated) relevant snippets:

Code: Select all

2023-02-01 22:11:42,338::INFO::[misc:817] Read 1 passwords from meta data in NZB: ['74744567bnbnvbnb']
2023-02-01 22:11:42,338::DEBUG::[newsunpack:1019] Trying 7zip with password "74744567bnbnvbnb"
Running external command: ['/usr/local/bin/7zz', 'x', '-y', '-aou', '-ssc', '-p74744567bnbnvbnb', '-o/mnt/complete/tvshows/_UNPACK_Am', '/mnt/incomplete/Am']
ERROR: Cannot set file attribute : errno=1 : Operation not permitted : /mnt/complete/tvshows/_UNPACK_Am
ERROR: Cannot set file attribute : errno=1 : Operation not permitted : /mnt/complete/tvshows/_UNPACK_Am

Code: Select all

Extracting archive: /mnt/incomplete/Am
ERROR: /mnt/incomplete/Am
Cannot open encrypted archive. Wrong password?
What if you run that 7zz command manually, with all the parameters SAB uses?
fuminshou
Newbie
Newbie
Posts: 9
Joined: February 1st, 2023, 10:22 pm

Re: articles download but fail unpacking from a single indexer.

Post by fuminshou »

Good point, I checked the _FAILED_ directory to see if I could unpack the article manually, but it appears that it's already unpacked. The file plays as expected as well.
User avatar
sander
Release Testers
Release Testers
Posts: 8812
Joined: January 22nd, 2008, 2:22 pm

Re: articles download but fail unpacking from a single indexer.

Post by sander »

So ... fake error message?

Nevertheless: what happens if you run that command, to a fresh empty directory?

And: can you share the NZB with me so that I can verify on my system?

And 2: if you use an older SAB, with the same download, do you get that same error?
fuminshou
Newbie
Newbie
Posts: 9
Joined: February 1st, 2023, 10:22 pm

Re: articles download but fail unpacking from a single indexer.

Post by fuminshou »

it does appear to be a false positive. I don't think I can share the nzb unfortunately without jeopardizing my membership with the indexer. I have been able to test on my macos sonarr/sab and it is able to unpack without error, but if I send the nzb to my truenas sab it fails the same way as if it was sent from the docker container sonarr. I'll see if I can try again and run the command manually
User avatar
sander
Release Testers
Release Testers
Posts: 8812
Joined: January 22nd, 2008, 2:22 pm

Re: articles download but fail unpacking from a single indexer.

Post by sander »

Yes, please test.

Probably NOT related (plus workaround ... worth trying anyway): viewtopic.php?p=128959#p128959
fuminshou
Newbie
Newbie
Posts: 9
Joined: February 1st, 2023, 10:22 pm

Re: articles download but fail unpacking from a single indexer.

Post by fuminshou »

alright, I tried a manual extraction of the 7z with the password from the logs and it was successful. I also attempted the overwrite_files special option and that didn't appear to impact results.

I also built a second sab jail to test and make sure it wasn't just a funny config on the old one and got the same failed unpacking.
User avatar
sander
Release Testers
Release Testers
Posts: 8812
Joined: January 22nd, 2008, 2:22 pm

Re: articles download but fail unpacking from a single indexer.

Post by sander »

And ... now what? Can you think of other test cases? How to reproduce or not reproduce the problem?
fuminshou
Newbie
Newbie
Posts: 9
Joined: February 1st, 2023, 10:22 pm

Re: articles download but fail unpacking from a single indexer.

Post by fuminshou »

I'm starting to come up empty.
to summarize:
I can 100% reproduce the case by sending the nzb from the docker sonarr or the macos sonarr to the jail sab.
I can get 100% success on the unpacking if I send from macos sonarr to macos sab.
manual unpacking seems to be fine, and the nzb does end up in the completed folder unpacked even when it says it fails except it gets a _FAILED_ directory rename.

I suppose I could build out a jail sonarr or build a docker container sab and try those as well, but other than that I can't think of any other test cases.
User avatar
sander
Release Testers
Release Testers
Posts: 8812
Joined: January 22nd, 2008, 2:22 pm

Re: articles download but fail unpacking from a single indexer.

Post by sander »

sabnzbd straight on MacOS, with a nice clean directory on the main disk ... ?
fuminshou
Newbie
Newbie
Posts: 9
Joined: February 1st, 2023, 10:22 pm

Re: articles download but fail unpacking from a single indexer.

Post by fuminshou »

Thats correct, when its in the macos environment it unpacks without issue in an empty directory or with other downloads in it.
User avatar
sander
Release Testers
Release Testers
Posts: 8812
Joined: January 22nd, 2008, 2:22 pm

Re: articles download but fail unpacking from a single indexer.

Post by sander »

OK, so:
SAB on MAC on disk, with 7z version X: no problem
SAB on truenas jail with certain mount, with 7z version Y: problem

Do you think you can narrow things down by varying parameters?

Also: focus on the litteral error message:

Code: Select all

ERROR: Cannot set file attribute : errno=1 : Operation not permitted : /mnt/complete/tvshows/_UNPACK_Am
Seems like a rights problem to me ...
Not indexer, not SAB.
fuminshou
Newbie
Newbie
Posts: 9
Joined: February 1st, 2023, 10:22 pm

Re: articles download but fail unpacking from a single indexer.

Post by fuminshou »

Thanks for your help with nailing this issue down sander, I may have neglected to mention, this issue is only with a specific indexer. All other indexer articles sent to the truenas sab unpack fine. I built a sonarr jail to see if it maybe was something with cross platform and that also failed. I also sent the article from the new sonarr jail to the previously mentioned fresh sab jail and that failed as well.

I saw the permissions error as well, but I imagine that would impact all other indexers right? not just the single one I'm having problems with.

This seems like a jail sab specific issue?
fuminshou
Newbie
Newbie
Posts: 9
Joined: February 1st, 2023, 10:22 pm

Re: articles download but fail unpacking from a single indexer.

Post by fuminshou »

An update, this probably isn't the best fix for this and I'll have to keep digging, but for now I have the post-processing switch "Post-Process Only Verified Jobs" unchecked and now the articles from the problem indexer are downloading and being moved over successfully.
Post Reply