URLError: <urlopen error timed out> Proxy Problem

Bug #363338 reported by Andrew Manson (real_ate)
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
RescueTime Linux Uploader
Fix Committed
Undecided
Dirk T

Bug Description

Hi,

I am making a presumption that this bug has something related to proxy, or more specifically an authenticated proxy.

What the error message is:
Traceback (most recent call last):
URLError: <urlopen error timed out>
Connection is down. Pretending we succeeded in logging in.

After doing a bit of testing myself and a lot of research I have narrowed down the problem to the fact that urllib2 cannot actually make https connections through a http proxy, some problem with the CONNECT call. I wrote a little test program that first *successfully* connected through the proxy to a http:// site and then I changed it to do a simple get of https://api.rescuetime.com/api/handshake and it timed out.

I would like to know what your opinion of the following two solutions are, they seem to have a lot of links to them from lots of user forums. I don't actually know anything about python so I can't really evaluate their effect on your code, after all I did just learn today so I could fix this bug ;)

http://code.activestate.com/recipes/456195/
http://msnp.sourceforge.net/tmp/eb0kGb/net.py

I can put a little more time into testing these if you can tell me if its worth doing.

Thank you

Revision history for this message
Budiwijaya (budiwijaya) wrote :

From my stand point of view, It's worth.
Personally I'm want to use this application, but I'm having difficulties with proxy.

I'm testing on ubuntu 9.04.

after I export http_proxy and https_proxy, I tested with wget. wget connect to internet with proxy, so I guess the http_proxy setting is OK.
then I tried to execute rescutime_linux_uploader, fill the username and password, then check the connection with netstat,
I see a python program tried to connect to a https port,

--snip--
tcp 0 1 192.168.25.5:57010 64.34.167.26:443 SYN_SENT 9538/python
--snip--

here's my http_proxy and https_proxy:

budiw@carbon:~$ export | grep http
declare -x http_proxy="http://proxy.example.co.id:8080/"
declare -x https_proxy="https://proxy.example.co.id:8080/"

I replace my office domain with example.

--
Thank you.

Dirk T (miriup)
Changed in rescuetime-linux-uploader:
assignee: nobody → Dirk T (miriup)
status: New → Fix Committed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.