"bzr push lp:" on windows leads to socket.sslerror traceback.

Bug #216924 reported by Craig Hewetson
4
Affects Status Importance Assigned to Milestone
Bazaar
Fix Released
Undecided
Unassigned

Bug Description

Executed this command: bzr push lp:~craighewetson/bzr-eclipse/craig_dev

bzr: ERROR: socket.sslerror: (8, 'EOF occurred in violation of protocol')

Traceback (most recent call last):
  File "C:\Python25\Lib\site-packages\bzrlib\commands.py", line 834, in run_bzr_catch_errors
    return run_bzr(argv)
  File "C:\Python25\Lib\site-packages\bzrlib\commands.py", line 790, in run_bzr
    ret = run(*run_argv)
  File "C:\Python25\Lib\site-packages\bzrlib\commands.py", line 492, in run_argv_aliases
    return self.run(**all_cmd_args)
  File "C:\Python25\Lib\site-packages\bzrlib\builtins.py", line 728, in run
    to_transport = transport.get_transport(location)
  File "C:\Python25\Lib\site-packages\bzrlib\transport\__init__.py", line 1576, in get_transport
    base = directories.dereference(base)
  File "C:\Python25\Lib\site-packages\bzrlib\directory_service.py", line 52, in dereference
    return service().look_up(name, url)
  File "C:\Python25\Lib\site-packages\bzrlib\plugins\launchpad\lp_directory.py", line 60, in look_up
    return self._resolve(url)
  File "C:\Python25\Lib\site-packages\bzrlib\plugins\launchpad\lp_directory.py", line 76, in _resolve
    result = resolve.submit(service)
  File "C:\Python25\Lib\site-packages\bzrlib\plugins\launchpad\lp_registration.py", line 180, in submit
    self._authenticated)
  File "C:\Python25\Lib\site-packages\bzrlib\plugins\launchpad\lp_registration.py", line 145, in send_request
    result = method(*method_params)
  File "C:\Python25\lib\xmlrpclib.py", line 1147, in __call__
    return self.__send(self.__name, args)
  File "C:\Python25\lib\xmlrpclib.py", line 1437, in __request
    verbose=self.__verbose
  File "C:\Python25\lib\xmlrpclib.py", line 1183, in request
    self.send_content(h, request_body)
  File "C:\Python25\lib\xmlrpclib.py", line 1297, in send_content
    connection.endheaders()
  File "C:\Python25\lib\httplib.py", line 856, in endheaders
    self._send_output()
  File "C:\Python25\lib\httplib.py", line 728, in _send_output
    self.send(msg)
  File "C:\Python25\lib\httplib.py", line 695, in send
    self.connect()
  File "C:\Python25\lib\httplib.py", line 1131, in connect
    ssl = socket.ssl(sock, self.key_file, self.cert_file)
  File "C:\Python25\lib\socket.py", line 74, in ssl
    return _realssl(sock, keyfile, certfile)
sslerror: (8, 'EOF occurred in violation of protocol')

bzr 1.3 on python 2.5.1.final.0 (win32)
arguments: ['C:\\Python25\\Scripts\\bzr', 'push', 'lp:~craighewetson/bzr-eclipse/craig_dev']
encoding: 'cp1252', fsenc: 'mbcs', lang: None
plugins:
  gtk C:\Python25\lib\site-packages\bzrlib\plugins\gtk [0.93.0]
  launchpad C:\Python25\lib\site-packages\bzrlib\plugins\launchpad [unknown]
  qbzr C:\Documents and Settings\Craig Hewetson\Application Data\bazaar\2.0\plugins\qbzr [0.9.0]
  xmloutput C:\Python25\lib\site-packages\bzrlib\plugins\xmloutput [0.4.2]

Revision history for this message
Craig Hewetson (craighewetson-deactivatedaccount) wrote :
Revision history for this message
Craig Hewetson (craighewetson-deactivatedaccount) wrote :

There might well be some configuration problems on my side. Was trying to push code to a branch i created on launchpad (created via site). I've had already registered my public ssh key. But I could not get the following command to work:
bzr push bzr+ssh://<email address hidden>/~craighewetson/bzr-eclipse/craig_dev

It kept telling me: Permission denied (publickey).
bzr: ERROR: Connection closed: please check connectivity and permissions (and try -Dhpss if further diagnosis is required)

So I assumed that bzr could not get(find/use) my public or private key locally to communicate with the server. I tried various "solutions" from the net etc and got nowhere...

So tried this approach:
bzr launchpad-login -v craighewetson (got no print outs etc, assumed it worked. This by the way should atleast tell the user that the connection was successful since I used verbose).
bzr push lp:~craighewetson/bzr-eclipse/craig_dev
after the command I got the printout as indicated in the bug description. I also attached the relevant portion of the .bzr.log file.

Revision history for this message
Craig Hewetson (craighewetson-deactivatedaccount) wrote :

I run the bzr launchpad-login -v craighewetson (no printouts indicating problem)

so I looked in the .bzr.log and found this:

5.125 return code 3

0.172 encoding stdout as sys.stdout encoding 'cp437'
0.172 bzr arguments: [u'launchpad-login', u'-v', u'craighewetson']
0.172 looking for plugins in C:/Documents and Settings/Craig Hewetson/Application Data/bazaar/2.0/plugins
0.172 looking for plugins in C:\Python25\lib\site-packages\bzrlib\plugins
0.172 Plugin name __init__ already loaded
0.172 Plugin name __init__ already loaded
0.297 encoding stdout as sys.stdout encoding 'cp437'
0.375 failed to import pycurl: No module named pycurl
0.375 failed to instantiate transport <bzrlib.registry._LazyObjectGetter object at e6fcd8, module='bzrlib.transport.http._pycurl' attribute='PyCurlTransport'> for 'https://launchpad.net/': DependencyNotPresent()
3.016 return code 0

This seems to be a setup/configuration problem (pycurl), if it is then one should receive an appropriate error message. (should another case be logged for this?)

Revision history for this message
Alexander Belchenko (bialix) wrote :

You should use pageant.exe from Putty package on Windows to work with public SSH keys authentication. Can you try with pageant and tell us is it works?

Changed in bzr:
status: New → Incomplete
status: Incomplete → New
Revision history for this message
Craig Hewetson (craighewetson-deactivatedaccount) wrote :

I've used pageant.exe, bzr didn't quick pick it up. I installed openSSH for windows and did also sorts of jumping through hoops based on all sorts of google searching I did.
I then renamed my public key to id_rsa and then copied it to the .ssh. the bzr+ssh prompted me for the password:
Enter passphrase for key '/home/Craig Hewetson/.ssh/id_rsa:
I then typed it in and it spent some time doing something (busy indication would be nice)
It then spat out this:

Unable to obtain lock bzr+ssh://<email address hidden>/%7Ecraighewetson/bzr-eclipse/craig_dev/.bzr/repository/lock
held by <my email address> on host craig [process #2292]
locked 28 minutes, 49 seconds ago
Will continue to try until 23:28:39

bzr: ERROR: Could not acquire lock "LockDir(bzr+ssh://<email address hidden>/%7Ecraighewetson/bzr-eclipse/craig_dev/.bzr/repository/l
ock)"

So it seems i managed to authenticate myself using ssh etc (so thats fine).
I suppose I inadvertently locked some file on the server. I did try this after I logged off from launchpad and restart my machine, and still got the problem.

Look the latest problem isn't related to the "bug" (#216924) and I will sort this locking problem later.

Since it seems I can connect via the push bzr+ssh command, I'm happy and therefore I won't be following up on this bug's progress (I will still read the comments etc).

If the lock persists tomorrow etc then I will probably log that as a separate bug/case.

Revision history for this message
Aaron Bentley (abentley) wrote : Re: [Bug 216924] Re: Push failed using (bzr push lp:). On windows machine

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

Craig Hewetson wrote:
> If the lock persists tomorrow etc then I will probably log that as a
> separate bug/case.

locks are retained until you break them with bzr break-lock.

Aaron
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFIAoik0F+nu1YWqI0RAtV2AJ9Ss71RcMdmMJQKkD3EfIcDmv2eCwCfUkcV
OJxnB19L4r8XTEyNg0w9hqI=
=ofn5
-----END PGP SIGNATURE-----

Revision history for this message
Andrew Bennetts (spiv) wrote : Re: Push failed using (bzr push lp:). On windows machine

There are several bugs here.

 - You cannot push to an lp: URL until you've done "launchpad-login", but there's no message telling you to do that. Instead it just fails: that's bug #198092.

 - "bzr launchpad-login -v ..." gives no feedback when it succeeds. I've filed bug 217031 for this.

 - "Unable to acquire lock" error doesn't tell you how to fix it (i.e. run "bzr break-lock ...") is bug 139202.

And finally, there's the sslerror + traceback in the original description. I think we should limit discussion on this bug, 216924, to that issue. Other problems should be discussed in other bug reports.

(The failure to import pycurl is fine; it's an optional dependency, which is why it's only mentioned in the debug log rather than reported to the user. So that one isn't a bug.)

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

Well, SSL_ERROR_EOF sounds like a ConnectionClosed error, otherwise I'm not sure what to do about an abort such as this.

Revision history for this message
Mark Hammond (mhammond) wrote :

FWIW, I've seen this as a result of ssh.exe being used without any configured keys, which is what this report is implying - but I too don't know how we can turn this into something reasonable.

Jonathan Lange (jml)
tags: removed: launchpad
tags: added: launchpad
Revision history for this message
Vincent Ladeuil (vila) wrote :

@Craig, are you still experiencing the problem ?

Changed in bzr:
status: New → Incomplete
Revision history for this message
Craig Hewetson (craighewetson-deactivatedaccount) wrote : Re: [Bug 216924] Re: "bzr push lp:" on windows leads to socket.sslerror traceback.

No I don't experience this problem anymore. As far as I'm concerned, this
bug can be closed.

Vincent Ladeuil (vila)
Changed in bzr:
status: Incomplete → Fix Released
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.