Page 2 of 3

Re: WebGUI not reachable

Posted: May 6th, 2009, 3:33 pm
by Basta
I have only the cherrypy package that was installed together with python 2.5 (py25-cherrypy-old-2.3.0,1). This is the outcome of the test you described:

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:~# nc -v localhost 8080
nc: connect to localhost port 8080 (tcp) failed: Connection refused
nc: connect to localhost port 8080 (tcp) failed: Connection refused
Connection to localhost 8080 port [tcp/*] succeeded!

basnas:~# nc -v localhost 4444
nc: connect to localhost port 4444 (tcp) failed: Connection refused
nc: connect to localhost port 4444 (tcp) failed: Connection refused
nc: connect to localhost port 4444 (tcp) failed: Connection refused
So it must be in cherrypy? Is there a reason that the old 2.3.0 version of cherrypy was installed instead of the current 3.1.2?

Re: WebGUI not reachable

Posted: May 7th, 2009, 1:01 am
by sander
Basta wrote: I have only the cherrypy package that was installed together with python 2.5 (py25-cherrypy-old-2.3.0,1). This is the outcome of the test you described:

So it must be in cherrypy? Is there a reason that the old 2.3.0 version of cherrypy was installed instead of the current 3.1.2?
I don't know; I'm not a programmer and I know about nothing about perrychy and python. I even don't whether my 2-line program is correct. It just shows a different behaviour on your and my *x system.
FWIW Your cherrypy 2.3 with python 2.5 doesn't sound old or bad. But I don't know how to check which cherrypy is used on my system (it could even be 2.3) ...

Maybe a subject for a cherrypy forum?

Re: WebGUI not reachable

Posted: May 7th, 2009, 6:40 am
by shypike
This is getting confusing.

Have you looked at the FreeNAS tutorial on this forum?
http://forums.sabnzbd.org/index.php?topic=2067.0

SABnzbd comes with its own CherryPy, independant of the CherryPy installed.

Assuming that 192.168.1.2:8080 is the IP address/port of the NAS.
Start SABnzbd with host/port parameters 192.168.1.2 and 8080.

You can check from the NAS itself whether SABnzbd is running:

Code: Select all

wget http://192.168.1.2:8080/sabnzbd/api?mode=version&output=xml
You should get a valid XML file with the version in it.
If this succeeds, SABnzbd is listening properly.

When (after checking the above) outside access doesn't work, then you have a network
problem unrelated to SABnzbd.

I see in your logging that SABnzbd tries to start the web browser.
This is not very useful on a NAS system (I assume that you can access it only through telnet/putty).
Use the -b0 commandline option once to stop this.

Re: WebGUI not reachable

Posted: May 11th, 2009, 5:53 am
by Basta
From the NAS itself:
wget "http://192.168.1.2:8080/sabnzbd/api?mod ... output=xml" results in Connection refused
wget "http://localhost:8080/sabnzbd/api?mode= ... output=xml" results in a XML file with version 0.4.8 in it.

So yes it must be a network problem but I think it is somehow related to sabnzbd, because running lighttpd on 8080 works without any problems.

Regarding the -b0 option you have a good point. I will correct this in the start command.

Still I don't have a clue why sabnzbd only listens to localhost and not it's own IP address.

My /etc/hosts file looks like this:

Code: Select all

::1 localhost localhost.local
127.0.0.1 localhost localhost.local
192.168.1.2 localhost
Here are the wget results for 192.168.1.2 and localhost:

Code: Select all

basnas:~# wget "http://192.168.1.2:8080/sabnzbd/api?mode=version&output=xml"
--2009-05-11 12:36:52--  http://192.168.1.2:8080/sabnzbd/api?mode=version&output=xml
Connecting to 192.168.1.2:8080... failed: Connection refused.

Code: Select all

basnas:~# wget "http://localhost:8080/sabnzbd/api?mode=version&output=xml"
--2009-05-11 12:37:05--  http://localhost:8080/sabnzbd/api?mode=version&output=xml
Resolving localhost... 127.0.0.1, 192.168.1.2, ::1
Connecting to localhost|127.0.0.1|:8080... failed: Connection refused.
Connecting to localhost|192.168.1.2|:8080... failed: Connection refused.
Connecting to localhost|::1|:8080... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/xml]
Saving to: `api?mode=version&output=xml'
[ <=>                                   ] 88          --.-K/s   in 0s      
2009-05-11 12:37:05 (2.95 MB/s) - `api?mode=version&output=xml' saved [88]

Re: WebGUI not reachable

Posted: May 11th, 2009, 6:58 am
by switch
Did you try launching with

Code: Select all

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

Re: WebGUI not reachable

Posted: May 11th, 2009, 7:15 am
by sander
Basta wrote:
Still I don't have a clue why sabnzbd only listens to localhost and not it's own IP address.

Me neither. But I think it was an important step to find out that a two-liner cherrypy script showed the same behaviour. So to me that means it's cherrypy related, and not SABnzbd nor SABnzbd-config related ...

Re: WebGUI not reachable

Posted: May 11th, 2009, 7:25 am
by Basta
switch wrote: Did you try launching with

Code: Select all

/usr/local/bin/SABnzbd.py -s :8080
Yes and I added -b0 as shypike suggested
sander wrote: Me neither. But I think it was an important step to find out that a two-liner cherrypy script showed the same behaviour. So to me that means it's cherrypy related ...
For me that indeed narrowed down the problem to cherrypy. Strange is that there are people that have FreeNAS and SABnzb running. I'm at the point of giving it up.

Re: WebGUI not reachable

Posted: May 30th, 2009, 5:01 pm
by wyd1
I have the same problem here :

http://forums.sabnzbd.org/index.php?topic=1597.15

SABnzbd runs well on windows, Mac OS X, OpenSolaris... But it doesn't like FreeBSD  :(

Re: WebGUI not reachable

Posted: May 31st, 2009, 4:04 am
by shypike
Try the actual numeric IP address.
Many Linux systems fail to translate the hostname to an IP address.

Re: WebGUI not reachable

Posted: May 31st, 2009, 5:11 am
by Basta
Yeah I tried lots of things. I am using numerical op. I gave up on it.

Re: WebGUI not reachable

Posted: May 31st, 2009, 6:18 am
by shypike
Basta wrote: Yeah I tried lots of things. I am using numerical op. I gave up on it.
Too bad. BTW: it does run on DesktopBSD 1.6 (which is based on freeBSD).

Re: WebGUI not reachable

Posted: May 31st, 2009, 6:36 am
by wyd1
shypike wrote:
Basta wrote: Yeah I tried lots of things. I am using numerical op. I gave up on it.
Too bad. BTW: it does run on DesktopBSD 1.6 (which is based on freeBSD).
That's strange. I've edited my SABnzbd.ini (Host 192.168.1.88, Port 8085), run SABnzbd with python /usr/local/bin/SABnzbd.py -b0 -s 192.168.1.88:8085 &, but it still doesn't work :(

Code: Select all

NAS# python /usr/local/bin/SABnzbd.py -b0 -s 192.168.1.88:8085 &
[1] 1081
NAS# 2009-05-31 13:31:24,376::INFO::--------------------------------
2009-05-31 13:31:24,377::INFO::SABnzbd.py-0.4.11 (rev=2517)
2009-05-31 13:31:24,377::INFO::Platform = posix
2009-05-31 13:31:24,377::INFO::Python-version = 2.5.2 (r252:60911, Dec  9 2008, 14:09:26) 
[GCC 4.2.1 20070719  [FreeBSD]]
2009-05-31 13:31:24,427::INFO::[sabnzbd] Loading data for rss_data.sab from /root/.sabnzbd/cache/rss_data.sab
2009-05-31 13:31:24,430::INFO::[sabnzbd] Loading data for bytes7.sab from /root/.sabnzbd/cache/bytes7.sab
2009-05-31 13:31:24,433::INFO::[sabnzbd] Loading data for queue7.sab from /root/.sabnzbd/cache/queue7.sab
2009-05-31 13:31:24,434::WARNING::[downloader] No active primary servers defined, will not download!
2009-05-31 13:31:24,435::INFO::[sabnzbd] Loading data for watched_data.sab from /root/.sabnzbd/cache/watched_data.sab
2009-05-31 13:31:24,445::INFO::All processes started
2009-05-31 13:31:24,446::INFO::_yenc module... found!
2009-05-31 13:31:24,447::INFO::celementtree module... found!
2009-05-31 13:31:24,447::INFO::par2 binary... found (/usr/local/bin/par2)
2009-05-31 13:31:24,447::INFO::unrar binary... found (/usr/local/bin/unrar)
2009-05-31 13:31:24,447::INFO::unzip binary... found (/usr/local/bin/unzip)
2009-05-31 13:31:24,448::INFO::nice binary... found (/usr/bin/nice)
2009-05-31 13:31:24,450::INFO::ionice binary... NOT found!
2009-05-31 13:31:24,450::INFO::pyOpenSSL... found (True)
2009-05-31 13:31:24,509::INFO::Web dir is /usr/local/share/sabnzbdplus/interfaces/Default
2009-05-31 13:31:24,545::INFO::Starting SABnzbd.py-0.4.11
2009-05-31 13:31:24,545::INFO::[nzbqueue] Saving queue
2009-05-31 13:31:24,546::INFO::[sabnzbd] Saving data for queue7.sab in /root/.sabnzbd/cache/queue7.sab
2009-05-31 13:31:24,547::INFO::[sabnzbd] Saving data for bytes7.sab in /root/.sabnzbd/cache/bytes7.sab
2009-05-31 13:31:24,547::INFO::[sabnzbd] Saving data for rss_data.sab in /root/.sabnzbd/cache/rss_data.sab
2009-05-31 13:31:24,548::INFO::[sabnzbd] Saving data for watched_data.sab in /root/.sabnzbd/cache/watched_data.sab
2009-05-31 13:31:24,553::INFO::[sabnzbd.misc] Dirscanner starting up
2009-05-31 13:31:24,555::INFO::[sabnzbd.misc] URLGrabber starting up
2009-05-31 13:31:24,557::INFO::Starting web-interface on :8085
31/May/2009:13:31:24 CONFIG INFO Server parameters:
31/May/2009:13:31:24 CONFIG INFO   server.environment: production
31/May/2009:13:31:24 CONFIG INFO   server.log_to_screen: True
31/May/2009:13:31:24 CONFIG INFO   server.log_file: /root/.sabnzbd/logs/cherrypy.log
31/May/2009:13:31:24 CONFIG INFO   server.log_tracebacks: True
31/May/2009:13:31:24 CONFIG INFO   server.log_request_headers: False
31/May/2009:13:31:24 CONFIG INFO   server.protocol_version: HTTP/1.0
31/May/2009:13:31:24 CONFIG INFO   server.socket_host: 
31/May/2009:13:31:24 CONFIG INFO   server.socket_port: 8085
31/May/2009:13:31:24 CONFIG INFO   server.socket_file: 
31/May/2009:13:31:24 CONFIG INFO   server.reverse_dns: False
31/May/2009:13:31:24 CONFIG INFO   server.socket_queue_size: 5
31/May/2009:13:31:24 CONFIG INFO   server.thread_pool: 10
31/May/2009:13:31:24 HTTP INFO Serving HTTP on http://0.0.0.0:8085/

Code: Select all

NAS# netstat -a | grep 8085
tcp6       0      0 *.8085                 *.*                    LISTEN

Re: WebGUI not reachable

Posted: May 31st, 2009, 6:51 am
by shypike
You should not start it with the '&' appended.
This is the correct way to start it.

Code: Select all

python /usr/local/bin/SABnzbd.py -b0 -s 192.168.1.88:8085 -d -f PATH-OF-INI-FILE 
It really requires the -d parameter to run properly.

Re: WebGUI not reachable

Posted: May 31st, 2009, 6:57 am
by wyd1
shypike wrote: You should not start it with the '&' appended.
This is the correct way to start it.

Code: Select all

python /usr/local/bin/SABnzbd.py -b0 -s 192.168.1.88:8085 -d -f PATH-OF-INI-FILE 
It really requires the -d parameter to run properly.
Ok, like you said :

NAS# python /usr/local/bin/SABnzbd.py -b0 -s 192.168.1.88:8085 -d -f ~/.sabnzbd/SABnzbd.ini

Yet it runs as a deamon, right? But i still can't connect with my browser (from another machine)

Re: WebGUI not reachable

Posted: July 23rd, 2009, 9:19 am
by jivey
After upgrading to FreeNAS 0.69.2 I had the same problem.  You see tcp6 *:8080 in you sockets and no tcp4 bindings, because it is binding to the loop back nic only.  Telnet/Putty into the NAS server and type 'ping freenas'.  If you don't get your IP adress of your box or 127.0.0.1 then you need to modify your hosts file.  Go to the WebGui  Network|Hosts and add freenas and your IP address and freenas.local and your IP address.  I have not tried this and would be a better solution if it works.  Enter 172.0.0.1 (the loop back address) instead of your IP address.

This worked for me.  Hope it will save you some fustration b/c I was pulling my hair out.  ;)