Page 1 of 1

Trickery with Windows HOSTS File

Posted: May 4th, 2011, 6:07 pm
by mryumyum
So, I know exactly what my problem is, but I need someone who knows what they're talking about to get to a solution.

I have some programs on my computer that need an edited Windows HOSTS file (C:\Windows\System32\drivers\etc\hosts) to work properly. Specifically, I added the line '0.0.0.0 localhost' to the list of other entries. Unfortunately this makes sabnzbd refuse to start, and I get this logfile [attached]. Removing the line lets sabnzbd start and run perfectly, but I would love to have my cake and eat it, too.

Is there anyway I can get sabnzbd to look at a different HOSTS file, or do something else to bypass the problem?

Thanks a lot to anyone who can give me some insight!

Re: Trickery with Windows HOSTS File

Posted: May 5th, 2011, 1:36 am
by shypike
0.0.0.0 is a special address, telling SABnzbd to listen on multiple IPs.
This is sabotaged by your hosts file.
If you don't need external access, just use localhost instead.
If you do need it, use an empty host address or the real (local) IP of your system.

Re: Trickery with Windows HOSTS File

Posted: May 5th, 2011, 9:07 pm
by mryumyum
Ok, I sort of understand what you mean, but I don't have a real good grasp on it. How would each of those solutions be reflected in the hosts file, and what does each of them allow to happen?

Re: Trickery with Windows HOSTS File

Posted: May 6th, 2011, 1:09 am
by shypike
No need to touch the hosts file.
Just change the sabnzbd.ini file before you start SABnzbd again.
Location: http://wiki.sabnzbd.org/configure-v2
Look for
    host = 0.0.0.0
and change it to
    host = localhost

Re: Trickery with Windows HOSTS File

Posted: May 6th, 2011, 1:33 am
by mryumyum
It seems that my sabnzbd.ini file already has the line 'host = localhost'.

So, if I leave the '0.0.0.0 localhost' line in my hosts file, sabnzbd still won't start. Also, I tried changing the line in my .ini file to 'host = 0.0.0.0" just as a test, and it didn't seem to work, either.

Re: Trickery with Windows HOSTS File

Posted: May 6th, 2011, 3:52 am
by shypike
Try:
host = 127.0.0.1

Re: Trickery with Windows HOSTS File

Posted: May 6th, 2011, 6:37 am
by mryumyum
Ah, Bingo! Thanks.

Interestingly, when I access the web interface through Chrome, it gives me a red 'https:'  in the address bar with a red slash through it. (It also gave me the red screen with the warning, but I clicked "continue anyway.") Not a big deal for me, but I thought I'd make note of it.

Anyway, thanks again. I guess that's why you're a "hero" member.

Re: Trickery with Windows HOSTS File

Posted: May 6th, 2011, 7:36 am
by shypike
mryumyum wrote: Chrome, it gives me a red 'https:'  in the address bar with a red slash through it. (It also gave me the red screen with the warning, but I clicked "continue anyway.")
Explained here:
http://wiki.sabnzbd.org/https
To make the communication between SABnzbd and your web browser private, you can enable HTTPS (secured HTTP). The purpose of a certificate is two-fold; one is to give you encrypted communication, the other is to authenticate the server. The certificate authority guarantees that you are actually talking to the website of your bank or similar service. Web browsers are very fussy about the authentication part, and by default will complain unless you buy your own certificate.

By default SABnzbd will create self signed certificates for you to use. These however will give browser warnings when you try to connect however it is usually easy to make an exception for these certificates.