tornado CurlHTTPClient raise CurlError: HTTP 599: name lookup timed out

172 views
Skip to first unread message

Peng Dai

unread,
Mar 5, 2015, 4:11:04 AM3/5/15
to python-...@googlegroups.com
I write a function use tornaod AsyncHTTPClient to request another url, 
I use CurlHTTPClient for speed. I write a testcase for this. but I always raise CurlError.

what does this mean?

Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/tornado/testing.py", line 118, in __call__
    result = self.orig_method(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/tornado/testing.py", line 494, in post_coroutine
    timeout=timeout)
  File "/usr/local/lib/python2.7/dist-packages/tornado/ioloop.py", line 418, in run_sync
    return future_cell[0].result()
  File "/usr/local/lib/python2.7/dist-packages/tornado/concurrent.py", line 109, in result
    raise_exc_info(self._exc_info)
  File "/usr/local/lib/python2.7/dist-packages/tornado/gen.py", line 631, in run
    yielded = self.gen.throw(*sys.exc_info())
  File "/home/daipeng/projects/next_chat/src/tests/fts_easemob_client.py", line 125, in test_fts_ok
    token = yield ease_client.get_token()
  File "/usr/local/lib/python2.7/dist-packages/tornado/gen.py", line 628, in run
    value = future.result()
  File "/usr/local/lib/python2.7/dist-packages/tornado/concurrent.py", line 109, in result
    raise_exc_info(self._exc_info)
  File "/usr/local/lib/python2.7/dist-packages/tornado/gen.py", line 631, in run
    yielded = self.gen.throw(*sys.exc_info())
  File "/home/daipeng/projects/next_chat/src/nchat/easemob_client.py", line 275, in get_token
    ease_token = yield self.request_token()
  File "/usr/local/lib/python2.7/dist-packages/tornado/gen.py", line 628, in run
    value = future.result()
  File "/usr/local/lib/python2.7/dist-packages/tornado/concurrent.py", line 109, in result
    raise_exc_info(self._exc_info)
  File "/usr/local/lib/python2.7/dist-packages/tornado/gen.py", line 631, in run
    yielded = self.gen.throw(*sys.exc_info())
  File "/home/daipeng/projects/next_chat/src/nchat/easemob_client.py", line 312, in request_token
    response = yield self.async_client.fetch(req)
  File "/usr/local/lib/python2.7/dist-packages/tornado/gen.py", line 628, in run
    value = future.result()
  File "/usr/local/lib/python2.7/dist-packages/tornado/concurrent.py", line 111, in result
    raise self._exception
CurlError: HTTP 599: name lookup timed out

Ben Darnell

unread,
Mar 5, 2015, 8:42:29 PM3/5/15
to Tornado Mailing List
On Thu, Mar 5, 2015 at 4:11 AM, Peng Dai <daipen...@gmail.com> wrote:
I write a function use tornaod AsyncHTTPClient to request another url, 
I use CurlHTTPClient for speed. I write a testcase for this. but I always raise CurlError.

what does this mean?

It means that resolving the DNS hostname to an IP address took longer than it should. I'm not sure whether this is subject to the default 20-second timeout or if there is a separate shorter timeout for it. It could be a networking problem anywhere between you and the dns server of the site you're connecting to, or it could be something interfering with the IOLoop. Hard to say from just one stack trace. It might also make a difference whether your installation of libcurl is compiled with c-ares or not (I don't think c-ares support is common. Last time I looked c-ares was better for ipv4 but didn't support ipv6 at all).

-Ben
 

--
You received this message because you are subscribed to the Google Groups "Tornado Web Server" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python-tornad...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Peng Dai

unread,
Mar 6, 2015, 4:49:45 AM3/6/15
to python-...@googlegroups.com, b...@bendarnell.com
yes, the testcase works now without any change on the code. It seems like the networks was not good at that day.
Reply all
Reply to author
Forward
0 new messages