sajingeo / rietveld

Automatically exported from code.google.com/p/rietveld
Apache License 2.0
0 stars 0 forks source link

upload.py doesn't work behind a proxy #113

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Use upload.py behind a proxy

What is the expected output? What do you see instead?
upload.py throws exceptions
Traceback (most recent call last):

File "C:\pikachu\testcaseeditorworkspace\com.googlecode.fiteditor\upload.py
",
line 1387, in <module>
    main()

File "C:\pikachu\testcaseeditorworkspace\com.googlecode.fiteditor\upload.py
",
line 1379, in main
    RealMain(sys.argv)

File "C:\pikachu\testcaseeditorworkspace\com.googlecode.fiteditor\upload.py
",
line 1347, in RealMain
    response_body = rpc_server.Send("/upload", body, content_type=ctype)

File "C:\pikachu\testcaseeditorworkspace\com.googlecode.fiteditor\upload.py
",
line 311, in Send
    self._Authenticate()

File "C:\pikachu\testcaseeditorworkspace\com.googlecode.fiteditor\upload.py
",
line 349, in _Authenticate
    super(HttpRpcServer, self)._Authenticate()

File "C:\pikachu\testcaseeditorworkspace\com.googlecode.fiteditor\upload.py
",
line 257, in _Authenticate
    auth_token = self._GetAuthToken(credentials[0], credentials[1])

File "C:\pikachu\testcaseeditorworkspace\com.googlecode.fiteditor\upload.py
",
line 201, in _GetAuthToken
    response = self.opener.open(req)
  File "C:\Python25\lib\urllib2.py", line 381, in open
    response = self._open(req, data)
  File "C:\Python25\lib\urllib2.py", line 399, in _open
    '_open', req)
  File "C:\Python25\lib\urllib2.py", line 360, in _call_chain
    result = func(*args)
  File "C:\Python25\lib\urllib2.py", line 1115, in https_open
    return self.do_open(httplib.HTTPSConnection, req)
  File "C:\Python25\lib\urllib2.py", line 1082, in do_open
    raise URLError(err)
urllib2.URLError: <urlopen error (10061, 'Connection refused')>

What version of the product are you using? On what operating system?
Python 2.5

Please provide any additional information below.
I beleve this is the issue comes from python urlib2. Please take a look at 
http://bugs.python.org/issue1424152

Original issue reported on code.google.com by topikachu on 11 May 2009 at 10:12

GoogleCodeExporter commented 9 years ago
Have you seen this thread:
http://groups.google.de/group/codereview-discuss/browse_thread/thread/a8d1d2db79
387b72/6feebbe896bc96ae

Someone reported a similar problem there, but we couldn't figure out a working
solution. Maybe it works for you...

Original comment by albrecht.andi on 11 May 2009 at 10:23

GoogleCodeExporter commented 9 years ago
Not a solution, but you can use proxychains as a workaround...

http://proxychains.sourceforge.net/

Original comment by matt.fowles on 15 Mar 2010 at 6:38

GoogleCodeExporter commented 9 years ago
upload.py respects HTTP_PROXY environment variable, as such this issue should 
be closed.

Original comment by maruel@chromium.org on 30 Sep 2010 at 4:29

GoogleCodeExporter commented 9 years ago
We still need to document how to work through the proxy, because it's not 
evident.

Original comment by techtonik@gmail.com on 30 Sep 2010 at 5:31

GoogleCodeExporter commented 9 years ago
Isn't it up to the environment/OS settings to provide a proper proxy 
configuration? See how ProxyHandler gets those settings: 
http://docs.python.org/library/urllib2.html#urllib2.ProxyHandler 

Original comment by albrecht.andi on 30 Sep 2010 at 8:08

GoogleCodeExporter commented 9 years ago
No problem, but we need at least mention somewhere that upload.py uses system 
proxy configuration, so that this information is searchable when this issue is 
closed.

Original comment by techtonik@gmail.com on 30 Sep 2010 at 9:32

GoogleCodeExporter commented 9 years ago
I've added a FAQ page in the wiki. Let's collect such things there before 
bloating upload.py --help. We can move it the a more prominent place at any 
time :)

Original comment by albrecht.andi on 1 Oct 2010 at 9:45