"Server refuses to fullfil the request" http error blocking access to svn repo

Bug #240450 reported by Luis Arias
6
Affects Status Importance Assigned to Milestone
Bazaar
Confirmed
High
Unassigned

Bug Description

Using

bzr 1.5
bzr-svn 0.4.10

Trying to branch a centricsuite.com svn repo that requires authentication over https:

bzr branch --verbose https://USER:<email address hidden>/webapp/branches/branch-50-community centricsuite

Password information is in ~/.bazaar/authentication.conf and is being used since commenting out the password here and including it in the URL gives rise to a prompt for the password but produces the same result.

The following stack trace in ~/.bzr.log

0.086 encoding stdout as sys.stdout encoding 'UTF-8'
0.087 bzr arguments: [u'branch', u'--verbose', u'https://<email address hidden>/webapp/branches/branch-50-community', u'centricsuite']
0.087 looking for plugins in /home/luis/.bazaar/plugins
0.101 looking for plugins in /usr/lib/python2.5/site-packages/bzrlib/plugins
0.101 Plugin name __init__ already loaded
0.101 Plugin name __init__ already loaded
0.119 bzr-svn: using Subversion 1.4.6 (/var/lib/python-support/python2.5/svn/core.pyc)
0.130 encoding stdout as sys.stdout encoding 'UTF-8'
0.173 failed to import pycurl: No module named pycurl
0.174 failed to instantiate transport <bzrlib.registry._LazyObjectGetter object at 83da07c, module='bzrlib.transport.http._pycurl' attribute='PyCurlTransport'> for 'https://<email address hidden>/webapp/branches/branch-50-community': DependencyNotPresent()
1.175 encoding stdout as sys.stdout encoding 'UTF-8'
4.643 Traceback (most recent call last):
  File "/usr/lib/python2.5/site-packages/bzrlib/commands.py", line 846, in run_bzr_catch_errors
    return run_bzr(argv)
  File "/usr/lib/python2.5/site-packages/bzrlib/commands.py", line 797, in run_bzr
    ret = run(*run_argv)
  File "/usr/lib/python2.5/site-packages/bzrlib/commands.py", line 499, in run_argv_aliases
    return self.run(**all_cmd_args)
  File "/usr/lib/python2.5/site-packages/bzrlib/builtins.py", line 916, in run
    from_location)
  File "/usr/lib/python2.5/site-packages/bzrlib/bzrdir.py", line 789, in open_tree_or_branch
    bzrdir = klass.open(location)
  File "/usr/lib/python2.5/site-packages/bzrlib/bzrdir.py", line 667, in open
    return BzrDir.open_from_transport(t, _unsupported=_unsupported)
  File "/usr/lib/python2.5/site-packages/bzrlib/bzrdir.py", line 704, in open_from_transport
    redirected)
  File "/usr/lib/python2.5/site-packages/bzrlib/lazy_import.py", line 125, in __call__
    return obj(*args, **kwargs)
  File "/usr/lib/python2.5/site-packages/bzrlib/transport/__init__.py", line 1616, in do_catching_redirections
    return action(transport)
  File "/usr/lib/python2.5/site-packages/bzrlib/bzrdir.py", line 681, in find_format
    transport, _server_formats=_server_formats)
  File "/usr/lib/python2.5/site-packages/bzrlib/bzrdir.py", line 1440, in find_format
    return format.probe_transport(transport)
  File "/usr/lib/python2.5/site-packages/bzrlib/bzrdir.py", line 2398, in probe_transport
    server_version = medium.protocol_version()
  File "/usr/lib/python2.5/site-packages/bzrlib/smart/medium.py", line 421, in protocol_version
    self._protocol_version = client_protocol.query_version()
  File "/usr/lib/python2.5/site-packages/bzrlib/smart/protocol.py", line 620, in query_version
    self.call('hello')
  File "/usr/lib/python2.5/site-packages/bzrlib/smart/protocol.py", line 488, in call
    self._request.finished_writing()
  File "/usr/lib/python2.5/site-packages/bzrlib/smart/medium.py", line 348, in finished_writing
    self._finished_writing()
  File "/usr/lib/python2.5/site-packages/bzrlib/transport/http/__init__.py", line 539, in _finished_writing
    data = self._medium.send_http_smart_request(self._buffer)
  File "/usr/lib/python2.5/site-packages/bzrlib/transport/http/__init__.py", line 518, in send_http_smart_request
    code, body_filelike = self._post(bytes)
  File "/usr/lib/python2.5/site-packages/bzrlib/transport/http/_urllib.py", line 136, in _post
    response = self._perform(Request('POST', abspath, body_bytes))
  File "/usr/lib/python2.5/site-packages/bzrlib/transport/http/_urllib.py", line 79, in _perform
    response = self._opener.open(request)
  File "/usr/lib/python2.5/urllib2.py", line 387, in open
    response = meth(req, response)
  File "/usr/lib/python2.5/site-packages/bzrlib/transport/http/_urllib2_wrappers.py", line 1326, in http_response
    code, msg, hdrs)
  File "/usr/lib/python2.5/urllib2.py", line 419, in error
    result = self._call_chain(*args)
  File "/usr/lib/python2.5/urllib2.py", line 360, in _call_chain
    result = func(*args)
  File "/usr/lib/python2.5/site-packages/bzrlib/transport/http/_urllib2_wrappers.py", line 1250, in http_error_401
    return self.auth_required(req, headers)
  File "/usr/lib/python2.5/site-packages/bzrlib/transport/http/_urllib2_wrappers.py", line 966, in auth_required
    response = self.parent.open(request)
  File "/usr/lib/python2.5/urllib2.py", line 387, in open
    response = meth(req, response)
  File "/usr/lib/python2.5/site-packages/bzrlib/transport/http/_urllib2_wrappers.py", line 1326, in http_response
    code, msg, hdrs)
  File "/usr/lib/python2.5/urllib2.py", line 425, in error
    return self._call_chain(*args)
  File "/usr/lib/python2.5/urllib2.py", line 360, in _call_chain
    result = func(*args)
  File "/usr/lib/python2.5/site-packages/bzrlib/transport/http/_urllib2_wrappers.py", line 1337, in http_error_default
    raise errors.TransportError('Server refuses to fullfil the request')
TransportError: Transport error: Server refuses to fullfil the request

Revision history for this message
Jelmer Vernooij (jelmer) wrote :

This is a bug in bzr itself - it happens even before the connection is passed on to bzr-svn.

Revision history for this message
James Westby (james-w) wrote : Re: [Bug 240450] [NEW] branching centricsuite.com svn repo causes transport error

On Mon, 2008-06-16 at 19:06 +0000, Launchpad Bug Tracker wrote:
> You have been subscribed to a public bug:
>
> Using
>
> bzr 1.5
> bzr-svn 0.4.10
>
> Trying to branch a centricsuite.com svn repo that requires
> authentication over https:

Hi,

Can you please try prefixing the url with "nosmart+" and see if that
works?

Thanks,

James

Revision history for this message
Luis Arias (kaaloo) wrote : Re: branching centricsuite.com svn repo causes transport error

Prefixing with nosmart+ gives the following stacktrace. It seems to me that the bzr-svn plugin is never brought into the picture.

0.088 encoding stdout as sys.stdout encoding 'UTF-8'
0.088 bzr arguments: [u'branch', u'--verbose', u'nosmart+https://<email address hidden>/webapp/branches/branch-50-community', u'centricsuite']
0.088 looking for plugins in /home/luis/.bazaar/plugins
0.102 looking for plugins in /usr/lib/python2.5/site-packages/bzrlib/plugins
0.102 Plugin name __init__ already loaded
0.102 Plugin name __init__ already loaded
0.120 bzr-svn: using Subversion 1.4.6 (/var/lib/python-support/python2.5/svn/core.pyc)
0.131 encoding stdout as sys.stdout encoding 'UTF-8'
0.174 failed to import pycurl: No module named pycurl
0.174 failed to instantiate transport <bzrlib.registry._LazyObjectGetter object at 83da07c, module='bzrlib.transport.http._pycurl' attribute='PyCurlTransport'> for 'https://<email address hidden>/webapp/branches/branch-50-community': DependencyNotPresent()
1.979 Traceback (most recent call last):
  File "/usr/lib/python2.5/site-packages/bzrlib/commands.py", line 846, in run_bzr_catch_errors
    return run_bzr(argv)
  File "/usr/lib/python2.5/site-packages/bzrlib/commands.py", line 797, in run_bzr
    ret = run(*run_argv)
  File "/usr/lib/python2.5/site-packages/bzrlib/commands.py", line 499, in run_argv_aliases
    return self.run(**all_cmd_args)
  File "/usr/lib/python2.5/site-packages/bzrlib/builtins.py", line 916, in run
    from_location)
  File "/usr/lib/python2.5/site-packages/bzrlib/bzrdir.py", line 789, in open_tree_or_branch
    bzrdir = klass.open(location)
  File "/usr/lib/python2.5/site-packages/bzrlib/bzrdir.py", line 667, in open
    return BzrDir.open_from_transport(t, _unsupported=_unsupported)
  File "/usr/lib/python2.5/site-packages/bzrlib/bzrdir.py", line 704, in open_from_transport
    redirected)
  File "/usr/lib/python2.5/site-packages/bzrlib/lazy_import.py", line 125, in __call__
    return obj(*args, **kwargs)
  File "/usr/lib/python2.5/site-packages/bzrlib/transport/__init__.py", line 1616, in do_catching_redirections
    return action(transport)
  File "/usr/lib/python2.5/site-packages/bzrlib/bzrdir.py", line 681, in find_format
    transport, _server_formats=_server_formats)
  File "/usr/lib/python2.5/site-packages/bzrlib/bzrdir.py", line 1444, in find_format
    raise errors.NotBranchError(path=transport.base)
NotBranchError: Not a branch: "nosmart+https://<email address hidden>/webapp/branches/branch-50-community/".

1.979 return code 3

Revision history for this message
James Westby (james-w) wrote : Re: [Bug 240450] Re: branching centricsuite.com svn repo causes transport error

On Mon, 2008-06-16 at 19:20 +0000, Luis Arias wrote:
> Prefixing with nosmart+ gives the following stacktrace. It seems to me
> that the bzr-svn plugin is never brought into the picture.
>

Hi,

It appears as though you don't have pycurl installed. If you are
able to do that could you do so?

Also, trying "nosmart+urllib+" as a prefix may work, but I don't know
if you can stack them. It may be interesting to see just "urllib+".

Thanks,

James

Revision history for this message
Luis Arias (kaaloo) wrote : Re: branching centricsuite.com svn repo causes transport error
Download full text (3.2 KiB)

Installing pycurl gives rise to another error involving a missing certificate:

bzr: ERROR: pycurl.error: (60, 'server certificate verification failed. CAfile: /etc/ssl/certs/ca-certificates.crt')

Traceback (most recent call last):
  File "/usr/lib/python2.5/site-packages/bzrlib/commands.py", line 846, in run_bzr_catch_errors
    return run_bzr(argv)
  File "/usr/lib/python2.5/site-packages/bzrlib/commands.py", line 797, in run_bzr
    ret = run(*run_argv)
  File "/usr/lib/python2.5/site-packages/bzrlib/commands.py", line 499, in run_argv_aliases
    return self.run(**all_cmd_args)
  File "/usr/lib/python2.5/site-packages/bzrlib/builtins.py", line 916, in run
    from_location)
  File "/usr/lib/python2.5/site-packages/bzrlib/bzrdir.py", line 789, in open_tree_or_branch
    bzrdir = klass.open(location)
  File "/usr/lib/python2.5/site-packages/bzrlib/bzrdir.py", line 667, in open
    return BzrDir.open_from_transport(t, _unsupported=_unsupported)
  File "/usr/lib/python2.5/site-packages/bzrlib/bzrdir.py", line 704, in open_from_transport
    redirected)
  File "/usr/lib/python2.5/site-packages/bzrlib/lazy_import.py", line 125, in __call__
    return obj(*args, **kwargs)
  File "/usr/lib/python2.5/site-packages/bzrlib/transport/__init__.py", line 1616, in do_catching_redirections
    return action(transport)
  File "/usr/lib/python2.5/site-packages/bzrlib/bzrdir.py", line 681, in find_format
    transport, _server_formats=_server_formats)
  File "/usr/lib/python2.5/site-packages/bzrlib/bzrdir.py", line 1440, in find_format
    return format.probe_transport(transport)
  File "/usr/lib/python2.5/site-packages/bzrlib/bzrdir.py", line 1450, in probe_transport
    format_string = transport.get(".bzr/branch-format").read()
  File "/usr/lib/python2.5/site-packages/bzrlib/transport/decorator.py", line 105, in get
    return self._decorated.get(relpath)
  File "/usr/lib/python2.5/site-packages/bzrlib/transport/http/__init__.py", line 125, in get
    code, response_file = self._get(relpath, None)
  File "/usr/lib/python2.5/site-packages/bzrlib/transport/http/_pycurl.py", line 166, in _get
    return self._get_full(relpath)
  File "/usr/lib/python2.5/site-packages/bzrlib/transport/http/_pycurl.py", line 201, in _get_full
    self._curl_perform(curl, header)
  File "/usr/lib/python2.5/site-packages/bzrlib/transport/http/_pycurl.py", line 325, in _curl_perform
    curl.perform()
error: (60, 'server certificate verification failed. CAfile: /etc/ssl/certs/ca-certificates.crt')

bzr 1.5 on python 2.5.2 (linux2)
arguments: ['/usr/bin/bzr', 'branch', '--verbose', 'nosmart+https://<email address hidden>/webapp/branches/branch-50-community', 'centricsuite']
encoding: 'UTF-8', fsenc: 'UTF-8', lang: 'en_US.UTF-8'
plugins:
  bzrtools /usr/lib/python2.5/site-packages/bzrlib/plugins/bzrtools [1.5.0]
  gtk /home/luis/.bazaar/plugins/gtk [0.95.0dev1]
  launchpad /usr/lib/python2.5/site-packages/bzrlib/plugins/launchpad [unknown]
  pqm /usr/lib/python2.5/site-packages/bzrlib/plugins/pqm [1.0.0dev0]
  qbzr /usr/lib/python2.5/site-packages/bzrlib/plugins/qbzr [0.9.0]
  svn /usr/lib...

Read more...

Revision history for this message
Luis Arias (kaaloo) wrote :

Some other combinations

- nosmart+https+urllib gives rise to the not a branch error
- https+urllib gives rise to the Server refuses to fulfill the request error

(This with pycurl installed)

Luis

Martin Pool (mbp)
Changed in bzr:
importance: Undecided → High
status: New → Confirmed
Revision history for this message
James Westby (james-w) wrote : Re: [Bug 240450] Re: branching centricsuite.com svn repo causes transport error

On Mon, 2008-06-16 at 21:25 +0000, Luis Arias wrote:
> Some other combinations
>
> - nosmart+https+urllib gives rise to the not a branch error
> - https+urllib gives rise to the Server refuses to fulfill the request error
>
> (This with pycurl installed)

Hi,

I forgot that using these wouldn't allow svn to get involved at all.

I think there is enough information here to know what the problem is
though. The probing for a smart server is causing the server to do
something that the client doesn't understand (there are a couple of
bugs about this), and instead of continuing to try a non-smart
option it falls over.

The normal way to get around this is to use the nosmart+, but I think
this doesn't work here as bzr-svn is not allowed to get involved,
hence the "not a branch" error above.

Thanks,

James

Revision history for this message
weswinham (winhamwr) wrote :
Download full text (3.2 KiB)

Another stack trace for a possibly similar error. In this case, I'm trying to access a server using Digest authentication. It gives the same error with and without pycurl installed

0.094 encoding stdout as sys.stdout encoding 'UTF-8'
0.095 bzr arguments: [u'branch', u'bzr+https://dev.some_project.com/code/some_project/trunk']
0.095 looking for plugins in /home/wes/.bazaar/plugins
0.095 looking for plugins in /usr/lib/python2.5/site-packages/bzrlib/plugins
0.096 Plugin name __init__ already loaded
0.096 Plugin name __init__ already loaded
0.147 encoding stdout as sys.stdout encoding 'UTF-8'
0.682 Traceback (most recent call last):
  File "/usr/lib/python2.5/site-packages/bzrlib/commands.py", line 834, in run_bzr_catch_errors
    return run_bzr(argv)
  File "/usr/lib/python2.5/site-packages/bzrlib/commands.py", line 790, in run_bzr
    ret = run(*run_argv)
  File "/usr/lib/python2.5/site-packages/bzrlib/commands.py", line 492, in run_argv_aliases
    return self.run(**all_cmd_args)
  File "/usr/lib/python2.5/site-packages/bzrlib/builtins.py", line 897, in run
    from_location)
  File "/usr/lib/python2.5/site-packages/bzrlib/bzrdir.py", line 773, in open_tree_or_branch
    bzrdir = klass.open(location)
  File "/usr/lib/python2.5/site-packages/bzrlib/bzrdir.py", line 651, in open
    return BzrDir.open_from_transport(t, _unsupported=_unsupported)
  File "/usr/lib/python2.5/site-packages/bzrlib/bzrdir.py", line 688, in open_from_transport
    redirected)
  File "/usr/lib/python2.5/site-packages/bzrlib/lazy_import.py", line 125, in __call__
    return obj(*args, **kwargs)
  File "/usr/lib/python2.5/site-packages/bzrlib/transport/__init__.py", line 1664, in do_catching_redirections
    return action(transport)
  File "/usr/lib/python2.5/site-packages/bzrlib/bzrdir.py", line 665, in find_format
    transport, _server_formats=_server_formats)
  File "/usr/lib/python2.5/site-packages/bzrlib/bzrdir.py", line 1422, in find_format
    return format.probe_transport(transport)
  File "/usr/lib/python2.5/site-packages/bzrlib/bzrdir.py", line 2408, in probe_transport
    server_version = smart_protocol.query_version()
  File "/usr/lib/python2.5/site-packages/bzrlib/smart/protocol.py", line 589, in query_version
    self.call('hello')
  File "/usr/lib/python2.5/site-packages/bzrlib/smart/protocol.py", line 478, in call
    self._request.finished_writing()
  File "/usr/lib/python2.5/site-packages/bzrlib/smart/medium.py", line 313, in finished_writing
    self._finished_writing()
  File "/usr/lib/python2.5/site-packages/bzrlib/transport/http/__init__.py", line 533, in _finished_writing
    data = self._medium.send_http_smart_request(self._buffer)
  File "/usr/lib/python2.5/site-packages/bzrlib/transport/http/__init__.py", line 517, in send_http_smart_request
    code, body_filelike = self._post(bytes)
  File "/usr/lib/python2.5/site-packages/bzrlib/transport/http/_pycurl.py", line 272, in _post
    return code, response.handle_response(abspath, code, msg, data)
  File "/usr/lib/python2.5/site-packages/bzrlib/transport/http/response.py", line 309, in handle_response
    'Unknown response code %s' % code)
InvalidHttpResponse: Invalid http response for h...

Read more...

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.