|
From: | Steinmetz, Jean-Philippe |
Subject: | Re: [Fab-user] EOF during negotiation error |
Date: | Tue, 5 Aug 2014 09:31:44 -0700 |
Hi,I'm pretty new to Fabric and am trying to write a simple fab utility that uploads a zip file to a remote machine and unzips it. Unfortunately I am getting inconsistent errors when I run.I have tried a couple of different options and get two different errors as a result. However, in either case if I comment out the put() operation then everything else works okay. In additional tests it seems I can call run() as many times as I want, so long as there isn't a put() in the chain.Test 1:def uploadScripts():put('scripts.zip')run("unzip -o scripts.zip -d scripts", shell=True)Results in the following out:[localhost] Executing task 'uploadScripts'Packing up scripts...Uploading scripts to remote host...[localhost] Login password for 'jpsteinmetz':[localhost] put: c:\users\jpstei~1\appdata\local\temp\tmpglolrt\scripts.zip -> /home/jpsteinmetz/scripts.zipUnpacking scripts on remote host...[localhost] run: unzip -o scripts.zip -d scriptsFatal error: run() received nonzero return code 255 while executing!Requested: unzip -o scripts.zip -d scriptsExecuted: /bin/bash -l -c "unzip -o scripts.zip -d scripts"Aborting.Disconnecting from localhost... done.If I add an additional line before the put() operation to remove an existing scripts.zip on the remote host...def uploadScripts():run("rm -f scripts.zip", shell=True)put('scripts.zip')run("unzip -o scripts.zip -d scripts", shell=True)Then I get the following error (I've turned on debug logging for additional information).[localhost] Executing task 'uploadScripts'Removing old scripts...[localhost] run: rm -f scripts.zipDEBUG:paramiko.transport:starting thread (client mode): 0x3556e48LINFO:paramiko.transport:Connected (version 2.0, client OpenSSH_6.6.1)DEBUG:paramiko.transport:kex algos:[u'address@hidden', u'ecdh-sha2-nistp256', u'ecdh-sha2-nistp384', u'ecdh-sha2-nistp521', u'diffie-hellman-group-exchange-sha256', u'diffie-hellman-group-exchange-sha1', u'diffie-hellman-group14-sha1', u'diffie-hellman-group1-sha1'] server key:[u'ssh-rsa', u'ssh-dss', u'ecdsa-sha2-nistp256', u'ssh-ed25519'] client encrypt:[u'aes128-ctr', u'aes192-ctr', u'aes256-ctr', u'arcfour256', u'arcfour128', u'address@hidden', u'address@hidden', u'address@hidden', u'aes128-cbc', u'3des-cbc', u'blowfish-cbc', u'cast128-cbc', u'aes192-cbc', u'aes256-cbc', u'arcfour', u'address@hidden'] server encrypt:[u'aes128-ctr', u'aes192-ctr', u'aes256-ctr', u'arcfour256', u'arcfour128', u'address@hidden', u'address@hidden', u'address@hidden', u'aes128-cbc', u'3des-cbc', u'blowfish-cbc', u'cast128-cbc', u'aes192-cbc', u'aes256-cbc', u'arcfour', u'address@hidden'] client mac:[u'address@hidden', u'address@hidden', u'address@hidden', u'address@hidden', u'address@hidden', u'address@hidden', u'address@hidden', u'address@hidden', u'address@hidden', u'hmac-md5', u'hmac-sha1', u'address@hidden', u'address@hidden', u'hmac-sha2-256', u'hmac-sha2-512', u'hmac-ripemd160', u'address@hidden', u'hmac-sha1-96', u'hmac-md5-96'] server mac:[u'address@hidden', u'address@hidden', u'address@hidden', u'address@hidden', u'address@hidden', u'address@hidden', u'address@hidden', u'address@hidden', u'address@hidden', u'hmac-md5', u'hmac-sha1', u'address@hidden', u'address@hidden', u'hmac-sha2-256', u'hmac-sha2-512', u'hmac-ripemd160', u'address@hidden', u'hmac-sha1-96', u'hmac-md5-96'] client compress:[u'none', u'address@hidden'] server compress:[u'none', u'address@hidden'] client lang:[u''] server lang:[u''] kex follows?FalseDEBUG:paramiko.transport:Ciphers agreed: local=aes128-ctr, remote=aes128-ctrDEBUG:paramiko.transport:using kex diffie-hellman-group1-sha1; server key type ssh-rsa; cipher: local aes128-ctr, remote aes128-ctr; mac: local hmac-sha1, remote hmac-sha1; compression: local none, remote noneDEBUG:paramiko.transport:Switch to new keys ...DEBUG:paramiko.transport:Adding ssh-rsa host key for localhost: 493071a6f3998a5536c903aeb86ab7b8[localhost] Login password for 'jpsteinmetz':DEBUG:paramiko.transport:starting thread (client mode): 0x35f8a90LINFO:paramiko.transport:Connected (version 2.0, client OpenSSH_6.6.1)DEBUG:paramiko.transport:kex algos:[u'address@hidden', u'ecdh-sha2-nistp256', u'ecdh-sha2-nistp384', u'ecdh-sha2-nistp521', u'diffie-hellman-group-exchange-sha256', u'diffie-hellman-group-exchange-sha1', u'diffie-hellman-group14-sha1', u'diffie-hellman-group1-sha1'] server key:[u'ssh-rsa', u'ssh-dss', u'ecdsa-sha2-nistp256', u'ssh-ed25519'] client encrypt:[u'aes128-ctr', u'aes192-ctr', u'aes256-ctr', u'arcfour256', u'arcfour128', u'address@hidden', u'address@hidden', u'address@hidden', u'aes128-cbc', u'3des-cbc', u'blowfish-cbc', u'cast128-cbc', u'aes192-cbc', u'aes256-cbc', u'arcfour', u'address@hidden'] server encrypt:[u'aes128-ctr', u'aes192-ctr', u'aes256-ctr', u'arcfour256', u'arcfour128', u'address@hidden', u'address@hidden', u'address@hidden', u'aes128-cbc', u'3des-cbc', u'blowfish-cbc', u'cast128-cbc', u'aes192-cbc', u'aes256-cbc', u'arcfour', u'address@hidden'] client mac:[u'address@hidden', u'address@hidden', u'address@hidden', u'address@hidden', u'address@hidden', u'address@hidden', u'address@hidden', u'address@hidden', u'address@hidden', u'hmac-md5', u'hmac-sha1', u'address@hidden', u'address@hidden', u'hmac-sha2-256', u'hmac-sha2-512', u'hmac-ripemd160', u'address@hidden', u'hmac-sha1-96', u'hmac-md5-96'] server mac:[u'address@hidden', u'address@hidden', u'address@hidden', u'address@hidden', u'address@hidden', u'address@hidden', u'address@hidden', u'address@hidden', u'address@hidden', u'hmac-md5', u'hmac-sha1', u'address@hidden', u'address@hidden', u'hmac-sha2-256', u'hmac-sha2-512', u'hmac-ripemd160', u'address@hidden', u'hmac-sha1-96', u'hmac-md5-96'] client compress:[u'none', u'address@hidden'] server compress:[u'none', u'address@hidden'] client lang:[u''] server lang:[u''] kex follows?FalseDEBUG:paramiko.transport:Ciphers agreed: local=aes128-ctr, remote=aes128-ctrDEBUG:paramiko.transport:using kex diffie-hellman-group1-sha1; server key type ssh-rsa; cipher: local aes128-ctr, remote aes128-ctr; mac: local hmac-sha1, remote hmac-sha1; compression: local none, remote noneDEBUG:paramiko.transport:Switch to new keys ...DEBUG:paramiko.transport:userauth is OKINFO:paramiko.transport:Authentication (password) successful!DEBUG:paramiko.transport:[chan 1] Max packet in: 34816 bytesDEBUG:paramiko.transport:[chan 1] Max packet out: 32768 bytesINFO:paramiko.transport:Secsh channel 1 opened.DEBUG:paramiko.transport:[chan 1] Sesch channel 1 request okDEBUG:paramiko.transport:[chan 1] Sesch channel 1 request okDEBUG:paramiko.transport:[chan 1] EOF received (1)DEBUG:paramiko.transport:[chan 1] EOF sent (1)Packing up scripts...Uploading scripts to remote host...DEBUG:paramiko.transport:[chan 2] Max packet in: 34816 bytesDEBUG:paramiko.transport:[chan 2] Max packet out: 32768 bytesINFO:paramiko.transport:Secsh channel 2 opened.DEBUG:paramiko.transport:[chan 2] Sesch channel 2 request okTraceback (most recent call last):DEBUG:paramiko.transport:[chan 2] EOF received (2)File "C:\Python27\lib\site-packages\fabric\main.py", line 743, in main*args, **kwargsFile "C:\Python27\lib\site-packages\fabric\tasks.py", line 372, in executemultiprocessingFile "C:\Python27\lib\site-packages\fabric\tasks.py", line 267, in _executereturn task.run(*args, **kwargs)File "C:\Python27\lib\site-packages\fabric\tasks.py", line 174, in runreturn self.wrapped(*args, **kwargs)File "D:\tools\python\fabfile.py", line 40, in uploadScriptsif (put(os.path.join(tempDir, 'scripts.zip')).succeeded == False):File "C:\Python27\lib\site-packages\fabric\network.py", line 639, in host_prompting_wrapperDEBUG:paramiko.transport:[chan 2] EOF sent (2)return func(*args, **kwargs)File "C:\Python27\lib\site-packages\fabric\operations.py", line 346, in putftp = SFTP(env.host_string)File "C:\Python27\lib\site-packages\fabric\sftp.py", line 30, in __init__self.ftp = connections[host_string].open_sftp()File "C:\Python27\lib\site-packages\paramiko\client.py", line 345, in open_sftpreturn self._transport.open_sftp_client()File "C:\Python27\lib\site-packages\paramiko\transport.py", line 717, in open_sftp_clientreturn SFTPClient.from_transport(self)File "C:\Python27\lib\site-packages\paramiko\sftp_client.py", line 114, in from_transportreturn cls(chan)File "C:\Python27\lib\site-packages\paramiko\sftp_client.py", line 98, in __init__raise SSHException('EOF during negotiation')paramiko.ssh_exception.SSHException: EOF during negotiationDisconnecting from localhost... DEBUG:paramiko.transport:EOF in transport threaddone.DEBUG:paramiko.transport:EOF in transport threadI am running Windows 7 with Python 2.7.8 and the following packages:boto (2.31.1)ecdsa (0.11)Fabric (1.9.0)paramiko (1.14.0)pip (1.5.6)pycrypto (2.6)pywin32 (219)setuptools (3.8.1)The SSH server is OpenSSH 6.6.1p1-3 running through cygwin (64-bit). SSH itself seems to run just fine as I can putty into it without any problems and can also use psftp to upload the same zip file.Any insight into why this might be happening is greatly appreciated.Cheers,Jean-Philippe Steinmetz
[Prev in Thread] | Current Thread | [Next in Thread] |