Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to fix socket.gaierror: (11004, 'getaddrinfo failed') error in GAE?

I'm using Aptana and GAE. When I run GAE launcher or run a server in Aptana 3, I get this error... I've downloaded the lastest version of GAE and still doesnt work...

Traceback (most recent call last):
  File "C:\google_appengine\dev_appserver.py", line 76, in <module>
    run_file(__file__, globals())
  File "C:\google_appengine\dev_appserver.py", line 72, in run_file
    execfile(script_path, globals_)
  File "C:\google_appengine\google\appengine\tools\dev_appserver_main.py", line 665, in <module>
    sys.exit(main(sys.argv))
  File "C:\google_appengine\google\appengine\tools\dev_appserver_main.py", line 629, in main
    static_caching=static_caching)
  File "C:\google_appengine\google\appengine\tools\dev_appserver.py", line 4818, in CreateServer
    server = HTTPServerWithScheduler((serve_address, port), handler_class)
  File "C:\google_appengine\google\appengine\tools\dev_appserver.py", line 4844, in __init__
    request_handler_class)
  File "C:\Python25\lib\SocketServer.py", line 330, in __init__
    self.server_bind()
  File "C:\Python25\lib\BaseHTTPServer.py", line 101, in server_bind
    SocketServer.TCPServer.server_bind(self)
  File "C:\Python25\lib\SocketServer.py", line 341, in server_bind
    self.socket.bind(self.server_address)
  File "<string>", line 1, in bind
socket.gaierror: (11004, 'getaddrinfo failed')
Exception exceptions.AttributeError: '_shutdown' in <module 'threading' from 'C:\Python25\lib\threading.pyc'> ignored
2011-05-30 21:57:24 (Process exited with code 1)
like image 981
Totty.js Avatar asked May 30 '11 21:05

Totty.js


People also ask

How do I fix Getaddrinfo failure?

If you are using corporate laptop and if you did not connect to Direct Access or office VPN then the above block will throw error. All you need to do is to connect to your org VPN and then execute your python script.

What is socket gaierror in python?

exception socket. gaierror : This block catches errors during the search for information about IP addresses, for example when we are using the getaddrinfo() and getnameinfo() methods.

How do I fix error 11001 in Python?

Solution 1: Clear the DNS cache Right click on the Host icon in the tray area and select Restart Host. Wait 10-20 seconds until the Host restarts and connects back to the intermediate server.


2 Answers

FIXED! after days looking for this problem: I just deleted this line "0.0.0.0 localhost " from my hosts file located in "C:\Windows\System32\drivers\etc" thanks anyway!!

like image 65
Totty.js Avatar answered Oct 10 '22 03:10

Totty.js


Had same problem here, I had to add

127.0.0.1 myhostname

and

::1 myhostname

to /etc/hosts

like image 33
C-Base Avatar answered Oct 10 '22 02:10

C-Base