curl_httpclient 2.3 - IOError with socks5 proxy #538

Closed
artyomboyko opened this Issue Jun 16, 2012 · 7 comments

Comments

Projects
None yet
6 participants

I'm using latest curl_httpclient but i still get this error. I'm using curl + socks5 proxies. I've added this string to curl_httpclient source code:

...
curl.setopt(pycurl.PROXYTYPE, pycurl.PROXYTYPE_SOCKS5)
...

Traceback (most recent call last):
File "/usr/local/lib/python2.7/site-packages/tornado-2.3-py2.7.egg/tornado/curl_httpclient.py", line 106, in _handle_socket
self.io_loop.update_handler(fd, ioloop_event)
File "/usr/local/lib/python2.7/site-packages/tornado-2.3-py2.7.egg/tornado/ioloop.py", line 205, in update_handler
self._impl.modify(fd, events | self.ERROR)
IOError: [Errno 2] No such file or directory

Is this because of SOCKS5 or this is tornado bug ?
I've tried on CentOS, FreeBSD, Ubuntu, everywhere i get an error.

Owner

bdarnell commented Jun 17, 2012

Hmm, it could be a bug in libcurl when using socks5 and the asynchronous interface. It looks like there have been a few of those in the past. (http://curl.haxx.se/mail/tracker-2009-05/0002.html, http://sourceforge.net/tracker/?func=detail&atid=100976&aid=3033966&group_id=976)

derelk commented Aug 1, 2012

I'm seeing this exact issue rather frequently. I am using async Curl, but no proxies whatsoever.

without any proxy i get the same error in every system i run it.

derelk commented Aug 8, 2012

I upgraded my curl from 7.22.0 to 7.27.0 about a week ago and haven't seen this error since. Fingers crossed.

edit: Never mind, it's back. Still occurs with the latest version of Curl.

knutole commented Dec 12, 2012

+1

Contributor

rhettg commented Mar 5, 2013

I'm seeing this same issue, no socks proxy involved so the title to this issue should probably be changed. I am using async curl and epoll.

This looks related to #32, however, it's so old i don't even see that code still existing.

Previously, if update_handler failed with ENOENT, we'd add the handler again. I don't know if that's still a reasonable fix or if this is some other bug where the fd is registered with http client, (self._fds), but epoll no longer thinks it knows about it.

@bdarnell bdarnell closed this in 94198fa May 25, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment