Page 1 of 3

WebGUI not reachable

Posted: May 1st, 2009, 7:56 am
by Basta
I can't get the SABnzbd WebGUI running.  I have installed SABNzbd 0.4.8 on a FreeBSD 7.2 system (running freeNAS and followed these instructions http://forums.sabnzbd.org/index.php?topic=2067.0). I can start SABnzbd on port 8080 but I can't reach the WebGUI.

Code: Select all

basnas:~# /usr/local/bin/SABnzbd.py -s 192.168.1.2:8080
2009-04-22 09:15:00,301::INFO::--------------------------------
2009-04-22 09:15:00,303::INFO::SABnzbd.py-0.4.8 (rev=2378)
2009-04-22 09:15:00,304::INFO::Platform = posix
2009-04-22 09:15:00,305::INFO::Python-version = 2.5.4 (r254:67916, Apr  9 2009, 21:11:39) 
[GCC 4.2.1 20070719  [FreeBSD]]
2009-04-22 09:15:00,311::INFO::[sabnzbd] Loading data for rss_data.sab from /usr/local/bin/cache/rss_data.sab
2009-04-22 09:15:00,317::INFO::[sabnzbd] Loading data for bytes7.sab from /usr/local/bin/cache/bytes7.sab
2009-04-22 09:15:00,319::INFO::[sabnzbd] Loading data for queue7.sab from /usr/local/bin/cache/queue7.sab
2009-04-22 09:15:00,322::WARNING::[downloader] No active primary servers defined, will not download!
2009-04-22 09:15:00,323::INFO::All processes started
2009-04-22 09:15:00,328::INFO::_yenc module... NOT found!
2009-04-22 09:15:00,329::INFO::celementtree module... found!
2009-04-22 09:15:00,329::INFO::par2 binary... found (/usr/local/bin/par2)
2009-04-22 09:15:00,330::INFO::unrar binary... found (/usr/local/bin/unrar)
2009-04-22 09:15:00,331::WARNING::unzip binary... NOT found!
2009-04-22 09:15:00,331::INFO::nice binary... found (/usr/bin/nice)
2009-04-22 09:15:00,332::INFO::ionice binary... NOT found!
2009-04-22 09:15:00,332::INFO::pyOpenSSL... found (True)
2009-04-22 09:15:00,463::INFO::Web dir is /usr/local/share/sabnzbdplus/interfaces/Default
2009-04-22 09:15:00,471::INFO::Starting SABnzbd.py-0.4.8
2009-04-22 09:15:00,473::INFO::[nzbqueue] Saving queue
2009-04-22 09:15:00,474::INFO::[sabnzbd] Saving data for queue7.sab in /usr/local/bin/cache/queue7.sab
2009-04-22 09:15:00,475::INFO::[sabnzbd] Saving data for bytes7.sab in /usr/local/bin/cache/bytes7.sab
2009-04-22 09:15:00,476::INFO::[sabnzbd] Saving data for rss_data.sab in /usr/local/bin/cache/rss_data.sab
2009-04-22 09:15:00,549::INFO::[sabnzbd.misc] URLGrabber starting up
2009-04-22 09:15:00,569::INFO::Starting web-interface on :8080
22/Apr/2009:09:15:00 CONFIG INFO Server parameters:
22/Apr/2009:09:15:01 CONFIG INFO   server.environment: production
22/Apr/2009:09:15:01 CONFIG INFO   server.log_to_screen: True
22/Apr/2009:09:15:01 CONFIG INFO   server.log_file: /usr/local/bin/logs/cherrypy.log
22/Apr/2009:09:15:01 CONFIG INFO   server.log_tracebacks: True
22/Apr/2009:09:15:01 CONFIG INFO   server.log_request_headers: False
22/Apr/2009:09:15:01 CONFIG INFO   server.protocol_version: HTTP/1.0
22/Apr/2009:09:15:01 CONFIG INFO   server.socket_host: 
22/Apr/2009:09:15:01 CONFIG INFO   server.socket_port: 8080
22/Apr/2009:09:15:01 CONFIG INFO   server.socket_file: 
22/Apr/2009:09:15:01 CONFIG INFO   server.reverse_dns: False
22/Apr/2009:09:15:01 CONFIG INFO   server.socket_queue_size: 5
22/Apr/2009:09:15:01 CONFIG INFO   server.thread_pool: 10
22/Apr/2009:09:15:01 HTTP INFO Serving HTTP on http://0.0.0.0:8080/
On my desktop PC I try to open the WebGUI on the address http://192.168.1.2:8080/sabnzbd/ but cannot connect to the FreeNAS server.

In order to exclude network problems I used Netcat on my FreeNAS to listen to port 8080 and I see the HTTP request from my PC:

Code: Select all

basnas:~# nc -l 8080
GET /sabnzbd/ HTTP/1.1
Host: 192.168.1.2:8080
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-GB; rv:1.9.0.8) Gecko/2009032609 Firefox/3.0.8 (.NET CLR 3.5.30729)
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-gb,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Connection: keep-alive
Aslo I can run a webserver on 8080 and access that without problems. Anyone a clue why I can't access the WebGUI?

Please help me ... Bas

Re: WebGUI not reachable

Posted: May 1st, 2009, 8:46 am
by sander
on the machine running SABnzbd, can you "telnet localhost 8080"?

And: why are you using the parameter "-s 192.168.1.2:8080" in the startup of SABnzbd? Why not leave it out?

Re: WebGUI not reachable

Posted: May 3rd, 2009, 7:19 pm
by switch
Try launching sabnzbd like the following:

Code: Select all

/usr/local/bin/SABnzbd.py -s 0.0.0.0:8080
or

Code: Select all

/usr/local/bin/SABnzbd.py -s :8080
This only needs to be run this way once. Use -d -f ~/.sabnzbd/sabnzbd.ini in your init.d script as the tutorial suggests

Re: WebGUI not reachable

Posted: May 4th, 2009, 12:30 pm
by Basta
Can you "telnet localhost 8080"?
No, because telnet s not installed (it's a FreeNAS distribution which is based on a very minimal FreeBSD). What do you want to test with it? Is there an alternative?
Try launching sabnzbd like the following:

Code: Select all

/usr/local/bin/SABnzbd.py -s 0.0.0.0:8080
Did it but the WebGUI is still not reachable. Here is the complete output:

Code: Select all

~# /usr/local/bin/SABnzbd.py -s 0.0.0.0:8080
2009-05-04 19:22:50,865::INFO::--------------------------------
2009-05-04 19:22:50,867::INFO::SABnzbd.py-0.4.8 (rev=2378)
2009-05-04 19:22:50,868::INFO::Platform = posix
2009-05-04 19:22:50,869::INFO::Python-version = 2.5.4 (r254:67916, Apr  9 2009, 21:11:39) 
[GCC 4.2.1 20070719  [FreeBSD]]
2009-05-04 19:22:50,876::INFO::[sabnzbd] Loading data for rss_data.sab from /root/.sabnzbd/cache/rss_data.sab
2009-05-04 19:22:50,882::INFO::[sabnzbd] Loading data for bytes7.sab from /root/.sabnzbd/cache/bytes7.sab
2009-05-04 19:22:50,884::INFO::[sabnzbd] Loading data for queue7.sab from /root/.sabnzbd/cache/queue7.sab
2009-05-04 19:22:50,887::WARNING::[downloader] No active primary servers defined, will not download!
2009-05-04 19:22:50,888::INFO::All processes started
2009-05-04 19:22:50,893::INFO::_yenc module... found!
2009-05-04 19:22:50,894::INFO::celementtree module... found!
2009-05-04 19:22:50,895::INFO::par2 binary... found (/usr/local/bin/par2)
2009-05-04 19:22:50,895::INFO::unrar binary... found (/usr/local/bin/unrar)
2009-05-04 19:22:50,896::INFO::unzip binary... found (/usr/local/bin/unzip)
2009-05-04 19:22:50,897::INFO::nice binary... found (/usr/bin/nice)
2009-05-04 19:22:50,897::INFO::ionice binary... NOT found!
2009-05-04 19:22:50,898::INFO::pyOpenSSL... found (True)
2009-05-04 19:22:51,063::INFO::Web dir is /usr/local/share/sabnzbdplus/interfaces/Default
2009-05-04 19:22:51,075::INFO::Starting SABnzbd.py-0.4.8
2009-05-04 19:22:51,076::INFO::[nzbqueue] Saving queue
2009-05-04 19:22:51,077::INFO::[sabnzbd] Saving data for queue7.sab in /root/.sabnzbd/cache/queue7.sab
2009-05-04 19:22:51,079::INFO::[sabnzbd] Saving data for bytes7.sab in /root/.sabnzbd/cache/bytes7.sab
2009-05-04 19:22:51,080::INFO::[sabnzbd] Saving data for rss_data.sab in /root/.sabnzbd/cache/rss_data.sab
2009-05-04 19:22:51,149::INFO::[sabnzbd.misc] URLGrabber starting up
2009-05-04 19:22:51,169::INFO::Starting web-interface on :8080
04/May/2009:19:22:51 CONFIG INFO Server parameters:
04/May/2009:19:22:51 CONFIG INFO   server.environment: production
04/May/2009:19:22:51 CONFIG INFO   server.log_to_screen: True
04/May/2009:19:22:51 CONFIG INFO   server.log_file: /root/.sabnzbd/logs/cherrypy.log
04/May/2009:19:22:51 CONFIG INFO   server.log_tracebacks: True
04/May/2009:19:22:51 CONFIG INFO   server.log_request_headers: False
04/May/2009:19:22:51 CONFIG INFO   server.protocol_version: HTTP/1.0
04/May/2009:19:22:51 CONFIG INFO   server.socket_host: 
04/May/2009:19:22:51 CONFIG INFO   server.socket_port: 8080
04/May/2009:19:22:51 CONFIG INFO   server.socket_file: 
04/May/2009:19:22:51 CONFIG INFO   server.reverse_dns: False
04/May/2009:19:22:51 CONFIG INFO   server.socket_queue_size: 5
04/May/2009:19:22:51 CONFIG INFO   server.thread_pool: 10
04/May/2009:19:22:51 HTTP INFO Serving HTTP on http://0.0.0.0:8080/
2009-05-04 19:22:51,485::INFO::Lauching browser with http://localhost:8080/sabnzbd
I'm getting crazy. Why doesn't it work?

Re: WebGUI not reachable

Posted: May 4th, 2009, 1:38 pm
by sander
Can you "telnet localhost 8080"?
No, because telnet s not installed (it's a FreeNAS distribution which is based on a very minimal FreeBSD). What do you want to test with it? Is there an alternative?
The purpose of 'telnet localhost 8080' is to test that you can locally reach the SABnzbd server. This is to make sure no IP address mismatch or blocking firewall is involved.


Alternative: "nc localhost 8080".
First run this command when SAB is *not* running. The nc-connect should get refused.
Then start SAB and try "nc localhost 8080" again. It should then get connected (however, strangely enough, SAB won't say anything). Type "GET /" and then , and the connection should close.

Here's my example:
First I try to connect to 4444 (on which nothing is running), which gets correctly refused.
Then I connect to the SAB port 8080, which is accepted (by SAB) and quickly type "GET /" plus , which then closes the connection.
Finally I show that if I type nothing, SAB closes the connection after 10 seconds.

Code: Select all

ubuntu@ubuntu:~$ nc localhost 4444
localhost [127.0.0.1] 4444 (?) : Connection refused
ubuntu@ubuntu:~$ nc localhost 8080
GET /
ubuntu@ubuntu:~$ time nc localhost 8080

real	0m10.017s
user	0m0.000s
sys	0m0.008s
ubuntu@ubuntu:~$

Re: WebGUI not reachable

Posted: May 4th, 2009, 2:15 pm
by Basta
This is what I get:

Code: Select all

basnas:~# nc localhost 8080
GET /

Code: Select all

Traceback (most recent call last):
  File "/usr/local/lib/python2.5/site-packages/cherrypy/_cpwsgiserver.py", line 234, in run
    request.parse_request()
  File "/usr/local/lib/python2.5/site-packages/cherrypy/_cpwsgi.py", line 169, in parse_request
    _cpwsgiserver.HTTPRequest.parse_request(self)
  File "/usr/local/lib/python2.5/site-packages/cherrypy/_cpwsgiserver.py", line 81, in parse_request
    method, path, req_protocol = request_line.strip().split(" ", 2)
ValueError: need more than 2 values to unpack
But I don't understand the error.

Re: WebGUI not reachable

Posted: May 4th, 2009, 2:28 pm
by sander
And, like I asked, what do you get if SAB is *not* running and you try the "nc localhost 8080"?

Re: WebGUI not reachable

Posted: May 4th, 2009, 2:34 pm
by Basta
Sorry, it exits without reporting anything.

Re: WebGUI not reachable

Posted: May 4th, 2009, 3:08 pm
by sander
Basta wrote: Sorry, it exits without reporting anything.
When? Please post the output here.

And make you test with SAB running, and without SAB running.

Re: WebGUI not reachable

Posted: May 4th, 2009, 3:19 pm
by Basta
I'll be a bit more precise. The netcat exits without anything when SABnzbd is not running. I added the -v option to get more info. The complete log is below:

Code: Select all

basnas:~# nc -v localhost 8080
nc: connect to localhost port 8080 (tcp) failed: Connection refused
nc: connect to localhost port 8080 (tcp) failed: Connection refused
basnas:~# /usr/local/bin/SABnzbd.py -d -s 0.0.0.0:8080
basnas:~# nc -v localhost 8080
nc: connect to localhost port 8080 (tcp) failed: Connection refused
Connection to localhost 8080 port [tcp/*] succeeded!
GET /
basnas:~#

Re: WebGUI not reachable

Posted: May 4th, 2009, 4:45 pm
by sander
OK, that seems OK. Next step: instead of 'localhost', use the LAN IP address of your NAS. So something like:

Code: Select all

nc 192.168.12.34 8080

to see if that works.

Re: WebGUI not reachable

Posted: May 6th, 2009, 8:57 am
by Basta
No that doesn't work:

Code: Select all

basnas:~# nc -v 192.168.1.2 8080
nc: connect to 192.168.1.2 port 8080 (tcp) failed: Connection refused
basnas:~# /usr/local/bin/SABnzbd.py -d -s 0.0.0.0:8080
basnas:~# nc -v 192.168.1.2 8080
nc: connect to 192.168.1.2 port 8080 (tcp) failed: Connection refused
What does that tell me?

Re: WebGUI not reachable

Posted: May 6th, 2009, 10:07 am
by sander
Basta wrote: No that doesn't work:

Code: Select all

basnas:~# nc -v 192.168.1.2 8080
nc: connect to 192.168.1.2 port 8080 (tcp) failed: Connection refused
basnas:~# /usr/local/bin/SABnzbd.py -d -s 0.0.0.0:8080
basnas:~# nc -v 192.168.1.2 8080
nc: connect to 192.168.1.2 port 8080 (tcp) failed: Connection refused
What does that tell me?
It tells your SAB *is* listening on localhost, but *not* on the IP address 192.168.1.2.

Causes could be:
* your NAS has another IP address, not 192.168.1.2. Check with "ifconfig"
* SAB is not listerning on non-local interface.s Check that you have filled out "0.0.0.0" in the ini and check via SAB's GUI.
* your NAS has a firewall blocking LAN traffic tot port 8080
* your NAS is not listening on 192.168.1.2.
* ...

Re: WebGUI not reachable

Posted: May 6th, 2009, 1:04 pm
by Basta
* your NAS has another IP address, not 192.168.1.2. Check with "ifconfig"
No. IP is really 192.168.1.2 see also below teh outcome of ifconfig

Code: Select all

basnas:~# ifconfig
re0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
	options=389b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,WOL_UCAST,WOL_MCAST,WOL_MAGIC>
	ether 00:1c:c0:b5:6e:2e
	inet 192.168.1.2 netmask 0xffffff00 broadcast 192.168.1.255
	media: Ethernet autoselect (1000baseTX <full-duplex>)
	status: active
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
	inet6 fe80::1%lo0 prefixlen 64 scopeid 0x2 
	inet6 ::1 prefixlen 128 
	inet 127.0.0.1 netmask 0xff000000
* SAB is not listening on non-local interface.s Check that you have filled out "0.0.0.0" in the ini and check via SAB's GUI.
No. Tried both host 0.0.0.0 and 192.168.1.2 in ini file and in both cases I cannot access the GUI
* your NAS has a firewall blocking LAN traffic tot port 8080
No. If I use netcat on my NAS to listen to port 8080 I see requests from outside my NAS coming in:

Code: Select all

basnas:~# nc -l 8080
GET /sabnzbd/ HTTP/1.1
Host: 192.168.1.2:8080
User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.0.10) Gecko/2009042315 Firefox/3.0.10
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Connection: keep-alive
Cookie: show_filter=true; filter=all; show_inspector=false
Pragma: no-cache
Cache-Control: no-cache
* your NAS is not listening on 192.168.1.2.
Yes but why not ...

Re: WebGUI not reachable

Posted: May 6th, 2009, 3:11 pm
by sander
Well. Difficult stuff. Maybe it's in the cherrypy you use? To find out, create a file testthis.py with contents:

Code: Select all

import cherrypy
cherrypy.server.start()
Then run it with "python testthis.py". That should startup the cherrypy webserver.
Then  connect to localhost 8080, and LAN IP address (192.168.1.2 in your case) 8080 again.

Disclaimer: I'm not sure which version of cherrypy is used; the cherrypy of the OS, or the suff SAB's own subdirectory ...

Both work for me on my Ubuntu with the 2-liner above:

Code: Select all

ubuntu@ubuntu:~$ nc 192.168.1.36 8080

ubuntu@ubuntu:~$ nc localhost 8080

ubuntu@ubuntu:~$ nc localhost 4444
localhost [127.0.0.1] 4444 (?) : Connection refused
ubuntu@ubuntu:~$