URLError: <urlopen error >

Smith, DAVID dsmith at ti.com
Tue Oct 18 15:24:05 UTC 2011


> -----Original Message-----
> From: Augie Fackler [mailto:durin42 at gmail.com]
> Sent: Tuesday, October 18, 2011 10:21 AM
> To: Smith, DAVID
> Cc: mercurial at selenic.com
> Subject: Re: URLError: <urlopen error >
> 
> 
> On Oct 18, 2011, at 10:53 AM, Smith, DAVID wrote:
> 
> >> -----Original Message-----
> >> From: Augie Fackler [mailto:durin42 at gmail.com]
> >> Sent: Monday, October 17, 2011 8:32 PM
> >> To: Smith, DAVID
> >> Cc: mercurial at selenic.com
> >> Subject: Re: URLError: <urlopen error >
> >>
> >>
> >> On Oct 17, 2011, at 6:15 PM, Smith, DAVID wrote:
> >>
> >>> Hi,
> >>>
> >>> We're having a weird problem when doing "hg incoming -b branch" or
> >>> "hg
> >> pull -b branch" against a repo on a Windows IIS7 server.  The server
> >> is in the US, and the client is in Bangalore, India.  The error only
> >> happens when incoming/pull are run from India to the US.  Other US
> >> clients can use incoming/pull without any errors against the same
> >> repo.  I think the server is configured okay, since other clients are
> >> working (around 20 or so), with a variety of repos, all using SSL with
> a self-signed cert.
> >>>
> >>> The server is running Mercurial 1.9.3.  The client is WinXP with
> >> TortoiseHg 2.1.4 w/ Mercurial 1.9.3 also.  The following traceback
> >> occurs:
> >>>
> >>> using https://dlp_cm/dlpc/master/dlp_composer
> >>> sending capabilities command
> >>> using auth.dlp_cm.* for authentication dlp_cm certificate matched
> >>> fingerprint
> >>> 52:32:92:84:f6:45:d4:54:da:71:86:57:38:48:de:36:e6:06:7e:28
> >>> Keyring URL: https://dlp_cm
> >>> Auth data set in .hg/hgrc. Url:
> >>> https://dlp_cm/dlpc/master/dlp_composer, user: toolbld, passwd:
> >>> ******** using auth.dlp_cm.* for authentication dlp_cm certificate
> >>> matched fingerprint
> >>> 52:32:92:84:f6:45:d4:54:da:71:86:57:38:48:de:36:e6:06:7e:28
> >>> comparing with https://dlp_cm/dlpc/master/dlp_composer
> >>> sending branchmap command
> >>> using auth.dlp_cm.* for authentication Keyring URL: https://dlp_cm
> >>> Cached auth data found. Url:
> >>> https://dlp_cm/dlpc/master/dlp_composer,
> >>> user: toolbld, passwd: ******** using auth.dlp_cm.* for
> >>> authentication dlp_cm certificate matched fingerprint
> >>> 52:32:92:84:f6:45:d4:54:da:71:86:57:38:48:de:36:e6:06:7e:28
> >>> sending lookup command
> >>> using auth.dlp_cm.* for authentication Keyring URL: https://dlp_cm
> >>> Cached auth data found. Url:
> >>> https://dlp_cm/dlpc/master/dlp_composer,
> >>> user: toolbld, passwd: ******** using auth.dlp_cm.* for
> >>> authentication dlp_cm certificate matched fingerprint
> >>> 52:32:92:84:f6:45:d4:54:da:71:86:57:38:48:de:36:e6:06:7e:28
> >>> query 1; heads
> >>> sending batch command
> >>> using auth.dlp_cm.* for authentication Keyring URL: https://dlp_cm
> >>> Cached auth data found. Url:
> >>> https://dlp_cm/dlpc/master/dlp_composer,
> >>> user: toolbld, passwd: ******** using auth.dlp_cm.* for
> >>> authentication dlp_cm certificate matched fingerprint
> >>> 52:32:92:84:f6:45:d4:54:da:71:86:57:38:48:de:36:e6:06:7e:28
> >>> searching for changes
> >>> all local heads known remotely
> >>> sending getbundle command
> >>> using auth.dlp_cm.* for authentication Keyring URL: https://dlp_cm
> >>> Cached auth data found. Url:
> >>> https://dlp_cm/dlpc/master/dlp_composer,
> >>> user: toolbld, passwd: ******** using auth.dlp_cm.* for
> >>> authentication dlp_cm certificate matched fingerprint
> >>> 52:32:92:84:f6:45:d4:54:da:71:86:57:38:48:de:36:e6:06:7e:28
> >>> Traceback (most recent call last):
> >>> File "mercurial\dispatch.pyo", line 87, in _runcatch  File
> >>> "mercurial\dispatch.pyo", line 688, in _dispatch  File
> >>> "mercurial\dispatch.pyo", line 463, in runcommand  File
> >>> "mercurial\extensions.pyo", line 182, in wrap  File
> >>> "hgext\color.pyo", line 368, in colorcmd  File
> >>> "mercurial\dispatch.pyo", line 742, in _runcommand  File
> >>> "mercurial\dispatch.pyo", line 696, in checkargs File
> >>> "mercurial\dispatch.pyo", line 685, in <lambda>  File
> >>> "mercurial\util.pyo", line 389, in check  File
> >>> "mercurial\extensions.pyo", line 137, in wrap  File
> >>> "mercurial\util.pyo", line 389, in check  File "hgext\mq.pyo", line
> >>> 3218, in mqcommand  File "mercurial\util.pyo", line 389, in check
> >>> File "mercurial\extensions.pyo", line 137, in wrap  File
> >>> "mercurial\util.pyo", line 389, in check  File "hgext\graphlog.pyo",
> >>> line 397, in graph  File "mercurial\util.pyo", line 389, in check
> >>> File "mercurial\commands.pyo", line 3266, in incoming  File
> >>> "mercurial\hg.pyo", line 480, in incoming  File "mercurial\hg.pyo",
> >>> line 439, in _incoming  File "mercurial\bundlerepo.pyo", line 331,
> >>> in getremotechanges  File "mercurial\wireproto.pyo", line 285, in
> >>> getbundle  File "mercurial\httprepo.pyo", line 116, in _callstream
> >>> File "urllib2.pyo", line 397, in open  File "urllib2.pyo", line 510,
> >>> in http_response  File "urllib2.pyo", line 429, in error  File
> >>> "urllib2.pyo", line 369, in _call_chain  File "urllib2.pyo", line
> >>> 864, in http_error_401  File "mercurial\url.pyo", line 429, in
> >>> http_error_auth_reqed  File "urllib2.pyo", line 842, in
> >>> http_error_auth_reqed  File "urllib2.pyo", line 852, in
> >>> retry_http_basic_auth  File "urllib2.pyo", line 391, in open  File
> >>> "urllib2.pyo", line 409, in _open  File "urllib2.pyo", line 369, in
> >>> _call_chain  File "mercurial\url.pyo", line 362, in https_open  File
> >>> "mercurial\keepalive.pyo", line 259, in do_open
> >>> URLError: <urlopen error >
> >>> abort: error:
> >>>
> >>> I'm a python neophyte, but I was able to enter the debugger when the
> >> exception was raised, and it was "BadStatusLine", and line was empty.
> >> From the server logs, there are no failed requests, and everything
> >> has been replied to with a 200 status (well, 401 first, then 200
> >> after authentication).
> >>>
> >>> The weird bit is this:
> >>> - This happens if the local repo is up-to-date, or one changeset
> >>> behind
> >> the server.
> >>> - If the local repo is two or more changesets behind the server, no
> >> error occurs on incoming.
> >>> - If the local repo is two or more changesets behind the server, a
> >>> pull
> >> works (local repo is updated with changesets), but gives the above
> >> URLError afterword (doing a listkeys command, I think).
> >>> - All US clients never see above error.  (the US clients aren't all
> >>> located in the same city with the server)
> >>> - Other accesses from India work fine, even with a different branch
> >>> of
> >> the same repo.
> >>>
> >>> Any idea what's going on?  Any suggestions about how I can
> >> debug/diagnose better?
> >>
> >> Run your command again with the following extra args:
> >>
> >> --config ui.usehttp2=true --config ui.http2debuglevel=INFO
> >>
> >> The first flag/value set triggers a new http library that should be
> >> more pedantically correct, and the second flag enables some
> >> reasonably verbose log spew that might give me a clue what's going on.
> >>
> >> (This option requires Mercurial 1.9 or later, preferably the rc of
> >> 2.0 if you can, as that has some improvements to the library in this
> >> area.)
> >
> > Thanks, Augie.  I used those options, but the command hung at the end,
> and I had to press Ctrl+C to get the output shown below.  Again,
> according to the server log, all requests were successful with a 200 HTTP
> status.  It appears the last reply is getting lost and/or mangled?
> There is no proxy involved, but I don't know the full network topology
> from India to server in Texas, but it's a corporate WAN.  It's really
> strange that most all request/replies work just fine, it's just this that
> doesn't...
> >
> > hg pull -b v10.7.4 --debug --verbose --traceback --config
> > ui.usehttp2=true --config ui.http2debuglevel=INFO
> > INFO:mercurial.httpclient:487:sending GET request for
> > /dlpc/master/dlp_composer?cmd=capabilities to dlp_cm on port 443
> > INFO:mercurial.httpclient:487:sending GET request for
> > /dlpc/master/dlp_composer?cmd=capabilities to dlp_cm on port 443
> > INFO:mercurial.httpclient:487:sending GET request for
> > /dlpc/master/dlp_composer?cmd=branchmap to dlp_cm on port 443
> > INFO:mercurial.httpclient:487:sending GET request for
> > /dlpc/master/dlp_composer?cmd=branchmap to dlp_cm on port 443
> > INFO:mercurial.httpclient:487:sending GET request for
> > /dlpc/master/dlp_composer?cmd=lookup to dlp_cm on port 443
> > INFO:mercurial.httpclient:487:sending GET request for
> > /dlpc/master/dlp_composer?cmd=lookup to dlp_cm on port 443
> > INFO:mercurial.httpclient:487:sending GET request for
> > /dlpc/master/dlp_composer?cmd=listkeys to dlp_cm on port 443
> > INFO:mercurial.httpclient:487:sending GET request for
> > /dlpc/master/dlp_composer?cmd=listkeys to dlp_cm on port 443 using
> > https://dlp_cm/dlpc/master/dlp_composer
> > sending capabilities command
> > using auth.dlp_cm.* for authentication dlp_cm certificate matched
> > fingerprint
> > 52:32:92:84:f6:45:d4:54:da:71:86:57:38:48:de:36:e6:06:7e:28
> > Keyring URL: https://dlp_cm
> > Auth data set in .hg/hgrc. Url:
> > https://dlp_cm/dlpc/master/dlp_composer, user: toolbld, passwd:
> > ******** using auth.dlp_cm.* for authentication pulling from
> > https://dlp_cm/dlpc/master/dlp_composer
> > sending branchmap command
> > using auth.dlp_cm.* for authentication Keyring URL: https://dlp_cm
> > Cached auth data found. Url: https://dlp_cm/dlpc/master/dlp_composer,
> > user: toolbld, passwd: ******** using auth.dlp_cm.* for authentication
> > sending lookup command using auth.dlp_cm.* for authentication Keyring
> > URL: https://dlp_cm Cached auth data found. Url:
> > https://dlp_cm/dlpc/master/dlp_composer, user: toolbld, passwd:
> > ******** using auth.dlp_cm.* for authentication no changes found
> > checking for updated bookmarks sending listkeys command using
> > auth.dlp_cm.* for authentication Keyring URL: https://dlp_cm Cached
> > auth data found. Url: https://dlp_cm/dlpc/master/dlp_composer, user:
> > toolbld, passwd: ******** using auth.dlp_cm.* for authentication
> > Traceback (most recent call last):
> >  File "mercurial\dispatch.pyo", line 87, in _runcatch  File
> > "mercurial\dispatch.pyo", line 688, in _dispatch  File
> > "mercurial\dispatch.pyo", line 463, in runcommand  File
> > "mercurial\extensions.pyo", line 182, in wrap  File "hgext\color.pyo",
> > line 368, in colorcmd  File "mercurial\dispatch.pyo", line 742, in
> > _runcommand  File "mercurial\dispatch.pyo", line 696, in checkargs
> > File "mercurial\dispatch.pyo", line 685, in <lambda>  File
> > "mercurial\util.pyo", line 389, in check  File
> > "mercurial\extensions.pyo", line 137, in wrap  File
> > "mercurial\util.pyo", line 389, in check  File "hgext\mq.pyo", line
> > 3218, in mqcommand  File "mercurial\util.pyo", line 389, in check
> > File "mercurial\extensions.pyo", line 137, in wrap  File
> > "mercurial\util.pyo", line 389, in check  File "hgext\rebase.pyo",
> > line 610, in pullrebase  File "mercurial\util.pyo", line 389, in check
> > File "mercurial\commands.pyo", line 3796, in pull  File
> > "mercurial\bookmarks.pyo", line 175, in updatefromremote  File
> > "mercurial\wireproto.pyo", line 114, in plain  File
> > "mercurial\wireproto.pyo", line 162, in _submitone  File
> > "mercurial\httprepo.pyo", line 166, in _call  File
> > "mercurial\httprepo.pyo", line 116, in _callstream  File
> > "urllib2.pyo", line 397, in open  File "urllib2.pyo", line 510, in
> > http_response  File "urllib2.pyo", line 429, in error  File
> > "urllib2.pyo", line 369, in _call_chain  File "urllib2.pyo", line 864,
> > in http_error_401  File "mercurial\url.pyo", line 429, in
> > http_error_auth_reqed  File "urllib2.pyo", line 842, in
> > http_error_auth_reqed  File "urllib2.pyo", line 852, in
> > retry_http_basic_auth  File "urllib2.pyo", line 391, in open  File
> > "urllib2.pyo", line 409, in _open  File "urllib2.pyo", line 369, in
> > _call_chain  File "mercurial\httpconnection.pyo", line 246, in
> > https_open  File "mercurial\httpconnection.pyo", line 213, in do_open
> > File "mercurial\httpclient\__init__.pyo", line 674, in getresponse
> > File "mercurial\httpclient\__init__.pyo", line 161, in _select
> > KeyboardInterrupt interrupted!
> > INFO:mercurial.httpclient:445:closed connection to dlp_cm on 443
> 
> 
> Hm. What version of Mercurial was this? This looks like an error I fixed
> recently, but I'd like to be sure.
> 

Mercurial 1.9.3 on the server (Win Server 2008 w/ IIS 7), and TortoiseHg 2.1.4 (with 1.9.3) on the PC (WinXP 32-bit).





More information about the Mercurial mailing list