Page 1 of 1

Problems with the Hostname parameter

Posted: June 19th, 2008, 9:57 am
by diamondsw
FYI, I'm running SABnzbdPlus for OS X 0.3.4 from BR41N.com.

I've had some problems with accessing the WebGUI, and it seems to be very peculiar listening rules in SABnzbd. It's running on a Mac Mini, IP 10.0.1.110 and local hostname "mini".

When the hostname field is cleared, other computers can access it fine, and the mini can access it if I connect to "mini:8080" or "10.0.1.110:8080". However, trying to connect to localhost or 127.0.0.1 fails. I've never seen a web server behave in such a fashion and refuse connections to localhost.

It gets even stranger if I specify "localhost" as the hostname. Then no one else can access the WebGUI, I can access it on the mini at "localhost:8080", but I CANNOT access it at "127.0.0.1:8080"! Only if I actually set the hostname to "127.0.0.1" will that work (and "localhost:8080" works as well).

For the time being I'm using "127.0.0.1" as the hostname parameter and proxying to it with Apache's mod_proxy. At least with Apache I can connect to in any normal fashion, but I do wonder why SABnzbd seems to listen to sockets in a "unique" fashion.

Re: Problems with the Hostname parameter

Posted: June 19th, 2008, 10:51 am
by shypike
In general, we do not support third-party OSX ports (like br41n's).

With SABnzbd you have three choices:
1) --server localhost:port, listens on localhost:port only
2a) --server hostname:port, listens on name:port only
2b) --server :port, like 2a
3) --server 0.0.0.0:port, listens on hostname:port and localhost:port

OSX (but also Vista) supports IPv6 and the problem that is that most IPv4/IPv6 systems are ambiguous
about what localhost is. It's mapped to either 127.0.0.1 (IPv4) or [::1] (IPv6).
These two addresses are different and have no relation.

BTW: it helps to read the documentation.

You may consider a more recent port:
http://forums.sabnzbd.org/index.php?topic=780.0

Re: Problems with the Hostname parameter

Posted: June 19th, 2008, 10:59 am
by switch
Nothing in that behaviour is ambiguous. Use the host 0.0.0.0 if you wish to listen on multiple interfaces (so local ip and localhost both respond).

Re: Problems with the Hostname parameter

Posted: June 19th, 2008, 11:47 am
by shypike
You still have the difference between 127.0.0.1 and [::1].
So, if you tell SABnzbd to use localhost, you cannot assume that 127.0.0.1 will work, you may need to use [::1].

Re: Problems with the Hostname parameter

Posted: June 19th, 2008, 12:25 pm
by diamondsw
switch wrote: Nothing in that behaviour is ambiguous. Use the host 0.0.0.0 if you wish to listen on multiple interfaces (so local ip and localhost both respond).
Ah - that did the trick. My apologies, I didn't recall seeing that in the documentation, but it does the trick. Every method of accessing the server now works as expected.

Thank you all - this has completely revolutionized my use of newsgroups. :)