launchpad plugin xmlrpc does not use $http_proxy (branching lp: uris does not use system http proxy)

Bug #190209 reported by Gustavo Carneiro
10
Affects Status Importance Assigned to Milestone
Bazaar
Confirmed
Medium
Unassigned

Bug Description

In my company network we have to use http proxy, else http connections just timeout. bzr branch lp:something does not use $http_proxy and so it times out.

gjc@spectrum:tmp$ bzr branch lp:pybindgen
bzr: ERROR: socket.error: (110, 'Connection timed out')

Traceback (most recent call last):
  File "/usr/lib/python2.5/site-packages/bzrlib/commands.py", line 802, in run_bzr_catch_errors
    return run_bzr(argv)
  File "/usr/lib/python2.5/site-packages/bzrlib/commands.py", line 758, 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 877, in run
    br_from = Branch.open(from_location)
  File "/usr/lib/python2.5/site-packages/bzrlib/branch.py", line 128, in open
    possible_transports=possible_transports)
  File "/usr/lib/python2.5/site-packages/bzrlib/bzrdir.py", line 572, in open
    return BzrDir.open_from_transport(t, _unsupported=_unsupported)
  File "/usr/lib/python2.5/site-packages/bzrlib/bzrdir.py", line 609, 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 1661, in do_catching_redirections
    return action(transport)
  File "/usr/lib/python2.5/site-packages/bzrlib/bzrdir.py", line 586, in find_format
    transport, _server_formats=_server_formats)
  File "/usr/lib/python2.5/site-packages/bzrlib/bzrdir.py", line 1307, in find_format
    return format.probe_transport(transport)
  File "/usr/lib/python2.5/site-packages/bzrlib/bzrdir.py", line 1317, in probe_transport
    format_string = transport.get(".bzr/branch-format").read()
  File "/usr/lib/python2.5/site-packages/bzrlib/plugins/launchpad/lp_indirect.py", line 137, in get
    self._request_redirect(relpath)
  File "/usr/lib/python2.5/site-packages/bzrlib/plugins/launchpad/lp_indirect.py", line 130, in _request_redirect
    target = self._resolve(branchpath) + extra
  File "/usr/lib/python2.5/site-packages/bzrlib/plugins/launchpad/lp_indirect.py", line 85, in _resolve
    result = resolve.submit(service)
  File "/usr/lib/python2.5/site-packages/bzrlib/plugins/launchpad/lp_registration.py", line 155, in submit
    self._authenticated)
  File "/usr/lib/python2.5/site-packages/bzrlib/plugins/launchpad/lp_registration.py", line 120, in send_request
    result = method(*method_params)
  File "xmlrpclib.py", line 1147, in __call__
    return self.__send(self.__name, args)
  File "xmlrpclib.py", line 1437, in __request
    verbose=self.__verbose
  File "xmlrpclib.py", line 1183, in request
    self.send_content(h, request_body)
  File "xmlrpclib.py", line 1297, in send_content
    connection.endheaders()
  File "httplib.py", line 856, in endheaders
    self._send_output()
  File "httplib.py", line 728, in _send_output
    self.send(msg)
  File "httplib.py", line 695, in send
    self.connect()
  File "httplib.py", line 1130, in connect
    sock.connect((self.host, self.port))
  File "<string>", line 1, in connect
error: (110, 'Connection timed out')

bzr 1.0.0 on python 2.5.1.final.0 (linux2)
arguments: ['/usr/bin/bzr', 'branch', 'lp:pybindgen']
encoding: 'UTF-8', fsenc: 'UTF-8', lang: 'en_US.UTF-8'
plugins:
  gnulog /home/gjc/.bazaar/plugins/gnulog.pyc [unknown]
  launchpad /usr/lib/python2.5/site-packages/bzrlib/plugins/launchpad [unknown]
  multiparent /usr/lib/python2.5/site-packages/bzrlib/plugins/multiparent.pyc [unknown]
  signing /home/gjc/.bazaar/plugins/signing [unknown]
*** Bazaar has encountered an internal error.
    Please report a bug at https://bugs.launchpad.net/bzr/+filebug
    including this traceback, and a description of what you
    were doing when the error occurred.

But normal bzr works fine with proxy:

gjc@spectrum:tmp$ bzr branch http://bazaar.launchpad.net/~gjc/pybindgen/trunk
Branched 329 revision(s).

Tags: http launchpad
Martin Pool (mbp)
Changed in bzr:
importance: Undecided → Medium
status: New → Confirmed
Revision history for this message
anatoly techtonik (techtonik) wrote :

Still actual for bzr 1.5

bzr: ERROR: socket.error: (10060, 'Operation timed out')

Traceback (most recent call last):
  File "bzrlib\commands.pyc", line 846, in run_bzr_catch_errors
  File "bzrlib\commands.pyc", line 797, in run_bzr
  File "bzrlib\commands.pyc", line 499, in run_argv_aliases
  File "bzrlib\builtins.pyc", line 916, in run
  File "bzrlib\bzrdir.pyc", line 789, in open_tree_or_branch
  File "bzrlib\bzrdir.pyc", line 666, in open
  File "bzrlib\lazy_import.pyc", line 125, in __call__
  File "bzrlib\transport\__init__.pyc", line 1527, in get_transport
  File "bzrlib\directory_service.pyc", line 52, in dereference
  File "C:/Tools/VCS/Bazaar/plugins\launchpad\lp_directory.py", line 60, in look_up
  File "C:/Tools/VCS/Bazaar/plugins\launchpad\lp_directory.py", line 76, in _resolve
  File "C:/Tools/VCS/Bazaar/plugins\launchpad\lp_registration.py", line 182, in submit
  File "C:/Tools/VCS/Bazaar/plugins\launchpad\lp_registration.py", line 147, in send_request
  File "xmlrpclib.pyc", line 1147, in __call__
  File "xmlrpclib.pyc", line 1437, in __request
  File "xmlrpclib.pyc", line 1183, in request
  File "xmlrpclib.pyc", line 1297, in send_content
  File "httplib.pyc", line 860, in endheaders
  File "httplib.pyc", line 732, in _send_output
  File "httplib.pyc", line 699, in send
  File "httplib.pyc", line 1134, in connect
  File "<string>", line 1, in connect
error: (10060, 'Operation timed out')

bzr 1.5 on python 2.5.2 (win32)
arguments: ['bzr', 'branch', 'lp:gnuhello']
encoding: 'cp1251', fsenc: 'mbcs', lang: 'C'
plugins:
  launchpad C:\Tools\VCS\Bazaar\plugins\launchpad [unknown]
*** Bazaar has encountered an internal error.
    Please report a bug at https://bugs.launchpad.net/bzr/+filebug
    including this traceback, and a description of what you
    were doing when the error occurred.

Revision history for this message
Giles Weaver (gweaver) wrote :

I have the same problem with bzr 1.3.1 on Ubuntu 8.04.1.
The http_proxy environment variable is set correctly, but I assume that bazaar or the launchpad plugin ignores it.

I would imagine that this will severely affect take up of bzr in corporations like my own, as many large corporations use proxies...

If this bug has been fixed in subsequent versions of bazaar, it would be very helpful if a .deb package were made available for the current Ubuntu release and LTS release.

Revision history for this message
Lionel Dricot (ploum-deactivatedaccount) wrote :

I also see this crash (see the attached file) in latest bzr in Intrepid behind a proxy requiring an authentification.

I'm a bit surprised to see that a very similar bug is marked as fixed : see bug #83954 (maybe is it too old ?)

The question now is : is there a workaround so I can still branch from behind a proxy ?

Revision history for this message
anatoly techtonik (techtonik) wrote :

set http_proxy and https_proxy environment variables and launch bzr with full URL instead of prefix.

Revision history for this message
Giles Weaver (gweaver) wrote :

Thanks for that work around, I can confirm it works for me, for download at least.
Any chance of this bug being squashed in time for Ubuntu 8.10?

Revision history for this message
John A Meinel (jameinel) wrote :

Not likely. It seems to be a bug in Python's XMLRPC libraries, so it is going to be rather involved to fix.

Revision history for this message
John A Meinel (jameinel) wrote :

To be complete, the reference is here (also posted to the original bug):
http://bugs.python.org/issue648658

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.