Some downloads fail due to misnamed rars

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.
swehawk
Newbie
Newbie
Posts: 9
Joined: December 18th, 2011, 6:05 am

Re: Some downloads fail due to misnamed rars

Post by swehawk »

Gaahhh...I was afraid of that ;) Thank's for looking into it anyway!

I use the latest stable SAB version running as as a service on win 7 ultimate (headless server) . I also use CouchPotato to feed SAB, although that shouldn't matter. I use Tweaknews as provider, if that's of any significance?

Is there any (mis-)configuration that might cause this? I did go through all config items though, and it did work flawlessly before!

Guess I'll have to do a clean reinstall of SAB and see if that helps....?
LordM
Newbie
Newbie
Posts: 3
Joined: November 18th, 2014, 4:33 am

Re: Some downloads fail due to misnamed rars

Post by LordM »

This might be completely unrelated, but anyway:

After upgrading to 0.7.19 I was running into exactly the same problem (about 40% of downloads failing with the message "Invalid par2 files, cannot verify or repair"). The downloads were fine; QuickPar had no problems using the PAR files to repair the downloads, mostly the problem was just in the naming of the files...

As part of my upgrade to 0.7.19 I changed the SABnzbd service on my Windows Server to run as a separate user (instead of LocalSystem). It turns out this is what was causing my problem: SABnzbd's "incomplete" folder is a couple folders down in my hierarchy (e.g. "Z:\some-folder\sabnzbd\incomplete"). I had set the rights on the "sabnzbd" folder to give the SABnzbd user full control. I did, however, not set any rights on the containing folder ("Z:\some-folder") and irrespective of this everything appeared to work just fine.

After updating the rights to include read access on all folders leading up to the "incomplete" folder my problem has been resolved. Pressing "retry" on all the failed downloads still in my history caused them to be successfully repaired.
User avatar
shypike
Administrator
Administrator
Posts: 19774
Joined: January 18th, 2008, 12:49 pm

Re: Some downloads fail due to misnamed rars

Post by shypike »

swehawk wrote:Gaahhh...I was afraid of that ;) Thank's for looking into it anyway!
Guess I'll have to do a clean reinstall of SAB and see if that helps....?
Not sure if that would help. Try 0.7.20RC2 if you're going to install.
I didn't test on Windows. It shouldn't make a difference, but I'll test it anyway.

I cannot quite make sense of LordM's report. Access rights of a folder would affect all content, not just par2 files.
But you never know. Something else to track down...
swehawk
Newbie
Newbie
Posts: 9
Joined: December 18th, 2011, 6:05 am

Re: Some downloads fail due to misnamed rars

Post by swehawk »

@Lord M: I have exactly the same configuration as you have, incl. running as a separate user account only used for self-created services. I will definitly look into the rights of the incomlete folder tonight! It might also well be that this problem arose in the same timeframe as I upgraded to 0.7.19, so....

I'll report back with results.

Edit:
Made sure that the "SAB-user" has full control in all folders and subfolders involved in SAB. Downloaded the same nzb again, but no joy.... Still the same error and still q-par says "ready to rename 128 files, no repair needed". FYI I have the following switches active: quick check, unrar, unzip, par cleanup, yenc crc, only verified, sfv checks and check results. Should I make any changes here you think?
Any use turning debug log on? I'm reluctant to install a beta not yet tested on windows...
User avatar
shypike
Administrator
Administrator
Posts: 19774
Joined: January 18th, 2008, 12:49 pm

Re: Some downloads fail due to misnamed rars

Post by shypike »

swehawk wrote: Any use turning debug log on? I'm reluctant to install a beta not yet tested on windows...
Switching debug log on is always useful to generate more information.
The differences are small and primarily aimed at Mac users.
So 0.7.19 or 0.7.20 won't make a difference for you.
User avatar
shypike
Administrator
Administrator
Posts: 19774
Joined: January 18th, 2008, 12:49 pm

Re: Some downloads fail due to misnamed rars

Post by shypike »

swehawk wrote:Gaahhh...I was afraid of that ;) Thank's for looking into it anyway!
Is it possible for you to email me the smallest par2 file?
User avatar
shypike
Administrator
Administrator
Posts: 19774
Joined: January 18th, 2008, 12:49 pm

Re: Some downloads fail due to misnamed rars

Post by shypike »

BTW, something you can test yourself.
Assuming you have the complete files, including at least one par2 file.
Run par2 from a cmd windows.
First go to the folder that contains the files.
Then run this (don't forget the quotes and the asterisk):

"c:\program files (x86)\sabnzbd\win\par2.exe" v name-of-first-par2.par2 *

Please report what the output is.
swehawk
Newbie
Newbie
Posts: 9
Joined: December 18th, 2011, 6:05 am

Re: Some downloads fail due to misnamed rars

Post by swehawk »

This is what I got (had to modify the path a bit) Cleaned up the output to avoid endless repeating...

Code: Select all

Skipping 0 byte file: D:\Download\Usenet\Aktiva_nzb\the_XXXXXX.2014.720p.bluray.x264.dts-nohate\par2.txt
par2cmdline version 0.4, Copyright (C) 2003 Peter Brian Clements.
Modifications for concurrent processing, Unicode support, and hierarchial
directory support are Copyright (c) 2007-2009 Vincent Tan.
Concurrent processing utilises Intel Thread Building Blocks 2.0,
Copyright (c) 2007-2008 Intel Corp.
Executing using the 32-bit x86 (IA32) instruction set.

par2cmdline comes with ABSOLUTELY NO WARRANTY.

This is free software, and you are welcome to redistribute it and/or modify
it under the terms of the GNU General Public License as published by the
Free Software Foundation; either version 2 of the License, or (at your
option) any later version. See COPYING for details.

Processing verifications and repairs concurrently.
Loading "cfae28c9a3a433418afb12b504cae2ec.par2".
Loaded 258 new packets
Loading "cfae28c9a3a433418afb12b504cae2ec.vol000+01.par2".
Loaded 1 new packets including 1 recovery blocks
Loading "cfae28c9a3a433418afb12b504cae2ec.vol001+02.par2".
Loaded 2 new packets including 2 recovery blocks
Loading "cfae28c9a3a433418afb12b504cae2ec.vol003+04.par2".
Loaded 4 new packets including 4 recovery blocks
Loading "cfae28c9a3a433418afb12b504cae2ec.vol007+08.par2".
Loaded 8 new packets including 8 recovery blocks
Loading "cfae28c9a3a433418afb12b504cae2ec.vol015+16.par2".
Loaded 16 new packets including 16 recovery blocks
Loading "cfae28c9a3a433418afb12b504cae2ec.vol031+32.par2".
Loaded 32 new packets including 32 recovery blocks
Loading "cfae28c9a3a433418afb12b504cae2ec.vol063+39.par2".
Loaded 39 new packets including 39 recovery blocks

There are 128 recoverable files and 0 other files.
The block size used was 3307304 bytes.
There are a total of 2046 data blocks.
The total size of the data files is 6395943581 bytes.

Verifying source files:

Target: "The XXXXXX.2014.720p.BluRay.x264.DTS-NoHaTE.r00" - missing.

   |
   V

Target: "The XXXXXX.2014.720p.BluRay.x264.DTS-NoHaTE.s26" - missing.


Scanning extra files:

Scanning: 
File: "cfae28c9a3a433418afb12b504cae2ec.10" - is a match for "The XXXXXX.2014.720p.BluRay.x264.DTS-NoHaTE.r63".

   |
   V

Scanning: 
File: "cfae28c9a3a433418afb12b504cae2ec.99" - is a match for "The XXXXXX.2014.720p.BluRay.x264.DTS-NoHaTE.r74".

Repair is required.
128 file(s) have the wrong name.
You have 2046 out of 2046 data blocks available.
You have 102 recovery blocks available.
Repair is possible.
You have an excess of 102 recovery blocks.
None of the recovery blocks will be used for the repair.
Hmmm... all seems good to me!
swehawk
Newbie
Newbie
Posts: 9
Joined: December 18th, 2011, 6:05 am

Re: Some downloads fail due to misnamed rars

Post by swehawk »

SOLVED!

First I have to apologize to Shypike for taking your up your time! Had I only read Lord M's post thoroughly it would have been solved right there :-[ He pointed out EXACTLY where the problem was!

In my case I have a folder structure like:
D:\Downloads\Usenet\<subfolders>

I DID assign Full Control to my sab-user in the Usenet folder incl. all subfolders, but NOT in the Downloads folder! When I done that and then hit Retry, SAB renamed, unpacked and moved just fine :)

Now, I don't really see why this should be necessary, and I'm quite sure that it worked before 0.7.19....?

Anyway, thank's a lot Shypike and Lord M!
User avatar
shypike
Administrator
Administrator
Posts: 19774
Joined: January 18th, 2008, 12:49 pm

Re: Some downloads fail due to misnamed rars

Post by shypike »

We'll, I'm glad it solved now.
LordM
Newbie
Newbie
Posts: 3
Joined: November 18th, 2014, 4:33 am

Re: Some downloads fail due to misnamed rars

Post by LordM »

If I'd had to venture a guess I'd say this might be caused by an update to the (external) PAR tool that causes it to "walk" through the folder tree in a very strict manner (e.g. cd D:, dir Downloads, cd Downloads, ...) instead of just changing directly to its working directory?

Is it an idea to add this information the the Wiki-page http://wiki.sabnzbd.org/sabnzbd-as-a-windows-service?
User avatar
shypike
Administrator
Administrator
Posts: 19774
Joined: January 18th, 2008, 12:49 pm

Re: Some downloads fail due to misnamed rars

Post by shypike »

The par2 tools haven't been updated for ages.
The way they're used has been slightly changed, since it uses the wildcard (*) character to replace long lists of files.
That would include any sub folders names, which are subsequently skipped.
But if the issue is access to the destination folder, par2 tools cannot be the problem.
LordM
Newbie
Newbie
Posts: 3
Joined: November 18th, 2014, 4:33 am

Re: Some downloads fail due to misnamed rars

Post by LordM »

When I execute the following command (running as my SABnzbd user; names changed to protect the innocent ;).

Code: Select all

C:\Program Files (x86)\SABnzbd\win\par2>par2 v Z:\some-folder\sabnzbd\incomplete\XXX\XXX.par2 *
I get this output (followed by the standard par2 help text):

Code: Select all

The recovery file does not exist: Z:\some-folder
If I then correct the access rights (so give the SABnzbd user "Read & Execute" rights on Z:\some-folder) the problem goes away and par2 starts verifying the download. Adding/removing the "*" in the command does not influence the result.

Could be the expected behaviour, so I wouldn't bother too much about it, but it still might be good to mention this somewhere in the documentation...
swehawk
Newbie
Newbie
Posts: 9
Joined: December 18th, 2011, 6:05 am

Re: Some downloads fail due to misnamed rars

Post by swehawk »

@LordM: That is interesting because when I ran this command it worked! There are two differences though. First, I ran as my primary user, not as "sab-user". Second, I opened the cmd-prompt in the "incomplete" folder (as instructed by Shypike). I assume you ran it from the default location (C:\users\<username>). I really would like to make some more testing, but now the incomplete files are gone and I don't feel like downloading 6+GB a third time ...

Btw, how did you set up sab as a service? I used srvany and start sab with the '-d' parameter, although this shouldn't have any implications on the recovery error.

Edit:
Did some testing using generic files:

- Created D:\test1\test2\test3\
- Set permissions=full control for testuser on \test2 incl subfolders and files, but NOT for \test1.
- Created D:\test1\test2\test3\testfile.txt
- Logged on as testuser
- opened a cmd-prompt (C:\users\testuser>)

Now, without cd'ing to D:, and using full paths, I was able to copy, move and delete the testfile in/between \test2 and \test3. However I was not able to cd through D:\test1.

All of the above was as expected and doesn't give any explaination to the par2 error.....
User avatar
shypike
Administrator
Administrator
Posts: 19774
Joined: January 18th, 2008, 12:49 pm

Re: Some downloads fail due to misnamed rars

Post by shypike »

LordM wrote:When I execute the following command (running as my SABnzbd user; names changed to protect the innocent ;).

Code: Select all

C:\Program Files (x86)\SABnzbd\win\par2>par2 v Z:\some-folder\sabnzbd\incomplete\XXX\XXX.par2 *
That's not how SABnzbd runs it, it wouldn't work.
In your case, you let par2 look at files in SABnzbd's program folder.
This is the way:

Code: Select all

C:\Program Files (x86)\SABnzbd\win\par2>par2 v Z:\some-folder\sabnzbd\incomplete\XXX\XXX.par2 Z:\some-folder\sabnzbd\incomplete\XXX\*
Post Reply