SAB on Iomega Storcenter can't find par2, unrar and unzip

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.
User avatar
sander
Release Testers
Release Testers
Posts: 9429
Joined: January 22nd, 2008, 2:22 pm

Re: SAB on Iomega Storcenter can't find par2, unrar and unzi

Post 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.
nextraa
Newbie
Newbie
Posts: 32
Joined: July 16th, 2010, 1:43 am

Re: SAB on Iomega Storcenter can't find par2, unrar and unzi

Post 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?
nextraa
Newbie
Newbie
Posts: 32
Joined: July 16th, 2010, 1:43 am

Re: SAB on Iomega Storcenter can't find par2, unrar and unzi

Post 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
User avatar
sander
Release Testers
Release Testers
Posts: 9429
Joined: January 22nd, 2008, 2:22 pm

Re: SAB on Iomega Storcenter can't find par2, unrar and unzi

Post 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.
nextraa
Newbie
Newbie
Posts: 32
Joined: July 16th, 2010, 1:43 am

Re: SAB on Iomega Storcenter can't find par2, unrar and unzi

Post 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.
User avatar
sander
Release Testers
Release Testers
Posts: 9429
Joined: January 22nd, 2008, 2:22 pm

Re: SAB on Iomega Storcenter can't find par2, unrar and unzi

Post 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.
nextraa
Newbie
Newbie
Posts: 32
Joined: July 16th, 2010, 1:43 am

Re: SAB on Iomega Storcenter can't find par2, unrar and unzi

Post 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?
User avatar
sander
Release Testers
Release Testers
Posts: 9429
Joined: January 22nd, 2008, 2:22 pm

Re: SAB on Iomega Storcenter can't find par2, unrar and unzi

Post 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 ...
nextraa
Newbie
Newbie
Posts: 32
Joined: July 16th, 2010, 1:43 am

Re: SAB on Iomega Storcenter can't find par2, unrar and unzi

Post 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...
User avatar
shypike
Administrator
Administrator
Posts: 19773
Joined: January 18th, 2008, 12:49 pm

Re: SAB on Iomega Storcenter can't find par2, unrar and unzi

Post 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.
nextraa
Newbie
Newbie
Posts: 32
Joined: July 16th, 2010, 1:43 am

Re: SAB on Iomega Storcenter can't find par2, unrar and unzi

Post by nextraa »

256 MB isn't much, but I'll have to make due. At least it's better than 128 MB ;-)
User avatar
sander
Release Testers
Release Testers
Posts: 9429
Joined: January 22nd, 2008, 2:22 pm

Re: SAB on Iomega Storcenter can't find par2, unrar and unzi

Post 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 ... ?
nextraa
Newbie
Newbie
Posts: 32
Joined: July 16th, 2010, 1:43 am

Re: SAB on Iomega Storcenter can't find par2, unrar and unzi

Post 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?
User avatar
sander
Release Testers
Release Testers
Posts: 9429
Joined: January 22nd, 2008, 2:22 pm

Re: SAB on Iomega Storcenter can't find par2, unrar and unzi

Post 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.
nextraa
Newbie
Newbie
Posts: 32
Joined: July 16th, 2010, 1:43 am

Re: SAB on Iomega Storcenter can't find par2, unrar and unzi

Post by nextraa »

Sander, thanks for all your help.
Post Reply