how to branch from launchpad behind squid?

Asked by Timmie

Hello,
what settings do I need to configure in Squid firewall to let bazaar branch from Launchpad?

For SVN we needed to add:
 extension_methods REPORT MERGE MKACTIVITY CHECKOUT PROPFIND

The proxy doesn't let bazaar access external servers:

D:\>bzr branch lp:bzr
No module named mercurial.commands
Unable to load plugin u'hg' from u'C:/Programme/Bazaar/plugins'
bzr-git: Please install dulwich, https://launchpad.net/dulwich
Unable to load plugin u'dulwich' from u'C:/Programme/Bazaar/plugins'
bzr: ERROR: socket.error: (10060, 'Operation timed out')

Traceback (most recent call last):
  File "bzrlib\commands.pyo", line 893, in run_bzr_catch_errors
  File "bzrlib\commands.pyo", line 839, in run_bzr
  File "bzrlib\commands.pyo", line 539, in run_argv_aliases
  File "bzrlib\builtins.pyo", line 1010, in run
  File "bzrlib\bzrdir.pyo", line 891, in open_tree_or_branch
  File "bzrlib\bzrdir.pyo", line 777, in open
  File "bzrlib\lazy_import.pyo", line 125, in __call__
  File "bzrlib\transport\__init__.pyo", line 1574, in get_transport
  File "bzrlib\directory_service.pyo", line 58, in dereference
  File "C:/Programme/Bazaar/plugins\launchpad\lp_directory.py", line 60, in look_up
  File "C:/Programme/Bazaar/plugins\launchpad\lp_directory.py", line 76, in _resolve
  File "C:/Programme/Bazaar/plugins\launchpad\lp_registration.py", line 182, in submit
  File "C:/Programme/Bazaar/plugins\launchpad\lp_registration.py", line 147, in send_request
  File "xmlrpclib.pyo", line 1147, in __call__
  File "xmlrpclib.pyo", line 1437, in __request
  File "xmlrpclib.pyo", line 1183, in request
  File "xmlrpclib.pyo", line 1297, in send_content
  File "httplib.pyo", line 860, in endheaders
  File "httplib.pyo", line 732, in _send_output
  File "httplib.pyo", line 699, in send
  File "httplib.pyo", line 1134, in connect
  File "<string>", line 1, in connect
error: (10060, 'Operation timed out')

bzr 1.11 on python 2.5.2 (win32)
arguments: ['bzr', 'branch', 'lp:bzr']
encoding: 'cp1252', fsenc: 'mbcs', lang: 'de'
plugins:
  bzrtools C:\Programme\Bazaar\plugins\bzrtools [1.11]
  difftools C:\Programme\Bazaar\plugins\difftools [0.91]
  extmerge C:\Programme\Bazaar\plugins\extmerge [unknown]
  launchpad C:\Programme\Bazaar\plugins\launchpad [unknown]
  netrc_credential_store C:\Programme\Bazaar\plugins\netrc_credential_store [unknown]
  push_and_update C:\Programme\Bazaar\plugins\push_and_update [0.2dev]
  qbzr C:\Programme\Bazaar\plugins\qbzr [0.9.6]
  svn C:\Programme\Bazaar\plugins\svn [0.4.17]
  upload C:\Programme\Bazaar\plugins\upload [1.0dev]
  xmloutput C:\Programme\Bazaar\plugins\xmloutput [0.8.1]
*** 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.

Help is highly appreciated.
Thanks!

Question information

Language:
English Edit question
Status:
Answered
For:
Bazaar Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Vincent Ladeuil (vila) said :
#1

There is a known bug in xmlrpc which is that proxies are not taken into account, see https://bugs.launchpad.net/bzr/+bug/186920.

The workaround is to resolve the lp URLs manually as explained in the bug comments.

Revision history for this message
Timmie (timmie) said :
#2

Dure to https://lists.ubuntu.com/archives/bazaar/2009q3/061569.html:
"The Squid version is probably old. There is a bug with Squid and HTTP
Range requests, which has been fixed for a couple of years now, but
firewalls are often left unchanging once setup."

=> I still do not have any idea how to get around this.

Revision history for this message
John A Meinel (jameinel) said :
#3

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Tim wrote:
> Question #60728 on Bazaar changed:
> https://answers.launchpad.net/bzr/+question/60728
>
> Status: Answered => Open
>
> Tim is still having a problem:
> Dure to https://lists.ubuntu.com/archives/bazaar/2009q3/061569.html:
> "The Squid version is probably old. There is a bug with Squid and HTTP
> Range requests, which has been fixed for a couple of years now, but
> firewalls are often left unchanging once setup."
>
> => I still do not have any idea how to get around this.
>

Use bzr+ssh ?

John
=:->

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkqT+r0ACgkQJdeBCYSNAAOrfgCdFPOXStUlbnhqFVZu2ocn9uC+
iAoAn2/vx3bB8QOyaAMDVyj9qMpB7PSb
=x2fj
-----END PGP SIGNATURE-----

Revision history for this message
Timmie (timmie) said :
#4

I tried everything given in https://bugs.launchpad.net/bzr/+bug/186920

nosmart & ssh lead bith into a connection timeout.

Revision history for this message
Vincent Ladeuil (vila) said :
#5

Well, you are encountering two bugs.
One is in squid for which you need to upgrade your proxy,
The other is bug 186920 for which you have to wait for a fix.

Another solution is to avoid using your proxy but that may not be an option for you.

Revision history for this message
Timmie (timmie) said :
#6

> One is in squid for which you need to upgrade your proxy,
Unfortunately out of my reach...

Revision history for this message
Martin Pool (mbp) said :
#7

2009/8/26 Tim <email address hidden>:
> Question #60728 on Bazaar changed:
> https://answers.launchpad.net/bzr/+question/60728
>
>    Status: Answered => Open
>
> Tim is still having a problem:
> I tried everything given in https://bugs.launchpad.net/bzr/+bug/186920
>
> nosmart & ssh lead bith into a connection timeout.

bith? both?

Does 'bzr info bzr+ssh://bazaar.launchpad.net/~bzr/bzr/trunk' work for you?

If that hangs, your firewall is probably blocking outgoing ssh. If
they won't let you use ssh and they mangle http it's going to be
difficult, and you probably need to speak to your network admin.

--
Martin <http://launchpad.net/~mbp/>

Revision history for this message
Timmie (timmie) said :
#8

bzr info bzr+ssh://bazaar.launchpad.net/~bzr/bzr/trunk
bzr: ERROR: Don't know how to handle SSH connections. Please set BZR_SSH environment variable.

bzr info nosmart+http://bazaar.launchpad.net/~bzr/bzr/trunk
bzr: ERROR: Connection error: while sending GET /~bzr/bzr/trunk/.bzr/branch-format: (10060, 'Operation timed out')

What does the network admin need to allow?
And why is there not another way?
Dropbox, for instance, works.

Revision history for this message
Timmie (timmie) said :
#9

As a workaround, I'd be fine when the following is implemented:

Ability to download a tarball for a revision
https://bugs.launchpad.net/loggerhead/+bug/240580

Revision history for this message
Martin Pool (mbp) said :
#10

> bzr info bzr+ssh://bazaar.launchpad.net/~bzr/bzr/trunk
> bzr: ERROR: Don't know how to handle SSH connections. Please set BZR_SSH environment variable.

I'm surprised it's not falling back to using Paramiko? How about if you run

set BZR_SSH=paramiko

first?

> bzr info nosmart+http://bazaar.launchpad.net/~bzr/bzr/trunk
> bzr: ERROR: Connection error: while sending GET /~bzr/bzr/trunk/.bzr/branch-format: (10060, 'Operation timed out')

This just looks like bzr's not even trying to use your proxy. Try

set http_proxy=http://proxy.example.com:3128/

(with the appropriate settings for your network.)

Revision history for this message
Timmie (timmie) said :
#11

Thanks for following up!

I hope I got you right. No success so far:

http://proxy.example.com:3128/: placeholder. I inserted my proxy details. The same as worked well with easy_install for instance.

C:\>set HTTP_PROXY=http://proxy.example.com:3128/

C:\>set BZR_SSH=paramiko

C:\>bzr info nosmart+http://bazaar.launchpad.net/~bzr/bzr/trunk
bzr: ERROR: Invalid url supplied to transport: "http://proxy.example.com:3128/": No host component

C:\>bzr info bzr+ssh://bazaar.launchpad.net/~bzr/bzr/trunk
bzr: ERROR: Unrecognised value for BZR_SSH environment variable: paramiko

Revision history for this message
Vincent Ladeuil (vila) said :
#12

> C:\>set HTTP_PROXY=http://proxy.example.com:3128/
> C:\>bzr info nosmart+http://bazaar.launchpad.net/~bzr/bzr/trunk
> bzr: ERROR: Invalid url supplied to transport: "http://proxy.example.com:3128/": No host component

You have edited the error message here, so it's hard to tell where the error is, but bzr can't find the host in your proxy variable so something is wrong here.

I also noticed that you use bzr-1.11, 1.18 is out, many bugs has been fixed between since 1.11,
upgrading can only help here.

Revision history for this message
Timmie (timmie) said :
#13

>You have edited the error message here, so it's hard to tell where the error is, but bzr can't find the host in your proxy variable so something is wrong here.
So Do you want me to disclose the proxy and details?
Just as that I am not using "http://proxy.example.com" but my local address.

> I also noticed that you use bzr-1.11,
That was by the time this got initially reported. I am using the latest version.

Thanks for following up!

Revision history for this message
Vincent Ladeuil (vila) said :
#14

Yes, giving the exact string you're using since it appears to be a syntax problem so every character count.

Specifying a user, a password, there are many ways to set a bad proxy.
Since your proxy can't accessed from the outside, I don't think you have a privacy concern here.

Since we are testing an http connection here, adding '-Dhttp' to your command will also gives more
details about the exact operations which are attempted.
Looking in your .bzr.log should give you more info on the problem.

If you still can't solve your problem from there, I think we'll turn that question into a real bug
as we don't progress here.

You will also be able to attach your .bzr.log file, anonymized as you see fit.

Can you help with this problem?

Provide an answer of your own, or ask Timmie for more information if necessary.

To post a message you must log in.