Comment 6 for bug 626876

John A Meinel (jameinel) wrote :

I'm getting this on Windows w/ python 2.6 and paramiko 1.7.5. Sorry if there are formatting issues.

Note that this is ConnectionReset, but paramiko isn't handling the Windows failure code the same way as it seems to do on Linux. (Or *we* aren't translating it, or something).

======================================================================
ERROR: bzrlib.tests.test_transport.TestSSHConnections.test_bzr_connect_to_bzr_ssh
----------------------------------------------------------------------
_StringException: Text attachment: log
------------
1.862 failed to load system host keys: [Errno 2] No such file or directory: 'C:/users/jameinel/appd
ata/local/temp/testbzr-lcsb0y.tmp/ns.test_bzr_connect_to_bzr_ssh/home/.ssh/known_hosts'
1.862 failed to load bzr host keys: [Errno 2] No such file or directory: 'C:/users/jameinel/appdata
/local/temp/testbzr-lcsb0y.tmp/ns.test_bzr_connect_to_bzr_ssh/home/bazaar/2.0/ssh_host_keys'
1.862 creating config parent directory: 'C:/users/jameinel/appdata/local/temp/testbzr-lcsb0y.tmp/ns
.test_bzr_connect_to_bzr_ssh/home/bazaar'
1.862 creating config directory: 'C:/users/jameinel/appdata/local/temp/testbzr-lcsb0y.tmp/ns.test_b
zr_connect_to_bzr_ssh/home/bazaar/2.0'
   DEBUG starting thread (client mode): 0x279ca70L
    INFO Connected (version 2.0, client paramiko_1.7.5)
   DEBUG kex algos:['diffie-hellman-group1-sha1'] server key:['ssh-rsa'] client encrypt:['aes128-ct
r', 'aes256-ctr', 'aes128-cbc', 'blowfish-cbc', 'aes256-cbc', '3des-cbc', 'arcfour128', 'arcfour256'
] server encrypt:['aes128-ctr', 'aes256-ctr', 'aes128-cbc', 'blowfish-cbc', 'aes256-cbc', '3des-cbc'
, 'arcfour128', 'arcfour256'] client mac:['hmac-sha1', 'hmac-md5', 'hmac-sha1-96', 'hmac-md5-96'] se
rver mac:['hmac-sha1', 'hmac-md5', 'hmac-sha1-96', 'hmac-md5-96'] client compress:['none'] server co
mpress:['none'] client lang:[''] server lang:[''] kex follows?False
   DEBUG Ciphers agreed: local=aes128-ctr, remote=aes128-ctr
   DEBUG using kex diffie-hellman-group1-sha1; server key type ssh-rsa; cipher: local aes128-ctr, r
emote aes128-ctr; mac: local hmac-sha1, remote hmac-sha1; compression: local none, remote none
   DEBUG Switch to new keys ...
 WARNING Adding ssh-rsa host key for localhost: 60733844CB5186657FDEDAA22B5A57D5
2.131 Trying SSH agent key 9EB9CEAB13B9027CD34F0A72C7A9BA0F
   DEBUG userauth is OK
   ERROR Socket exception: An existing connection was forcibly closed by the remote host (10054)
2.340 opening working tree 'C:/users/jameinel/appdata/local/temp/testbzr-lcsb0y.tmp'
------------
Text attachment: traceback
------------
Traceback (most recent call last):
  File "C:\Python26\lib\site-packages\testtools-0.9.3-py2.6.egg\testtools\runtest.py", line 144, in
_run_user
    return fn(*args)
  File "C:\Python26\lib\site-packages\testtools-0.9.3-py2.6.egg\testtools\testcase.py", line 413, in
 _run_test_method
    testMethod()
  File "C:\Users\jameinel\dev\bzr\bzr.dev\bzrlib\tests\test_transport.py", line 981, in test_bzr_con
nect_to_bzr_ssh
    t.mkdir('foo')
  File "C:\Users\jameinel\dev\bzr\bzr.dev\bzrlib\transport\remote.py", line 242, in mkdir
    self._serialise_optional_mode(mode))
  File "C:\Users\jameinel\dev\bzr\bzr.dev\bzrlib\transport\remote.py", line 182, in _call2
    return self._client.call(method, *args)
  File "C:\Users\jameinel\dev\bzr\bzr.dev\bzrlib\smart\client.py", line 132, in call
    result, protocol = self.call_expecting_body(method, *args)
  File "C:\Users\jameinel\dev\bzr\bzr.dev\bzrlib\smart\client.py", line 145, in call_expecting_body
    method, args, expect_response_body=True)
  File "C:\Users\jameinel\dev\bzr\bzr.dev\bzrlib\smart\client.py", line 90, in _call_and_read_respon
se
    readv_body=readv_body, body_stream=body_stream)
  File "C:\Users\jameinel\dev\bzr\bzr.dev\bzrlib\smart\client.py", line 63, in _send_request
    encoder.call(method, *args)
  File "C:\Users\jameinel\dev\bzr\bzr.dev\bzrlib\smart\protocol.py", line 1309, in call
    self._write_end()
  File "C:\Users\jameinel\dev\bzr\bzr.dev\bzrlib\smart\protocol.py", line 1133, in _write_end
    self.flush()
  File "C:\Users\jameinel\dev\bzr\bzr.dev\bzrlib\smart\protocol.py", line 1099, in flush
    self._real_write_func(''.join(self._buf))
  File "C:\Users\jameinel\dev\bzr\bzr.dev\bzrlib\smart\medium.py", line 396, in accept_bytes
    self._accept_bytes(bytes)
  File "C:\Users\jameinel\dev\bzr\bzr.dev\bzrlib\smart\medium.py", line 978, in _accept_bytes
    self._medium._accept_bytes(bytes)
  File "C:\Users\jameinel\dev\bzr\bzr.dev\bzrlib\smart\medium.py", line 794, in _accept_bytes
    self._ensure_connection()
  File "C:\Users\jameinel\dev\bzr\bzr.dev\bzrlib\smart\medium.py", line 818, in _ensure_connection
    '--directory=/', '--allow-writes'])
  File "C:\Users\jameinel\dev\bzr\bzr.dev\bzrlib\transport\ssh.py", line 329, in connect_ssh
    t = self._connect(username, password, host, port)
  File "C:\Users\jameinel\dev\bzr\bzr.dev\bzrlib\transport\ssh.py", line 317, in _connect
    _paramiko_auth(username, password, host, port, t)
  File "C:\Users\jameinel\dev\bzr\bzr.dev\bzrlib\transport\ssh.py", line 491, in _paramiko_auth
    paramiko_transport.auth_publickey(username, key)
  File "C:\Python26\lib\site-packages\paramiko-1.7.5-py2.6.egg\paramiko\transport.py", line 1227, in
 auth_publickey
    return self.auth_handler.wait_for_response(my_event)
  File "C:\Python26\lib\site-packages\paramiko-1.7.5-py2.6.egg\paramiko\auth_handler.py", line 163,
in wait_for_response
    raise e
error: [Errno 10054] An existing connection was forcibly closed by the remote host
------------

----------------------------------------------------------------------
Ran 81 tests in 1.616s

This is the error I get on PQM:

======================================================================
ERROR: bzrlib.tests.test_transport.TestSSHConnections.test_bzr_connect_to_bzr_ssh
----------------------------------------------------------------------
_StringException: Text attachment: log
------------
4647.872 failed to load system host keys: [Errno 2] No such file or directory: '/tmp/testbzr-7jO8Xn
.tmp/bzrlib.tests.test_transport.TestSSHConnections.test_bzr_connect_to_bzr_ssh/home/.ssh/known_host
s'
4647.872 failed to load bzr host keys: [Errno 2] No such file or directory: '/tmp/testbzr-7jO8Xn.tm
p/bzrlib.tests.test_transport.TestSSHConnections.test_bzr_connect_to_bzr_ssh/home/.bazaar/ssh_host_k
eys'
4647.872 creating config directory: '/tmp/testbzr-7jO8Xn.tmp/bzrlib.tests.test_transport.TestSSHCon
nections.test_bzr_connect_to_bzr_ssh/home/.bazaar'
   DEBUG starting thread (client mode): 0x2990090L
    INFO Connected (version 2.0, client paramiko_1.6.4)
   DEBUG kex algos:['diffie-hellman-group1-sha1'] server key:['ssh-rsa'] client encrypt:['aes128-cb
c', 'blowfish-cbc', 'aes256-cbc', '3des-cbc'] server encrypt:['aes128-cbc', 'blowfish-cbc', 'aes256-
cbc', '3des-cbc'] client mac:['hmac-sha1', 'hmac-md5', 'hmac-sha1-96', 'hmac-md5-96'] server mac:['h
mac-sha1', 'hmac-md5', 'hmac-sha1-96', 'hmac-md5-96'] client compress:['none'] server compress:['non
e'] client lang:[''] server lang:[''] kex follows?False
   DEBUG Ciphers agreed: local=aes128-cbc, remote=aes128-cbc
   DEBUG using kex diffie-hellman-group1-sha1; server key type ssh-rsa; cipher: local aes128-cbc, r
emote aes128-cbc; mac: local hmac-sha1, remote hmac-sha1; compression: local none, remote none
   DEBUG Switch to new keys ...
 WARNING Adding ssh-rsa host key for localhost: 60733844CB5186657FDEDAA22B5A57D5
   DEBUG userauth is OK
    INFO Authentication (password) successful!
   DEBUG Max packet in: 34816 bytes
   DEBUG Max packet out: 34816 bytes
    INFO Secsh channel 1 opened.
   DEBUG Sesch channel 1 request ok
   DEBUG EOF in transport thread
------------
Text attachment: traceback
------------
Traceback (most recent call last):
  File "/usr/lib/python2.4/site-packages/testtools/runtest.py", line 128, in _run_user
    return fn(*args)
  File "/usr/lib/python2.4/site-packages/testtools/testcase.py", line 368, in _run_test_method
    testMethod()
  File "/home/pqm/bzr-pqm-workdir/home/+trunk/bzrlib/tests/test_transport.py", line 981, in test_bzr
_connect_to_bzr_ssh
    t.mkdir('foo')
  File "/home/pqm/bzr-pqm-workdir/home/+trunk/bzrlib/transport/remote.py", line 242, in mkdir
    self._serialise_optional_mode(mode))
  File "/home/pqm/bzr-pqm-workdir/home/+trunk/bzrlib/transport/remote.py", line 182, in _call2
    return self._client.call(method, *args)
  File "/home/pqm/bzr-pqm-workdir/home/+trunk/bzrlib/smart/client.py", line 132, in call
    result, protocol = self.call_expecting_body(method, *args)
  File "/home/pqm/bzr-pqm-workdir/home/+trunk/bzrlib/smart/client.py", line 144, in call_expecting_b
ody
    return self._call_and_read_response(
  File "/home/pqm/bzr-pqm-workdir/home/+trunk/bzrlib/smart/client.py", line 92, in _call_and_read_re
sponse
    response_tuple = response_handler.read_response_tuple(
  File "/home/pqm/bzr-pqm-workdir/home/+trunk/bzrlib/smart/message.py", line 299, in read_response_t
uple
    self._wait_for_response_args()
  File "/home/pqm/bzr-pqm-workdir/home/+trunk/bzrlib/smart/message.py", line 264, in _wait_for_respo
nse_args
    self._read_more()
  File "/home/pqm/bzr-pqm-workdir/home/+trunk/bzrlib/smart/message.py", line 285, in _read_more
    raise errors.ConnectionReset(
ConnectionReset: Connection closed: Unexpected end of message. Please check connectivity and permissions, and report a bug if problems persist.