Page 1 of 2
Cant access SAB after restart
Posted: March 19th, 2011, 3:09 pm
by jonneymendoza
Hi. i can no longer access SAB remotely from a web browser after i rebooted my ubuntu server.
i can however access it via PUTTY using" sabznbdplus start" which launches the sab app from within the putty and gives me a ui for me thats similar to the web page. However, i simply cannot access this app on any of my machines using the web browser.
it keeps saying page not found yet the app is running fine and can be access via putty? i looked at my port forwarding and its fine. got port 8080 open and the local ip address is static and working.
any advice on what may have went wrong?
i used /etc/init.d/sabnzbdplus restart to restart it multiple times and still same problem.
edit: i tried entering this:ps ax | grep -i sabnzbd
the following reesult is below, looks like it is running. so dont know what the problem is. i even tried rebooting my router.
1677 ? Sl 0:01 /usr/bin/python -OO /usr/bin/sabnzbdplus --daemon --s erver 0.0.0.0:8080
1748 pts/0 S+ 0:00 /usr/bin/python -OO /usr/bin/sabnzbdplus
1751 pts/0 S+ 0:00 www-browser
http://localhost:8080/sabnzbd/
1818 pts/1 D+ 0:00 grep --color=auto -i sabnzbd
any advice? cheers
Re: Cant access SAB after restart
Posted: March 19th, 2011, 6:55 pm
by shypike
I wonder about the line starting with 1677.
There are a lot of spaces between --s and erver.
Check the content of the script /etc/init.d/sabnzbdplus
Re: Cant access SAB after restart
Posted: March 20th, 2011, 9:16 am
by jonneymendoza
shypike wrote:
I wonder about the line starting with 1677.
There are a lot of spaces between --s and erver.
Check the content of the script /etc/init.d/sabnzbdplus
Hi, i checked the content of the script and cant see anything related to the --s and erver. here is the copy of my script:
#!/bin/bash
#
# Copyright (C) 2008-2011 by JCF Ploemen
# released under GPL, version 2 or later
################################################
# #
# TO CONFIGURE EDIT /etc/default/sabnzbdplus #
# #
################################################
### BEGIN INIT INFO
# Provides: sabnzbdplus
# Required-Start: $local_fs $network $remote_fs
# Required-Stop: $local_fs $network $remote_fs
# Should-Start: NetworkManager
# Should-Stop: NetworkManager
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: SABnzbd+ binary newsgrabber
### END INIT INFO
DAEMON=/usr/bin/sabnzbdplus
SETTINGS=/etc/default/sabnzbdplus
([ -x $DAEMON ] && [ -r $SETTINGS ]) || exit 0
DESC="SABnzbd+ binary newsgrabber"
DEFOPTS="--daemon"
PYTHONEXEC="^$(sed -n '1s/^#\!\([a-z0-9\.\/]\+\)\(.*\)/\1(\2)?/p' $DAEMON)"
PIDFILE=/var/run/sabnzbdplus.pid
SETTINGS_LOADED=FALSE
# these are only accepted from the settings file
unset USER CONFIG HOST PORT EXTRAOPTS
. /lib/lsb/init-functions
check_retval() {
if [ $? -eq 0 ]; then
log_end_msg 0
return 0
else
log_end_msg 1
exit 1
fi
}
is_running() {
# returns 0 when running, 1 otherwise
PID="$(pgrep -f -x -u ${USER%:*} "$PYTHONEXEC $DAEMON $DEFOPTS.*")"
RET=$?
[ $RET -gt 1 ] && exit 1 || return $RET
}
load_settings() {
if [ $SETTINGS_LOADED != "TRUE" ]; then
. $SETTINGS
[ -z "$USER" ] && {
log_warning_msg "$DESC: not configured, aborting. See $SETTINGS";
return 1; }
[ -z "${USER%:*}" ] && exit 1
OPTIONS="$DEFOPTS"
[ -n "$CONFIG" ] && OPTIONS="$OPTIONS --config-file $CONFIG"
[ -n "$HOST" ] && SERVER="$HOST" || SERVER=
[ -n "$PORT" ] && SERVER="$SERVER:$PORT"
[ -n "$SERVER" ] && OPTIONS="$OPTIONS --server $SERVER"
[ -n "$EXTRAOPTS" ] && OPTIONS="$OPTIONS $EXTRAOPTS"
SETTINGS_LOADED=TRUE
fi
return 0
}
start_sab() {
load_settings || exit 0
if ! is_running; then
log_daemon_msg "Starting $DESC"
start-stop-daemon --quiet --chuid $USER --start --exec $DAEMON -- $OPTIONS
check_retval
# create a pidfile; we don't use it but some monitoring app likes to have one
[ -w $(dirname $PIDFILE) ] && \
pgrep -f -x -n -u ${USER%:*} "$PYTHONEXEC $DAEMON $OPTIONS" > $PIDFILE
else
log_success_msg "$DESC: already running (pid $PID)"
fi
}
stop_sab() {
load_settings || exit 0
if is_running; then
TMPFILE=$(mktemp --tmpdir sabnzbdplus.XXXXXXXXXX)
[ $? -eq 0 ] || exit 1
trap '[ -f $TMPFILE ] && rm -f $TMPFILE' EXIT
echo "$PID" > $TMPFILE
log_daemon_msg "Stopping $DESC"
start-stop-daemon --stop --user ${USER%:*} --pidfile $TMPFILE --retry 30
check_retval
else
log_success_msg "$DESC: not running"
fi
[ -f $PIDFILE ] && rm -f $PIDFILE
}
case "$1" in
start)
start_sab
;;
stop)
stop_sab
;;
force-reload|restart)
stop_sab
start_sab
;;
status)
load_settings || exit 4
if is_running; then
log_success_msg "$DESC: running (pid $PID)"
else
log_success_msg "$DESC: not running"
[ -f $PIDFILE ] && exit 1 || exit 3
fi
;;
*)
log_failure_msg "Usage: $0 {start|stop|restart|force-reload|status}"
exit 3
;;
esac
exit 0
And here is the config file:
# This file is sourced by /etc/init.d/sabnzbdplus
#
# When SABnzbd+ is started using the init script, the
# --daemon option is always used, and the program is
# started under the account of $USER, as set below.
#
# Each setting is marked either "required" or "optional";
# leaving any required setting unconfigured will cause
# the service to not start.
# [required] user or uid of account to run the program as:
USER=root
# [optional] full path to the configuration file of your choice;
# otherwise, the default location (in $USER's home
# directory) is used:
CONFIG=
# [optional] hostname/ip and port number to listen on:
HOST=0.0.0.0
PORT=8080
# [optional] extra command line options, if any:
EXTRAOPTS=
Re: Cant access SAB after restart
Posted: March 20th, 2011, 12:06 pm
by jonneymendoza
right. i did a complete reinstall. removed sab first and begane reinstalling it again using this guide
http://wiki.sabnzbd.org/install-ubuntu-repo
Now when launch the app using sabnzbdplus.
this is the output
2011-03-20 17:03:41,737::INFO::[sabnzbdplus:1134] --------------------------------
2011-03-20 17:03:41,737::INFO::[sabnzbdplus:1135] sabnzbdplus-0.6.0Beta3 (rev=2716)
2011-03-20 17:03:41,738::INFO::[sabnzbdplus:1148] Platform = posix
2011-03-20 17:03:41,738::INFO::[sabnzbdplus:1149] Python-version = 2.6.6 (r266:84292, Sep 15 2010, 15:52:39)
[GCC 4.4.5]
2011-03-20 17:03:41,738::INFO::[sabnzbdplus:1162] Read INI file /root/.sabnzbd/sabnzbd.ini
2011-03-20 17:03:41,751::INFO::[__init__:842] Loading data for running.sab from /root/.sabnzbd/admin/running.sab
2011-03-20 17:03:41,751::INFO::[__init__:845] /root/.sabnzbd/admin/running.sab missing, trying old cache
2011-03-20 17:03:41,752::INFO::[__init__:848] /root/.sabnzbd/cache/running.sab missing
2011-03-20 17:03:41,752::INFO::[__init__:823] Saving data for running.sab in /root/.sabnzbd/admin/running.sab
2011-03-20 17:03:41,753::INFO::[__init__:842] Loading data for bookmarks.sab from /root/.sabnzbd/admin/bookmarks.sab
2011-03-20 17:03:41,753::INFO::[__init__:842] Loading data for rss_data.sab from /root/.sabnzbd/admin/rss_data.sab
2011-03-20 17:03:41,754::INFO::[__init__:842] Loading data for totals9.sab from /root/.sabnzbd/admin/totals9.sab
2011-03-20 17:03:41,754::INFO::[postproc:89] Loading postproc queue
2011-03-20 17:03:41,755::INFO::[__init__:842] Loading data for postproc1.sab from /root/.sabnzbd/admin/postproc1.sab
2011-03-20 17:03:41,755::INFO::[__init__:842] Loading data for queue9.sab from /root/.sabnzbd/admin/queue9.sab
2011-03-20 17:03:41,757::INFO::[__init__:842] Loading data for watched_data.sab from /root/.sabnzbd/admin/watched_data.sab
2011-03-20 17:03:41,758::INFO::[downloader:193] Resuming
2011-03-20 17:03:41,759::INFO::[__init__:283] All processes started
2011-03-20 17:03:41,759::INFO::[sabnzbdplus:326] Web dir is /usr/share/sabnzbdplus/interfaces/Classic
2011-03-20 17:03:41,768::INFO::[sabnzbdplus:1206] Starting sabnzbdplus-0.6.0Beta3
2011-03-20 17:03:41,770::INFO::[dirscanner:263] Dirscanner starting up
2011-03-20 17:03:41,771::INFO::[sabnzbdplus:436] _yenc module... found!
2011-03-20 17:03:41,772::INFO::[urlgrabber:74] URLGrabber starting up
2011-03-20 17:03:41,772::INFO::[sabnzbdplus:444] par2 binary... found (/usr/bin/par2)
2011-03-20 17:03:41,773::INFO::[sabnzbdplus:452] unrar binary... found (/usr/bin/unrar)
2011-03-20 17:03:41,773::INFO::[sabnzbdplus:457] unzip binary... found (/usr/bin/unzip)
2011-03-20 17:03:41,773::INFO::[sabnzbdplus:463] nice binary... found (/usr/bin/nice)
2011-03-20 17:03:41,774::INFO::[sabnzbdplus:467] ionice binary... found (/usr/bin/ionice)
2011-03-20 17:03:41,774::INFO::[sabnzbdplus:472] pyOpenSSL... found (True)
2011-03-20 17:03:41,775::INFO::[sabnzbdplus:1314] Starting web-interface on 0.0.0.0:8080
2011-03-20 17:03:41,777::INFO::[_cplogging:55] [20/Mar/2011:17:03:41] ENGINE Bus STARTING
2011-03-20 17:03:41,780::INFO::[_cplogging:55] [20/Mar/2011:17:03:41] ENGINE Started monitor thread '_TimeoutMonitor'.
2011-03-20 17:03:41,882::INFO::[_cplogging:55] [20/Mar/2011:17:03:41] ENGINE Serving on 0.0.0.0:8080
2011-03-20 17:03:41,883::INFO::[_cplogging:55] [20/Mar/2011:17:03:41] ENGINE Bus STARTED
Doesnt the sab setup UI suppose to come up? Also, there is no more Sabnzbplus file in the /etc/default for me to configure?
Re: Cant access SAB after restart
Posted: March 20th, 2011, 12:25 pm
by jcfp
I suspect the spaces in --server are the result of sloppiness when copying that output from the terminal to the forum. That log looks normal. A look at the output of ifconfig, netstat -lntep might help. You could try the actual ip instead of 0.0.0.0 to see if that makes a difference. No firewall in place? Didn't make any network related changes? Etc.
Also, there is no more Sabnzbplus file in the /etc/default for me to configure?
Careful, linux and unix are case sensitive. No caps in that file name.
And no, the wizard only shows when there's no proper sabnzbd.ini yet - that remains untouched even if you delete/reinstall the package.
Re: Cant access SAB after restart
Posted: March 20th, 2011, 2:32 pm
by jonneymendoza
jcfp wrote:
I suspect the spaces in --server are the result of sloppiness when copying that output from the terminal to the forum. That log looks normal. A look at the output of ifconfig, netstat -lntep might help. You could try the actual ip instead of 0.0.0.0 to see if that makes a difference. No firewall in place? Didn't make any network related changes? Etc.
Also, there is no more Sabnzbplus file in the /etc/default for me to configure?
Careful, linux and unix are case sensitive. No caps in that file name.
And no, the wizard only shows when there's no proper sabnzbd.ini yet - that remains untouched even if you delete/reinstall the package.
yea there is no etc/default/sabnzb even after i re installed it and run the setup. no sign of that file at all
So it should appear after i run the wizard?
Anyways i manage to get it running, i.e the wizard by removing the old .sabnzbd folder that was inside teh /root directory. after that i was able to run the wizard but after running the wizard, i launched the program again from putty and it presents me with the normal ui to see download history etc etc but when i click on say, download history, it complains how /history/ is not found.
Same goes if i try and access the config settings.
almost feel like giving up. reinstalled it again, no sign of /etc/default/sabnzbdplus and none of the links working like History etc etc as noted above, work.
Re: Cant access SAB after restart
Posted: March 20th, 2011, 3:41 pm
by sander
jonneymendoza wrote:
Hi. i can no longer access SAB remotely from a web browser after i rebooted my ubuntu server.
i can however access it via PUTTY using" sabznbdplus start" which launches the sab app from within the putty and gives me a ui for me thats similar to the web page. However, i simply cannot access this app on any of my machines using the web browser.
it keeps saying page not found yet the app is running fine and can be access via putty? i looked at my port forwarding and its fine. got port 8080 open and the local ip address is static and working.
any advice on what may have went wrong?
There are three 'levels' of access to SABnbzd:
1) access from the machine itself
2) access from other computers on the LAN
3) access from Internet (which will involve your modem port forwarding)
You have to start at 1:
if you use putty to access the Ubuntu machine, what happens when you use "lynx
http://localhost:8080/" (maybe you need to install lynx via "sudo apt-get install lynx")? Do you get a screen with content?
If so, find out the IP address of the ubuntu machine (which you probably use for putty) and then use "lynx http://:8080/" on the ubuntu machine. Do you get a screen with content?
Re: Cant access SAB after restart
Posted: March 21st, 2011, 5:29 am
by jonneymendoza
sander wrote:
jonneymendoza wrote:
Hi. i can no longer access SAB remotely from a web browser after i rebooted my ubuntu server.
i can however access it via PUTTY using" sabznbdplus start" which launches the sab app from within the putty and gives me a ui for me thats similar to the web page. However, i simply cannot access this app on any of my machines using the web browser.
it keeps saying page not found yet the app is running fine and can be access via putty? i looked at my port forwarding and its fine. got port 8080 open and the local ip address is static and working.
any advice on what may have went wrong?
There are three 'levels' of access to SABnbzd:
1) access from the machine itself
2) access from other computers on the LAN
3) access from Internet (which will involve your modem port forwarding)
You have to start at 1:
if you use putty to access the Ubuntu machine, what happens when you use "lynx
http://localhost:8080/" (maybe you need to install lynx via "sudo apt-get install lynx")? Do you get a screen with content?
If so, find out the IP address of the ubuntu machine (which you probably use for putty) and then use "lynx http://:8080/" on the ubuntu machine. Do you get a screen with content?
i have not done step 1 as i dont have a monitor attached to my ubuntu server pc but instead connect to it using putty from my main gaming pc via LAN. from this pc using putty only, i am able to launch the sab wizard and also launch the sab ui with the que, history list, config etc etc as presented on a typical web client showing SabNzbd.
there are two issues.
1. when i do a reinstall, there is no sabnzbd file under etc/default as described in various tutorials on how to set this up. this file i believe is crucial for running the software as a daemon by setting up the host and port but for some very strange reason, ever since i first removed it manually after i originally uninstalled SAB, it doesnt appear anymore there.
2. i cannot access this on a web browser at all. putty is fine but web browser is not even though both putty and my web browser contains same ip address for it.
3. because i cant even access it via LAN on a web browser, it is not accessible to the internet as well.
in regards to what happens when i type "lynx
http://localhost:8080/" it launches either the setup wizard(when i first installed it again) or the actual SabNzbd application ui.
The thing i do not understand is that why doesnt the sabnzbd file appear under etc/default as described from the guide? according to the guide, you install it using sudo apt-get install sabnzbdplus
the guide then says specifically to edit the etc/default/sabnzbplus file yet it doesnt exist?
If you want the program to be started as a service (i.e., in the background on system boot), you will need to edit /etc/default/sabnzbdplus and set the host to 0.0.0.0 and the port and user to the appropriate settings. Once configured correctly, you will be able to start and stop SABnzbd with the commands /etc/init.d/sabnzbdplus start and /etc/init.d/sabnzbdplus stop. Although for obvious reasons no browser is auto-started when running the program like this, the web interface is still available at the usual location of
http://localhost:8080/sabnzbd/ (or whatever other host and port you configured).
On a side note. when i came to the end of the setup wizard. the ip address it said i could access sab was 127.0.1.1 or localhost?
Now how can that be when on my router the dhcp is setup with a range from 192.168.0.2 and how come i am using 192.168.0.3 to access the ubuntu server pc via putty?
Re: Cant access SAB after restart
Posted: March 21st, 2011, 7:04 am
by sander
I have the feeling you jump back and forth between all kinds of methods. Could you please focus on the easy steps and checks, and tell the result of that? That way I can help you.
So:
use putty to logon
start sabnzbd. If it runs the wizard, fill it out.
then check if you can access sabnzbd succesfully via 'lynx
http://localhost:8080' and tell what you see. See the included screendump
Re: Cant access SAB after restart
Posted: March 21st, 2011, 7:11 am
by jonneymendoza
Yes thats exactly what i see via putty using lynx
http://localhost:8080
Re: Cant access SAB after restart
Posted: March 21st, 2011, 7:25 am
by sander
Good. That means SABnzbd is running.
Next step:
logon using putty
type 'ifconfig' to find the IP address of your Ubuntu server. It's probably something like 10.0.x.y or 192.168.a.b.
Post the IP address here (as a check)
then: still on the Ubuntu machine, try to access SABnzbd via that IP address, like "lynx
http://10.0.1.2:8080" (ATTENTION: this is an example. you should fill out your own IP address)
Does that work?
Re: Cant access SAB after restart
Posted: March 21st, 2011, 9:46 am
by jonneymendoza
sander wrote:
Good. That means SABnzbd is running.
Next step:
logon using putty
type 'ifconfig' to find the IP address of your Ubuntu server. It's probably something like 10.0.x.y or 192.168.a.b.
Post the IP address here (as a check)
then: still on the Ubuntu machine, try to access SABnzbd via that IP address, like "lynx
http://10.0.1.2:8080" (ATTENTION: this is an example. you should fill out your own IP address)
Does that work?
here we go:
eth0 Link encap:Ethernet HWaddr 00:50:8d:e5:61:74
inet addr:192.168.0.3 Bcast:192.168.0.255 Mask:255.255.255.0
inet6 addr: fe80::250:8dff:fee5:6174/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:289632 errors:0 dropped:0 overruns:0 frame:0
TX packets:848987 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:22142608 (22.1 MB) TX bytes:1226739714 (1.2 GB)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:988 errors:0 dropped:0 overruns:0 frame:0
TX packets:988 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:148180 (148.1 KB) TX bytes:148180 (148.1 KB)
i tried "lynx
http://192.168.0.3:8080" and i get "unable to connect to remote host"
Re: Cant access SAB after restart
Posted: March 21st, 2011, 9:58 am
by sander
jonneymendoza wrote:
here we go:
eth0 Link encap:Ethernet HWaddr 00:50:8d:e5:61:74
inet addr:192.168.0.3 Bcast:192.168.0.255 Mask:255.255.255.0
i tried "lynx
http://192.168.0.3:8080" and i get "unable to connect to remote host"
Clear: SABnzbd is not listening on the LAN-interface. That's the default setup during the wizard. So let's check: What is the output of "grep host ~/.sabnzbd/sabnzbd.ini" ? I think the first hit is "localhost" (and it should be 0.0.0.0 or :: )
Here's mine:
Code: Select all
sander@netbook:~$ grep host ~/.sabnzbd/sabnzbd.ini
host = ::
host = newszilla6.xs4all.nl
host = news.lightningusenet.com
sander@netbook:~$
Re: Cant access SAB after restart
Posted: March 21st, 2011, 11:04 am
by jonneymendoza
sander wrote:
jonneymendoza wrote:
here we go:
eth0 Link encap:Ethernet HWaddr 00:50:8d:e5:61:74
inet addr:192.168.0.3 Bcast:192.168.0.255 Mask:255.255.255.0
i tried "lynx
http://192.168.0.3:8080" and i get "unable to connect to remote host"
Clear: SABnzbd is not listening on the LAN-interface. That's the default setup during the wizard. So let's check: What is the output of "grep host ~/.sabnzbd/sabnzbd.ini" ? I think the first hit is "localhost" (and it should be 0.0.0.0 or :: )
Here's mine:
Code: Select all
sander@netbook:~$ grep host ~/.sabnzbd/sabnzbd.ini
host = ::
host = newszilla6.xs4all.nl
host = news.lightningusenet.com
sander@netbook:~$
here is the output:
host = 0.0.0.0
host = europe-ssl.newsdemon.com
Re: Cant access SAB after restart
Posted: March 21st, 2011, 11:22 am
by sander
jonneymendoza wrote:
host = 0.0.0.0
host = europe-ssl.newsdemon.com
Oh. Strange: 0.0.0.0 is good. Have you installed a firewall on your Ubuntu server? If so, can you disable it?
And: is there another sabnzbd.ini on your system? Check with "sudo updatedb ; locate sabnzbd.ini"