Hi!
Since updating to 0.7.14 my sabnzbd install is failing on most downloads. The par2 command compiled for solaris doesn't appear to be able to have wildcards. Does anyone have any suggestions of how to fix this?
par2 on solaris fails on * [partial fix now]
Forum rules
Help us help you:
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.
par2 on solaris fails on * [partial fix now]
Last edited by ljw1 on August 23rd, 2013, 9:45 pm, edited 1 time in total.
Re: par2 on solaris fails on *
There's no fix currently.
Unless you want to write a wrapper script called "par2" and have that call the original par2 program
with the wildcard character removed.
Unless you want to write a wrapper script called "par2" and have that call the original par2 program
with the wildcard character removed.
Re: par2 on solaris fails on *
The problem is with how the '*' is interpreted. In normal cases it globs all the files and directories except those with a . at the beginning. A simple solution is to rename the __ADMIN__ folder to something like .__ADMIN__.
Another solution is to enable a shell extension in bash to allow for exlusions.
shopt -s extglob
par2 repair *.par2 !(__ADMIN__)
shopt -u extglob
Both of these methods should work on any system that is using bash as the command interpreter.
Before I implement a solution do you have any suggestions about which way is better? I don't want to put something in place that breaks next time I update.
Another solution is to enable a shell extension in bash to allow for exlusions.
shopt -s extglob
par2 repair *.par2 !(__ADMIN__)
shopt -u extglob
Both of these methods should work on any system that is using bash as the command interpreter.
Before I implement a solution do you have any suggestions about which way is better? I don't want to put something in place that breaks next time I update.
Re: par2 on solaris fails on *
Using a hidden folder (.admin) is the better solution.
Implementing it in a new version is a bit of an issue
because already existing queue entries should keep working.
I suggest you use the wrapper script until I find a way to implement a better solution.
Implementing it in a new version is a bit of an issue
because already existing queue entries should keep working.
I suggest you use the wrapper script until I find a way to implement a better solution.
Re: par2 on solaris fails on *
I have made a script in the interim which works when using the command line, but it doesn't work when integrated with Sabnzbd. It gives the following error -
Error [Errno 8] Exec format error while running par2_repair on set
The script is as follows :-
#/bin/bash!
# Script to wrap around par2 binary
# The wrapper removes the __ADMIN__ folder only
IFS_OLD="$IFS"
IFS="\n"
shopt -s extglob
IGNOREVAR="!(__ADMIN__)"
COMMAND="$1"
shift
PARPATH="$1"
DIRPATH=${1%/*}
shift
IGNOREVAR="$DIRPATH/!(__ADMIN__)"
echo "This is where the echo starts"
printf "\n"
echo "par2cmd $COMMAND $PARPATH $IGNOREVAR"
echo "This is where the command starts"
printf "\n"
par2 $COMMAND ""$PARPATH"" $IGNOREVAR
shopt -u extglob
IFS="$IFS_OLD"
How would you suggest I debug the error?
Error [Errno 8] Exec format error while running par2_repair on set
The script is as follows :-
#/bin/bash!
# Script to wrap around par2 binary
# The wrapper removes the __ADMIN__ folder only
IFS_OLD="$IFS"
IFS="\n"
shopt -s extglob
IGNOREVAR="!(__ADMIN__)"
COMMAND="$1"
shift
PARPATH="$1"
DIRPATH=${1%/*}
shift
IGNOREVAR="$DIRPATH/!(__ADMIN__)"
echo "This is where the echo starts"
printf "\n"
echo "par2cmd $COMMAND $PARPATH $IGNOREVAR"
echo "This is where the command starts"
printf "\n"
par2 $COMMAND ""$PARPATH"" $IGNOREVAR
shopt -u extglob
IFS="$IFS_OLD"
How would you suggest I debug the error?
Re: par2 on solaris fails on *
Oops I pasted the debug version of the script. The actual script is :-
#/bin/bash!
# Script to wrap around par2 binary
# The wrapper removes the __ADMIN__ folder only
IFS_OLD="$IFS"
IFS="\n"
shopt -s extglob
IGNOREVAR="!(__ADMIN__)"
COMMAND="$1"
shift
PARPATH="$1"
DIRPATH=${1%/*}
shift
IGNOREVAR="$DIRPATH/!(__ADMIN__)"
par2 $COMMAND ""$PARPATH"" $IGNOREVAR
shopt -u extglob
IFS="$IFS_OLD"
#/bin/bash!
# Script to wrap around par2 binary
# The wrapper removes the __ADMIN__ folder only
IFS_OLD="$IFS"
IFS="\n"
shopt -s extglob
IGNOREVAR="!(__ADMIN__)"
COMMAND="$1"
shift
PARPATH="$1"
DIRPATH=${1%/*}
shift
IGNOREVAR="$DIRPATH/!(__ADMIN__)"
par2 $COMMAND ""$PARPATH"" $IGNOREVAR
shopt -u extglob
IFS="$IFS_OLD"
Re: par2 on solaris fails on *
Additional debugging info from the log
2013-08-24 12:39:50,931::ERROR::[newsunpack:865] Error [Errno 8] Exec format error while running par2_repair on set 0x3qm8ItdK5nUru
2013-08-24 12:39:50,931::INFO::[newsunpack:866] Traceback:
Traceback (most recent call last):
File "/opt/SABnzbd/sabnzbd/newsunpack.py", line 843, in par2_repair
setname, joinables, single=single)
File "/opt/SABnzbd/sabnzbd/newsunpack.py", line 981, in PAR_Verify
startupinfo=stup, creationflags=creationflags)
File "/usr/lib/python2.6/subprocess.py", line 621, in __init__
errread, errwrite)
File "/usr/lib/python2.6/subprocess.py", line 1126, in _execute_child
raise child_exception
OSError: [Errno 8] Exec format error
2013-08-24 12:39:50,931::ERROR::[newsunpack:865] Error [Errno 8] Exec format error while running par2_repair on set 0x3qm8ItdK5nUru
2013-08-24 12:39:50,931::INFO::[newsunpack:866] Traceback:
Traceback (most recent call last):
File "/opt/SABnzbd/sabnzbd/newsunpack.py", line 843, in par2_repair
setname, joinables, single=single)
File "/opt/SABnzbd/sabnzbd/newsunpack.py", line 981, in PAR_Verify
startupinfo=stup, creationflags=creationflags)
File "/usr/lib/python2.6/subprocess.py", line 621, in __init__
errread, errwrite)
File "/usr/lib/python2.6/subprocess.py", line 1126, in _execute_child
raise child_exception
OSError: [Errno 8] Exec format error
Re: par2 on solaris fails on * [partial fix now]
There will be a working fix in 0.7.15
Re: par2 on solaris fails on * [partial fix now]
I did apply this commit:
https://github.com/sabnzbd/sabnzbd/comm ... 20fffe08e4
On my QNAP with a par2cmd without wildcard support this atleast made the failed releases complete again after a retry.
I guess the wildcard was to fix the repair of badly named par2 files, not sure if this commit reverts the fix for that.
But apperently i had more releases that failed due to wildcard then to weird par2 files.
https://github.com/sabnzbd/sabnzbd/comm ... 20fffe08e4
On my QNAP with a par2cmd without wildcard support this atleast made the failed releases complete again after a retry.
I guess the wildcard was to fix the repair of badly named par2 files, not sure if this commit reverts the fix for that.
But apperently i had more releases that failed due to wildcard then to weird par2 files.