Page 2 of 2
Re: SAB on Iomega Storcenter can't find par2, unrar and unzi
Posted: May 29th, 2012, 3:43 pm
by sander
Based on sabnzbd/misc.py, I wrote the code below. Can you run it on your system, with both python versions?
Code: Select all
import os
def find_on_path(targets):
""" Search the PATH for a program and return full path """
if False:
paths = os.getenv('PATH').split(';')
else:
paths = os.getenv('PATH').split(':')
print targets
print paths
if isinstance(targets, basestring):
targets = ( targets, )
for path in paths:
for target in targets:
target_path = os.path.abspath(os.path.join(path, target))
if os.path.isfile(target_path) and os.access(target_path, os.X_OK):
return target_path
return None
print find_on_path('par2')
print find_on_path('nice')
print find_on_path('blabla')
On my Ubuntu the result is:
Code: Select all
sander@R540:~/SABnzbd-0.7.0Beta8$ python path-testing.py
['/home/sander/bin', '/usr/lib/lightdm/lightdm', '/usr/local/sbin', '/usr/local/bin', '/usr/sbin', '/usr/bin', '/sbin', '/bin', '/usr/games']
/usr/bin/par2
['/home/sander/bin', '/usr/lib/lightdm/lightdm', '/usr/local/sbin', '/usr/local/bin', '/usr/sbin', '/usr/bin', '/sbin', '/bin', '/usr/games']
/usr/bin/nice
['/home/sander/bin', '/usr/lib/lightdm/lightdm', '/usr/local/sbin', '/usr/local/bin', '/usr/sbin', '/usr/bin', '/sbin', '/bin', '/usr/games']
None
sander@R540:~/SABnzbd-0.7.0Beta8$
Post the results back here.
Re: SAB on Iomega Storcenter can't find par2, unrar and unzi
Posted: May 29th, 2012, 11:46 pm
by nextraa
I don't think that's true, because nice is in /opt/bin:
root@ix2-200:/opt/bin# which nice
/opt/bin/nice
Also I added in /etc/profile the /opt/bin directory:
root@ix2-200:/# echo $PATH
/opt/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
But you're right I find it strange too why SAB can't find these programs. Maybe SAB uses some other method of finding the path than the variables that are in $PATH?
Re: SAB on Iomega Storcenter can't find par2, unrar and unzi
Posted: May 29th, 2012, 11:53 pm
by nextraa
root@ix2-200:/opt/share/SABnzbd/sabnzbd# /opt/bin/python2.5 /opt/share/SABnzbd/sabnzbd/path.py
par2
['/opt/bin', '/usr/local/sbin', '/usr/local/bin', '/usr/sbin', '/usr/bin', '/sbin', '/bin']
/opt/bin/par2
nice
['/opt/bin', '/usr/local/sbin', '/usr/local/bin', '/usr/sbin', '/usr/bin', '/sbin', '/bin']
/opt/bin/nice
blabla
['/opt/bin', '/usr/local/sbin', '/usr/local/bin', '/usr/sbin', '/usr/bin', '/sbin', '/bin']
None
root@ix2-200:/opt/share/SABnzbd/sabnzbd# /opt/bin/python2.6 /opt/share/SABnzbd/sabnzbd/path.py
par2
['/opt/bin', '/usr/local/sbin', '/usr/local/bin', '/usr/sbin', '/usr/bin', '/sbin', '/bin']
/opt/bin/par2
nice
['/opt/bin', '/usr/local/sbin', '/usr/local/bin', '/usr/sbin', '/usr/bin', '/sbin', '/bin']
/opt/bin/nice
blabla
['/opt/bin', '/usr/local/sbin', '/usr/local/bin', '/usr/sbin', '/usr/bin', '/sbin', '/bin']
None
Re: SAB on Iomega Storcenter can't find par2, unrar and unzi
Posted: May 30th, 2012, 12:56 am
by sander
nextraa wrote:I don't think that's true, because nice is in /opt/bin:
root@ix2-200:/opt/bin# which nice
/opt/bin/nice
... but found in /usr/bin ... see your own log:
Code: Select all
2012-05-29 20:23:00,976::WARNING::[SABnzbd:408] unrar binary... NOT found
2012-05-29 20:23:00,979::WARNING::[SABnzbd:413] unzip binary... NOT found!
2012-05-29 20:23:00,982::INFO::[SABnzbd:417] nice binary... found (/usr/bin/nice)
2012-05-29 20:23:00,984::INFO::[SABnzbd:421] ionice binary... found (/usr/bin/ionice)
... which triggered my hypothesis.
Re: SAB on Iomega Storcenter can't find par2, unrar and unzi
Posted: May 30th, 2012, 1:16 am
by nextraa
Sander, I will check when I'm home whether nice and those other programs SAB is using are in both locations. Also I saw in the /opt/share/SABnzbd/sabnzbd directory a Python script named pathchk.py. I didn't have time to check it out, but perhaps SAB uses this script to check where the programs are.
Re: SAB on Iomega Storcenter can't find par2, unrar and unzi
Posted: May 30th, 2012, 3:32 am
by sander
nextraa wrote:Sander, I will check when I'm home whether nice and those other programs SAB is using are in both locations. Also I saw in the /opt/share/SABnzbd/sabnzbd directory a Python script named pathchk.py. I didn't have time to check it out, but perhaps SAB uses this script to check where the programs are.
I checked on my installation, on my SAB (0.7.0 and 0.6.x)has no file pathchk.py. So is this a file added by the ipk packager?
Something else: why not try to run SAB 0.6.15 from source? It has bug fixes and new features compared to your SAB 0.5.x.
Download the SABnzbd 0.6.15 source version via
http://sabnzbd.org/download/, unpack it in its own directory, and run it.
Re: SAB on Iomega Storcenter can't find par2, unrar and unzi
Posted: May 30th, 2012, 1:55 pm
by nextraa
Well I checked the programs SAB uses and this is the outcome:
root@ix2-200:/# ls -l /usr/bin/nice
-rwxr-xr-x 1 root root 14892 Mar 3 01:19 /usr/bin/nice
root@ix2-200:/# ls -l /usr/bin/ionice
-rwxr-xr-x 1 root root 4260 Mar 3 01:19 /usr/bin/ionice
root@ix2-200:/# ls -l /usr/bin/unrar
ls: cannot access /usr/bin/unrar: No such file or directory
root@ix2-200:/# ls -l /usr/bin/unzip
ls: cannot access /usr/bin/unzip: No such file or directory
root@ix2-200:/# ls -l /usr/bin/par2
ls: cannot access /usr/bin/par2: No such file or directory
root@ix2-200:/# ls -l /opt/bin/nice
lrwxrwxrwx 1 root root 14 May 28 11:56 /opt/bin/nice -> coreutils-nice
root@ix2-200:/# ls -l /opt/bin/ionice
ls: cannot access /opt/bin/ionice: No such file or directory
root@ix2-200:/# ls -l /opt/bin/unrar
-rwxr-xr-x 1 root root 183164 May 13 06:51 /opt/bin/unrar
root@ix2-200:/# ls -l /opt/bin/unzip
lrwxrwxrwx 1 root root 20 May 28 11:46 /opt/bin/unzip -> /opt/bin/unzip-unzip
root@ix2-200:/# ls -l /opt/bin/par2
-rwxr-xr-x 1 root root 187652 Feb 14 16:32 /opt/bin/par2
So you're hypothesis might be correct. The programs that can't be found are in /opt/bin and the programs that SAB can find are in /usr/bin. The question is why?
About the newer version of SAB. I found this on the internet:
cd /opt/tmp/
wget
http://ftp.de.debian.org/debian/pool/ma ... _armel.deb
dpkg --instdir=/opt/ --admindir=/opt/dpkg/ -i libsigc++-2.0-dev_2.0.18-2_armel.deb
As an example how to install a Debian package. Perhaps it's easier to install a ready-made package of SAB instead of compiling it from source. I'm not a Linux-guru, more like the opposite. So I want to keep it as easy as possible. Also if SAB has dependencies (which it has

those are installed as well if I install a ready-made Debian package. What do you think?
Re: SAB on Iomega Storcenter can't find par2, unrar and unzi
Posted: May 30th, 2012, 2:05 pm
by sander
There is no compiling in SABnzbd :-)
So download the source package here:
https://sourceforge.net/projects/sabnzb ... z/download
Unpack it in a seperate directory, and run it ...
Re: SAB on Iomega Storcenter can't find par2, unrar and unzi
Posted: May 30th, 2012, 2:39 pm
by nextraa
Hi Sander,
I got an interesting e-mail today. Turns out that some Storcenters were fitted with only 128 MB of memory while it should have 256 MB. I happen to have one of these (actually it says it only has 115 MB of memory). So I have to return the device to the manufacturer. In the meantime we're free to experiment

So I'll try to download the newer version of SAB. I will let you know how things are going...
Re: SAB on Iomega Storcenter can't find par2, unrar and unzi
Posted: May 30th, 2012, 2:46 pm
by shypike
128M.
That's not enough for any decent performance.
It can also compromise the integrity of your system.
Even 256M is a bit tight.
Re: SAB on Iomega Storcenter can't find par2, unrar and unzi
Posted: May 30th, 2012, 2:57 pm
by nextraa
256 MB isn't much, but I'll have to make due. At least it's better than 128 MB ;-)
Re: SAB on Iomega Storcenter can't find par2, unrar and unzi
Posted: May 30th, 2012, 3:05 pm
by sander
shypike wrote:128M.
That's not enough for any decent performance.
It can also compromise the integrity of your system.
Even 256M is a bit tight.
Shypike, do you mean the memory can cause the problem with the par2 not beging found ... ?
Re: SAB on Iomega Storcenter can't find par2, unrar and unzi
Posted: May 30th, 2012, 3:14 pm
by nextraa
Well I downloaded SABnzbd-0.6.15-src.tar.gz copied it with WinSCP to the StorCenter (after factory reset I don't seem to have any share anymore) to /opt/tmp. Extracted the tar archive with: tar xvf SABnzbd-0.6.15-src.tar.gz. Then tried to run with:
root@ix2-200:/opt/tmp/SABnzbd-0.6.15# ./SABnzbd.py -s 0.0.0.0:8080 -d
The Python module Cheetah is required
Again it can't find the Cheetah module. What to do now?
Re: SAB on Iomega Storcenter can't find par2, unrar and unzi
Posted: May 30th, 2012, 3:17 pm
by sander
nextraa wrote:Well I downloaded SABnzbd-0.6.15-src.tar.gz copied it with WinSCP to the StorCenter (after factory reset I don't seem to have any share anymore) to /opt/tmp. Extracted the tar archive with: tar xvf SABnzbd-0.6.15-src.tar.gz. Then tried to run with:
root@ix2-200:/opt/tmp/SABnzbd-0.6.15# ./SABnzbd.py -s 0.0.0.0:8080 -d
The Python module Cheetah is required
Again it can't find the Cheetah module. What to do now?
Pity.
If you got the 0.5.x version working with the patches I adviced you, just use that version. Let's leave the Cheetah stuff to the platform ipk packager.
Re: SAB on Iomega Storcenter can't find par2, unrar and unzi
Posted: May 30th, 2012, 11:25 pm
by nextraa
Sander, thanks for all your help.