FreeNAS : Finally solved it
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.
FreeNAS : Finally solved it
+
?
After much hair pulling and desk thumping I have SABnzbd working on Freenas.
Using the Overbyrns tutorial, I have added my own observations which should help most users. here goes
SABnzbd Usenet Client & Dependencies
Postby th3joker on Wed Oct 22, 2008 7:32 pm
This is the Usenet client SABnzbd and includes all the dependencies required to run it.
More on SABnzbd here: http://www.sabnzbd.org
Overbyrn supplied the SABnzbd, dependencies and a shell script to run it.
SABnzbd: http://www.freenas.co.uk/files/sabnzb0.4.3.tar
Shell Script: http://www.freenas.co.uk/files/sab.sh
Overbyrn's instructions:-
00) Ensure you install the FULL version of Freenas not the embedded version (option 3)
0) Putty (google it) into server as root, make sure you set this in FreeNAS under services, SSH. tick enable, tick permit root login
1) Untar file to a temp folder on freenas. eg. tar zxvf sabnzb0.4.3.tar (Do this from Putty) yuo need to put these files somewhere with plenty of space for unzipping, I created a directory within my main CIFS/SMB share. File manager in Freenas is your friend here. double click the permissions and set them all to ticks, permission for everyone basically.
2) pkg_add -v sabnzbdplus-0.4.3.tbz (Do this from Putty)
2.5) Reboot Server
3) first ran it from command line ... /usr/local/bin/SABnzbd.py (Do this from your server box, I couldn't run it through Putty)
4) cntrl-c to exit.
5) it created a /root/.sabnzbd dir
6) edited /root/.sabnzbd/sabnzbd.ini (I did this by moving the file, to my CIFS share, editing in windows and using FREEnas file manger to put the completed file back in the /root/.sabnzbd dir
7) changed from localhost to 192.168.0.22 (I set this to my Freenas server IP, 192.168.1.40. I had set this to static to stop it moving around after a boot)
re-ran as in step 3)
9) went to http://192.168.0.22:8080/sabnzbd/ You may have to set the port to something else, I used 8082
10) configured to my liking
not done step 11 yet myself
11) created script as below to stop / start as a daemon process...
#! /bin/sh
case "$1" in
start)
echo "Starting SABnzbd."
/usr/bin/sudo -u sabuser -H /usr/local/src/SABnzbd/SABnzbd.py -d -f /root/.sabnzbd/sabnzbd.ini
;;
stop)
echo "Shutting down SABnzbd."
/usr/bin/fetch "http://192.168.0.22:8080/sabnzbd/api?mode=shutdown" > /dev/null
;;
*)
echo "Usage: $0 {start|stop}"
exit 1
esac
exit 0
12) noticed in console logging external binary unzip missing...(I had to do this also)
2008-09-23 20:14:32,166::ERROR::unzip binary... NOT found!
13) did pkg_add -rv unzip. this installed unzip into /usr/local/bin
14) restarted sabnzbd using script... /root/sab.sh start
15) checked "connections" tab - no sign of missing unzip.
Used this sabnzbd wiki link for reference ... http://sabnzbd.wikidot.com/start
made and uploaded a newer version of the zip containing v0.4.3 build of sabnzbplus.
Thanks go to Overbyrn & Auskento for their work
Last edited by dirtymurt on April 30th, 2009, 1:48 pm, edited 1 time in total.
Re: FreeNAS : Finally solved it
I AM STRUGGLING WITH THE AUTOSTART FUNCTION
can anyone help me with it?
can anyone help me with it?
Re: FreeNAS : Finally solved it
Add a command script in freenas... like sodirtymurt wrote: I AM STRUGGLING WITH THE AUTOSTART FUNCTION
can anyone help me with it?
/usr/local/SABnzbd/SABnzbd.py -d -f /root/.sabnzbd/sabnzbd.ini
as option -> PostInit
This is how it should be done in Freenas... Don't start editing your own script! Freenas gives you the tools!! USE IT!!!
Last edited by m4rc0 on May 9th, 2009, 10:25 am, edited 1 time in total.
Re: FreeNAS : Finally solved it
FANTASTIC,
thanks so much I had to change
/usr/local/SABnzbd/SABnzbd.py -d -f /root/.sabnzbd/sabnzbd.ini
to
/usr/local/bin/SABnzbd.py -d -f /root/.sabnzbd/sabnzbd.ini
and it works sweet as a nut
thanks so much I had to change
/usr/local/SABnzbd/SABnzbd.py -d -f /root/.sabnzbd/sabnzbd.ini
to
/usr/local/bin/SABnzbd.py -d -f /root/.sabnzbd/sabnzbd.ini
and it works sweet as a nut
Re: FreeNAS : Finally solved it
Anyway to get 0.4.11 working? Why do you have to use the full install and not the embedded? Seems the embedded works just as well (I'm running mine of a 1GB stick, more than enough to run SABNZBD).
Re: FreeNAS : Finally solved it
So here's what I did....I'm running a 0.7 RC2 nightly build
First of all, to install SABNzbd 0.4.11, I had to find a package port of it:
I installed this LAST! Before I installed it, I installed everything else:
So there are two problems I'm having....one is a catch 22
1.) SABNZBD complains that it needs Python python26-2.6.2 insalled and also all of these dependents. Now the problem is is that the dependents ALL need python26-2.6.2_2 installed. I'm not sure if that's the cause of my 2nd problem....
2.) SABNZBD starts but no matter what I edit the sabnzbd.ini with IP wise/port wise (192.168.0.134 in my case), it keeps trying to launch on the localhost:
I've launched SAB like so
do gives me an error.
Do the devs, or anyone else, have any idea where I'm going wrong?
Here's the sabnzbd.log:
And the cherrypy.log:
First of all, to install SABNzbd 0.4.11, I had to find a package port of it:
Code: Select all
pkg_add -rv ftp://ftp3.ca.freebsd.org/pub/FreeBSD/ports/i386/packages-7-stable/Latest/sabnzbdplus.tbz
Code: Select all
pkg_add -rv ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-stable/All/python26-2.6.2_2.tbz
py26-setuptools-0.6c9
pkg_add -r ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-stable/All/py26-setuptools-0.6c9.tbz
py26-cheetah-2.2.1
pkg_add -r ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-stable/All/py26-cheetah-2.2.1.tbz
py26-cherrypy-old-2.3.0,1
pkg_add -r http://ftp.nluug.nl/pub/os/FreeBSD/ports/packages/python/py26-cherrypy-old-2.3.0,1.tbz
py26-utils-0.3.0
pkg_add -r ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-stable/All/py26-utils-0.3.0.tbz
py26-cElementTree-1.0.5_1
pkg_add -r ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-stable/All/py26-cElementTree-1.0.5_1.tbz
py26-openssl-0.8_1
pkg_add -rv ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-stable/All/py26-openssl-0.8_1.tbz
py26-chardet-1.0.1
pkg_add -r ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-stable/All/py26-chardet-1.0.1.tbz
py26-feedparser-4.1_2
pkg_add -r ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-stable/All/py26-feedparser-4.1_2.tbz
pkg_add -r par2cmdline
pkg_add -r unrar
pkg_add -r unzip
1.) SABNZBD complains that it needs Python python26-2.6.2 insalled and also all of these dependents. Now the problem is is that the dependents ALL need python26-2.6.2_2 installed. I'm not sure if that's the cause of my 2nd problem....
2.) SABNZBD starts but no matter what I edit the sabnzbd.ini with IP wise/port wise (192.168.0.134 in my case), it keeps trying to launch on the localhost:
Code: Select all
"HTTP INFO Serving HTTP on http://0.0.0.0:8082"
"INFO::Launching browser with http://localhost:8082"
Code: Select all
/usr/local/SABnzbd/SABnzbd.py -f /root/.sabnzbd/sabnzbd.ini
Code: Select all
-d -f
Do the devs, or anyone else, have any idea where I'm going wrong?
Here's the sabnzbd.log:
Code: Select all
2009-08-25 09:38:45,004::INFO::SABnzbd.py-0.4.11 (rev=2517)
2009-08-25 09:38:45,004::INFO::Platform = posix
2009-08-25 09:38:45,004::INFO::Python-version = 2.6.2 (r262:71600, Aug 17 2009, 19:22:42)
[GCC 4.2.1 20070719 [FreeBSD]]
2009-08-25 09:38:45,005::INFO::download_dir directory: /root/.sabnzbd/downloads/incomplete does not exist, try to create it
2009-08-25 09:38:45,005::INFO::complete_dir directory: /root/.sabnzbd/downloads/complete does not exist, try to create it
2009-08-25 09:38:45,007::INFO::[sabnzbd] Loading data for rss_data.sab from /root/.sabnzbd/cache/rss_data.sab
2009-08-25 09:38:45,027::INFO::[sabnzbd] Loading data for bytes7.sab from /root/.sabnzbd/cache/bytes7.sab
2009-08-25 09:38:45,033::INFO::[sabnzbd] Loading data for queue7.sab from /root/.sabnzbd/cache/queue7.sab
2009-08-25 09:38:45,034::WARNING::[downloader] No active primary servers defined, will not download!
2009-08-25 09:38:45,034::INFO::All processes started
2009-08-25 09:38:45,035::INFO::_yenc module... NOT found!
2009-08-25 09:38:45,035::INFO::celementtree module... found!
2009-08-25 09:38:45,036::INFO::par2 binary... found (/usr/local/bin/par2)
2009-08-25 09:38:45,036::INFO::unrar binary... found (/usr/local/bin/unrar)
2009-08-25 09:38:45,036::INFO::unzip binary... found (/usr/local/bin/unzip)
2009-08-25 09:38:45,036::INFO::nice binary... found (/usr/bin/nice)
2009-08-25 09:38:45,036::INFO::ionice binary... NOT found!
2009-08-25 09:38:45,037::INFO::pyOpenSSL... found (True)
2009-08-25 09:38:45,098::INFO::Web dir is /usr/local/share/sabnzbdplus/interfaces/Default
2009-08-25 09:38:45,135::INFO::Starting SABnzbd.py-0.4.11
2009-08-25 09:38:45,136::INFO::[nzbqueue] Saving queue
2009-08-25 09:38:45,136::INFO::[sabnzbd] Saving data for queue7.sab in /root/.sabnzbd/cache/queue7.sab
2009-08-25 09:38:45,137::INFO::[sabnzbd] Saving data for bytes7.sab in /root/.sabnzbd/cache/bytes7.sab
2009-08-25 09:38:45,137::INFO::[sabnzbd] Saving data for rss_data.sab in /root/.sabnzbd/cache/rss_data.sab
2009-08-25 09:38:45,138::INFO::[sabnzbd.misc] URLGrabber starting up
2009-08-25 09:38:45,139::INFO::Starting web-interface on :8082
2009-08-25 09:38:45,342::INFO::Lauching browser with http://localhost:8082/sabnzbd
2009-08-25 09:49:06,017::INFO::[sabnzbd] Saving data for rss_data.sab in /root/.sabnzbd/cache/rss_data.sab
Code: Select all
25/Aug/2009:09:38:45 CONFIG INFO Server parameters:
25/Aug/2009:09:38:45 CONFIG INFO server.environment: production
25/Aug/2009:09:38:45 CONFIG INFO server.log_to_screen: True
25/Aug/2009:09:38:45 CONFIG INFO server.log_file: /root/.sabnzbd/logs/cherrypy.log
25/Aug/2009:09:38:45 CONFIG INFO server.log_tracebacks: True
25/Aug/2009:09:38:45 CONFIG INFO server.log_request_headers: False
25/Aug/2009:09:38:45 CONFIG INFO server.protocol_version: HTTP/1.0
25/Aug/2009:09:38:45 CONFIG INFO server.socket_host:
25/Aug/2009:09:38:45 CONFIG INFO server.socket_port: 8082
25/Aug/2009:09:38:45 CONFIG INFO server.socket_file:
25/Aug/2009:09:38:45 CONFIG INFO server.reverse_dns: False
25/Aug/2009:09:38:45 CONFIG INFO server.socket_queue_size: 5
25/Aug/2009:09:38:45 CONFIG INFO server.thread_pool: 10
25/Aug/2009:09:38:45 HTTP INFO Serving HTTP on http://0.0.0.0:8082/
Last edited by jubei on August 25th, 2009, 9:05 am, edited 1 time in total.
Re: FreeNAS : Finally solved it
SABnzbd 0.4.11 is not compatible with Python 2.6.
We will try to get compatibility on SABnzbd 0.5.0.
We will try to get compatibility on SABnzbd 0.5.0.
Re: FreeNAS : Finally solved it
Going to dump some of my findings here in the hope that the next time I break my FreeNAS I can get SABnzbd back up and going quicker.
Found a post on the FreeNAS forums that saved me a couple weeks of pain.
https://sourceforge.net/apps/phpbb/free ... 74&start=0
One important note (I blame FreeNAS ) is that you need to set a STATIC IP in order for FTP and some other services to work correctly (including SAB).
First things first, run /usr/local/bin/SABnzbd.py to generate a default sabnzbd.ini file in the /root/.sabnzbd folder. Then edit this file with the static IP of the system, this is required to access the web interface.
After installing SAB I decided to hack together a page in FreeNAS to bounce me over to the SAB web UI instead of having to type it every time. Eventually I'll try to make it look more similar to the other FreeNAS services pages, but for now I got it to the point where it pulls the system's IP automatically to generate the web UI url. You WILL still need to set the proper IP in the sabnzbd .ini file in the home directory though.
Relevant portion of fbegin.inc to add SABnzbd under Services menu.
I took one of the other service pages and modified it to suit my needs. Put this into a file called services_sabnzbd.php and if you made the change to fbegin.inc above when you reload your Web UI you should see SABnzbd+ under Services and be able to go to the page and access a link to the SAB Web UI.
Found a post on the FreeNAS forums that saved me a couple weeks of pain.
https://sourceforge.net/apps/phpbb/free ... 74&start=0
One important note (I blame FreeNAS ) is that you need to set a STATIC IP in order for FTP and some other services to work correctly (including SAB).
First things first, run /usr/local/bin/SABnzbd.py to generate a default sabnzbd.ini file in the /root/.sabnzbd folder. Then edit this file with the static IP of the system, this is required to access the web interface.
After installing SAB I decided to hack together a page in FreeNAS to bounce me over to the SAB web UI instead of having to type it every time. Eventually I'll try to make it look more similar to the other FreeNAS services pages, but for now I got it to the point where it pulls the system's IP automatically to generate the web UI url. You WILL still need to set the proper IP in the sabnzbd .ini file in the home directory though.
Relevant portion of fbegin.inc to add SABnzbd under Services menu.
Code: Select all
//snip
// Services
$menu['services']['desc'] = gettext("Services");
$menu['services']['visible'] = Session::isAdmin();
$menu['services']['link'] = "services_status.php";
$menu['services']['menuitem'] = array();
$menu['services']['menuitem'][] = array("desc" => gettext("CIFS/SMB"), "link" => "services_samba.php", "visible" => TRUE);
$menu['services']['menuitem'][] = array("desc" => gettext("FTP"), "link" => "services_ftp.php", "visible" => TRUE);
$menu['services']['menuitem'][] = array("desc" => gettext("SABnzbd+"), "link" => "services_sabnzbd.php", "visible" => TRUE);
$menu['services']['menuitem'][] = array("desc" => gettext("TFTP"), "link" => "services_tftp.php", "visible" => TRUE);
//snip
Code: Select all
#!/usr/local/bin/php
<?php
/*
services_sabnzbd.php
Copyright (c) 2006-2009 Volker Theile ([email protected])
All rights reserved.
hacked slashed and modded by Ethan Spoelstra ([email protected])
Coding without a license, so none required except as requested below.
part of FreeNAS (http://www.freenas.org)
Copyright (C) 2005-2009 Olivier Cochard <[email protected]>.
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
*/
require("auth.inc"); //remove or comment this line for FreeNAS 0.69.
require("guiconfig.inc");
require("services.inc");
$pgtitle = array(gettext("Services"), gettext("SABnzbd+"));
?>
<?php $a_interface = get_interface_list();
// Use first interface as default if it is not set.
if (empty($pconfig['if']) && is_array($a_interface))
$pconfig['if'] = key($a_interface);
?>
<?php include("fbegin.inc");?>
<?php
$if = get_ifname($pconfig['if']);
$ipaddr = get_ipaddr($if);
$url = "http://{$ipaddr}:8080/sabnzbd/";
$text = "<a href='{$url}' target='_blank'>{$url}</a>";
?> <?php html_text("url", gettext("URL"), $text);?>
<script language="JavaScript">
<!--
enable_change(false);
authrequired_change();
//-->
</script>
<?php //include("fend.inc");?>
Last edited by dragon788 on October 31st, 2009, 5:59 pm, edited 1 time in total.
Re: FreeNAS : Finally solved it
Thanks for the explanation, that did the trick for me. Except that I wasn't able to solve that little problem with unzip (pkg_add -rv unzip).
Is there any easy solution to update SABnzbd to the latest version?
Is there any easy solution to update SABnzbd to the latest version?
Re: FreeNAS : Finally solved it
flyerman, read the link I posted that goes to the FreeNAS forum, sessus over there has a VERY good how-to on updating, and I've added my 2 cents on getting it working as well.