Trickery with Windows HOSTS File

Get help with all aspects of SABnzbd
Forum rules
Help us help you:
  • Are you using the latest stable version of SABnzbd? Downloads page.
  • Tell us what system you run SABnzbd on.
  • Adhere to the forum rules.
  • Do you experience problems during downloading?
    Check your connection in Status and Interface settings window.
    Use Test Server in Config > Servers.
    We will probably ask you to do a test using only basic settings.
  • Do you experience problems during repair or unpacking?
    Enable +Debug logging in the Status and Interface settings window and share the relevant parts of the log here using [ code ] sections.
Post Reply
mryumyum
Newbie
Newbie
Posts: 7
Joined: May 4th, 2011, 5:57 pm

Trickery with Windows HOSTS File

Post 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!
User avatar
shypike
Administrator
Administrator
Posts: 19773
Joined: January 18th, 2008, 12:49 pm

Re: Trickery with Windows HOSTS File

Post 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.
mryumyum
Newbie
Newbie
Posts: 7
Joined: May 4th, 2011, 5:57 pm

Re: Trickery with Windows HOSTS File

Post 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?
User avatar
shypike
Administrator
Administrator
Posts: 19773
Joined: January 18th, 2008, 12:49 pm

Re: Trickery with Windows HOSTS File

Post 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
mryumyum
Newbie
Newbie
Posts: 7
Joined: May 4th, 2011, 5:57 pm

Re: Trickery with Windows HOSTS File

Post 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.
User avatar
shypike
Administrator
Administrator
Posts: 19773
Joined: January 18th, 2008, 12:49 pm

Re: Trickery with Windows HOSTS File

Post by shypike »

Try:
host = 127.0.0.1
mryumyum
Newbie
Newbie
Posts: 7
Joined: May 4th, 2011, 5:57 pm

Re: Trickery with Windows HOSTS File

Post 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.
User avatar
shypike
Administrator
Administrator
Posts: 19773
Joined: January 18th, 2008, 12:49 pm

Re: Trickery with Windows HOSTS File

Post 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.
Post Reply