gaierror 2 (failure in name resolution) (Python)

542 views
Skip to first unread message

Tristan Timmermans

unread,
Jun 9, 2015, 11:04:19 AM6/9/15
to google-a...@googlegroups.com
Hello to anyone interested,

For about 1 hour on the 9th of June starting around 15h (CET) we got several gaierrors on the Socket API. I know this api isn't properly supported yet but it is the only way to use client side certificates at the moment so I'm just asking anyway. Hosted in the EU if that helps.

The traceback originated here (rest of the traceback is our own code which look rather not relevant):

   sock = socket.create_connection((self.host, self.port), self.timeout)

  File "/base/data/home/runtimes/python27/python27_dist/lib/python2.7/socket.py", line 551, in create_connection

    for res in getaddrinfo(host, port, 0, SOCK_STREAM):

  File "/base/data/home/runtimes/python27/python27_lib/versions/1/google/appengine/api/remote_socket/_remote_socket.py", line 339, in getaddrinfo

    canonical=(flags & AI_CANONNAME))

  File "/base/data/home/runtimes/python27/python27_lib/versions/1/google/appengine/api/remote_socket/_remote_socket.py", line 212, in _Resolve

    canon, aliases, addresses = _ResolveName(name, families)

  File "/base/data/home/runtimes/python27/python27_lib/versions/1/google/appengine/api/remote_socket/_remote_socket.py", line 232, in _ResolveName

    raise _SystemExceptionFromAppError(e)

gaierror: [Errno 2] temporary failure in name resolution


And is a typical result of a) insufficient sockets available on linux machines (which should result in error 3 but hey, I'm not picky) or b) the connection was dropped before a request would be made.,which could indicate a timeout issue but I would expect a timeout error and no gaierror.


Does anyone have any idea what it could be? Is it our own code? Is it some underlying problem? 


The gaierrors I know are EAI_* errors from the socket layer but since we cannot check those it might just as well be a configuration problem on our side.



Thank you for your consideration,


Tristan


Nick (Cloud Platform Support)

unread,
Jun 9, 2015, 2:23:28 PM6/9/15
to google-a...@googlegroups.com, tristan.t...@ubiqu.eu
It's difficult to tell without examining the code whether it could be a misconfiguration on your side or not. Passing an invalid hostname would produce this error, although as you point out, it could be a timeout reaching the nameserver, or even an issue in the error-code implementation for the Sockets API, such that a sockets-exhaustion problem reports as a DNS problem.

It's not customary to give 1-1 support in public forums, and if you'd like someone to look into the logs and code of your app specifically, you should purchase a support package. However, if you think the issue is related to the platform itself, I'd highly recommend opening a public issue tracker issue with relevant information (such as what you're doing when this error occurs, any other information you can provide), and it will be triaged based on the severity of the issue and the number of people who have starred it (combined with how new it is).

Tristan Timmermans

unread,
Jun 10, 2015, 3:26:37 AM6/10/15
to google-a...@googlegroups.com, tristan.t...@ubiqu.eu
Dear Nick,

Thank you for the reply. We have support so I'll first check with them and afterwards file a public issue if the error is not cause by us. I posted it here since it is not an obvious error and someone might have already found a solution.

Yours,

Tristan

Nick (Cloud Platform Support)

unread,
Jun 10, 2015, 1:53:43 PM6/10/15
to google-a...@googlegroups.com, tristan.t...@ubiqu.eu
Hi Tristan,

I hope that you manage to find a solution or explanation through contacting support or making an issue tracker thread. 

I encourage you to post to either stackoverflow or the public issue tracker in future if you encounter a technical issue (the choice of forum depending on whether it seems to be a platform-specific issue or your own code, with an understanding that it's not always possible to know without further investigation). 

As I said, the groups forums are meant for more general discussion which doesn't touch on a specific technical issue.

Best of luck,

Nick
Reply all
Reply to author
Forward
0 new messages