Page 1 of 1

Crash on opening: socket.gaierror: (11004, 'getaddrinfo failed')

Posted: December 27th, 2010, 1:29 pm
by zenmechanic
Version: (Ex: 0.5.6 Final)
OS: (Win 7 x64)
Install-type:  Windows Installer
Skin (if applicable): NA
Firewall Software: Win 7 Firewall
Are you using IPV6? N
Is the issue reproducible? Y

Contents of logfile:

Traceback (most recent call last):
  File "SABnzbd.py", line 1257, in
  File "SABnzbd.py", line 882, in main
  File "cherrypy\process\servers.pyo", line 228, in check_port
socket.gaierror: (11004, 'getaddrinfo failed')

Cause:

DNS Client service disabled.

Reason:

Service not needed unless on a Windows domain network.

Resolution: enable DNS client service.

Notes:

This is a temporary solution to get sab working, there is no reason that it should be dependant on the DNS client service. No other windows software is (save Windows Local DNS resultion if using a local windows DNS server).

I disable the DNS client service because I use a custom hosts file for added security see here for details http://www.mvps.org/winhelp2002/hosts.htm .. With a hosts file this large the DNS client service should be disabled otherwise you will have large memory usage for the DNS client service.

Re: Crash on opening: socket.gaierror: (11004, 'getaddrinfo failed')

Posted: December 31st, 2010, 6:34 am
by shypike
Likely a problem in the Python runtime libraries.
There are more issues with that and it will be looked at for a future release.
Thanks for the tip!

Re: Crash on opening: socket.gaierror: (11004, 'getaddrinfo failed')

Posted: January 4th, 2011, 6:40 pm
by shypike
There is a side-effect to disabling the DNS Client service:
the system no longer registers its own DNS name.
I suspect the the Python DNS code fails on that aspect.
Which IP or hostname do you set for SABnzbd's web server?

Re: Crash on opening: socket.gaierror: (11004, 'getaddrinfo failed')

Posted: February 2nd, 2011, 6:54 pm
by Ash77
I encounter the same error despite the DNS Client Service being enabled. Restarting the service still results in the same error.

Same SABnzbd+, windows versions.

Re: Crash on opening: socket.gaierror: (11004, 'getaddrinfo failed')

Posted: February 3rd, 2011, 6:50 am
by shypike
There can be many more DNS problems.
Always check first whether nslookup actually resolves the address.

Re: Crash on opening: socket.gaierror: (11004, 'getaddrinfo failed')

Posted: February 3rd, 2011, 7:18 am
by Ash77
shypike wrote: There can be many more DNS problems.
Always check first whether nslookup actually resolves the address.
Which address would I check for, I receive this error immediately after installation.

Re: Crash on opening: socket.gaierror: (11004, 'getaddrinfo failed')

Posted: February 3rd, 2011, 7:57 am
by shypike
Is this before the web browser is started to show you the Wizard?
If so, your system has problems resolving the address "localhost".
This means there's something seriously wrong with it.
You can try to start SABnzbd like this:
WindowsKey-R and then type:
"c:\program files\SABnzbd\SABnzbd.exe" --server 127.0.0.1:8080
Press Enter.

Re: Crash on opening: socket.gaierror: (11004, 'getaddrinfo failed')

Posted: February 3rd, 2011, 9:02 am
by Ash77
shypike wrote: Is this before the web browser is started to show you the Wizard?
If so, your system has problems resolving the address "localhost".
It was prior to the web browser opening.  Checked resolution to localhost and it failed.  Corrupt LMHOSTS file.  Now resolved, thank you.

Re: Crash on opening: socket.gaierror: (11004, 'getaddrinfo failed')

Posted: February 3rd, 2011, 10:51 am
by shypike
Good that it's solved.
Even so, I'll check if it's possible to improve reporting of such issues.