urllib2.URLError: <urlopen error [Errno 10060]

3,203 views
Skip to first unread message

Andy

unread,
Sep 2, 2011, 12:14:01 AM9/2/11
to coderevie...@googlegroups.com
Hi all,

Rietveld is great!  When deployed in GoogleApps, we get the following error from upload.py when using our in-house SVN repo (behind a firewall, with no public (authenticated) URL available (yet, though we could probably get one if needed)), using Slik SVN client version (given the svn bug with TortoiseSVN):

C:\SlikSvn\bin>svn --version
svn, version 1.6.17-SlikSvn-tag-1.6.17@1130896-WIN32 (SlikSvn/1.6.17) WIN32
   compiled Jun  3 2011, 07:33:44

Here is the error:

**********************
  File "C:\Python27\lib\urllib2.py", line 1174, in do_open
    raise URLError(err)
urllib2.URLError: <urlopen error [Errno 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond>
**********************

We used the "--server=", "--email=", "--rev=x:y", and "--noisy" arguments.

Does upload.pl require at least one Repository including it's URL to be set in the "Repositories and Branches" section of the web application?  I apologize, I am reaching to understand how this part of the application works, and tried to find this answer in the documentation.  i.e., does Rietveld need to communicate with the SVN repo directly?  So far I assumed all of the information Rietveld needs is the SVN working directory (or upload.py can get what is needed from the SVN repo (also behind our firewall).

This process works well when using a different SVN repo (though with Rietveld also deployed in GoogleApps) which does have a public (authenticated) URL, which we set in the "Repositories and Branches" section of the web application.

Thanks again for your help in the past.  Any assistance you could provide would be greatly appreciated.  We are very excited about Rietveld and plan to use this system for many good things.

Here is the full trace:

C:\Python27\python ..\..\upload.py  --server=http://code.{GoogleAppsDomain}/ --email=andy@{GoogleAppsDomain} --rev=31:32 --noisy
2011-09-01 22:33:10 INFO upload.py:692 Running ['hg', 'root']
2011-09-01 22:33:10 INFO upload.py:1886 Guessed VCS = Subversion
2011-09-01 22:33:10 INFO upload.py:692 Running ['svn', 'info']
2011-09-01 22:33:10 INFO upload.py:928 Guessed base = svn://{SVNrepoPath}
2011-09-01 22:33:10 INFO upload.py:692 Running ['svn', 'status', '--ignore-exter
nals']
2011-09-01 22:33:11 INFO upload.py:692 Running ['svn', 'diff', '-r', '31:32']
2011-09-01 22:33:13 INFO upload.py:950 Index: oas_query_vx.sh
2011-09-01 22:33:13 INFO upload.py:692 Running ['svn', 'list', '-r', '31', '.']

2011-09-01 22:33:14 INFO upload.py:692 Running ['svn', 'list', '-r', '32', '.']

2011-09-01 22:33:15 INFO upload.py:692 Running ['svn', 'propget', 'svn:mime-type
', 'svn://{SVNrepoPath}//oas_query_vx.sh@31']
2011-09-01 22:33:16 INFO upload.py:692 Running ['svn', 'cat', 'svn://{SVNrepoPath}//oas_query_vx.sh@31']
2011-09-01 22:33:17 INFO upload.py:692 Running ['svn', 'propget', 'svn:keywords'
, 'svn://{SVNrepoPath}//oas_q
uery_vx.sh@31']
Upload server: http://code.{GoogleAppsDomain}/ (change with -s/--server)
New issue subject: 31to32
2011-09-01 22:33:55 INFO upload.py:205 Server: http://code.{GoogleAppsDomain}
/
2011-09-01 22:33:55 INFO upload.py:2138 Removed username from base URL
Password for andy@{GoogleAppsDomain}:
2011-09-01 22:34:02 DEBUG upload.py:217 Creating request for: 'https://www.googl
Passwd={password}&source=rietveld-codereview-upload&accountType=HOSTED&Email=
andy%40{GoogleAppsDomain}&service=ah
Traceback (most recent call last):
  File "..\..\upload.py", line 2234, in <module>
    main()
  File "..\..\upload.py", line 2226, in main
    RealMain(sys.argv)
  File "..\..\upload.py", line 2191, in RealMain
    response_body = rpc_server.Send("/upload", body, content_type=ctype)
  File "..\..\upload.py", line 375, in Send
    self._Authenticate()
  File "..\..\upload.py", line 421, in _Authenticate
    super(HttpRpcServer, self)._Authenticate()
  File "..\..\upload.py", line 310, in _Authenticate
    auth_token = self._GetAuthToken(credentials[0], credentials[1])
  File "..\..\upload.py", line 254, in _GetAuthToken
    response = self.opener.open(req)
  File "C:\Python27\lib\urllib2.py", line 394, in open
    response = self._open(req, data)
  File "C:\Python27\lib\urllib2.py", line 412, in _open
    '_open', req)
  File "C:\Python27\lib\urllib2.py", line 372, in _call_chain
    result = func(*args)
  File "C:\Python27\lib\urllib2.py", line 1207, in https_open
    return self.do_open(httplib.HTTPSConnection, req)
  File "C:\Python27\lib\urllib2.py", line 1174, in do_open
    raise URLError(err)
urllib2.URLError: <urlopen error [Errno 10060] A connection attempt failed becau
se the connected party did not properly respond after a period of time, or estab
lished connection failed because connected host has failed to respond>

Best,
Andy




anatoly techtonik

unread,
Sep 2, 2011, 1:16:10 AM9/2/11
to coderevie...@googlegroups.com
Hi Andrew,

Rietveld doesn't require to register your repository for uploading
changes. In fact failed connection has nothing to do with repository
access. In your case upload.py failed to connect to Google
authentication service and that's most likely because of your
firewall. You can try to set HTTP_PROXY environment variable and see
if it helps.
--
anatoly t.

> --
> You received this message because you are subscribed to the Google Groups
> "codereview-discuss" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/codereview-discuss/-/QIjS0OXc7F0J.
> To post to this group, send email to coderevie...@googlegroups.com.
> To unsubscribe from this group, send email to
> codereview-disc...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/codereview-discuss?hl=en.
>

Andy

unread,
Sep 15, 2011, 6:33:10 PM9/15/11
to coderevie...@googlegroups.com
Hi Anatoly,

Thanks for the explanation, makes sense.  It turns out this works well on Linux though fails on Windows (from the same subnet, so the Linux machine gets through the firewall without any special settings).  I tried setting the DOS environment variable HTTP_PROXY to what I know for sure is our proxy server, though it still fails.  What's interesting is that the error message trace is exactly the same if I put in the wrong password.  As you say, upload.py is not even able to contact the Google authentication service in this case on Windows?  Any other ideas?  I would just use Linux instead, though there is another unrelated error there holding me back, and many of the developers will prefer Windows.

Thanks again very much, and best regards,
Andy

Andi Albrecht

unread,
Sep 16, 2011, 2:03:55 AM9/16/11
to coderevie...@googlegroups.com
Hi Andy,

I've seen some issues on a colleagues Windows machine too, but I can't
tell if it was related to upload.py or to some other piece in our
setup. The problem was that Windows decided to block an outgoing
request from one of the components. IIRC a protocol was not allowed by
the Windows machine. But it seems that a https request is causing the
problems in your case, so I'm not sure if it was a unrelated issue
I've seen here...

-Andi

> Thanks again very much, and best regards,
> Andy
> (414) 212-5372
>

> --
> You received this message because you are subscribed to the Google Groups
> "codereview-discuss" group.
> To view this discussion on the web visit

> https://groups.google.com/d/msg/codereview-discuss/-/tcM9mwOfpoMJ.

anatoly techtonik

unread,
Sep 16, 2011, 4:04:00 AM9/16/11
to coderevie...@googlegroups.com
Hi Andy,

1. Can you check that Python is able to find the proxy correctly?

import urllib2
urllib2.getproxies()

2. If it is ok, can you use sniffer such as Wireshark to see if
request is actually being sent and where to?
--
anatoly t.

> --
> You received this message because you are subscribed to the Google Groups
> "codereview-discuss" group.
> To view this discussion on the web visit

> https://groups.google.com/d/msg/codereview-discuss/-/tcM9mwOfpoMJ.

Reply all
Reply to author
Forward
0 new messages