Thanks,
Ted C. On Aug 14, 2009, at 9:06 AM, Wes Winham wrote:
We had this same issue and we narrowed it down to paramiko 1.7.5 We were getting exceptions like:Traceback (most recent call last):File "/home/christian/.virtualenvs/pstat_dev/src/fabric/fabric/ main.py", line 454, in maincommands[name](*args, **kwargs)File "/home/christian/work_devel/policystat/pstat/pstat_deploy/ configure.py", line 201, in deploy_push_source()File "/home/christian/work_devel/policystat/pstat/pstat_deploy/ utils.py", line 117, in _push_sourcerun('ln -s /var/www/%(pstat_url)s_%(timestamp)s /var/www/% (pstat_url)s' % env)File "/home/christian/.virtualenvs/pstat_dev/src/fabric/fabric/ network.py", line 371, in host_prompting_wrapperreturn func(*args, **kwargs)File "/home/christian/.virtualenvs/pstat_dev/src/fabric/fabric/ operations.py", line 413, in runchannel.exec_command(real_command)File "/home/christian/.virtualenvs/pstat_dev/lib/python2.5/site- packages/paramiko/channel.py", line 212, in exec_commandself._wait_for_event()File "/home/christian/.virtualenvs/pstat_dev/lib/python2.5/site- packages/paramiko/channel.py", line 1077, in _wait_for_eventraise e paramiko.SSHException: Channel closed.They would occur absolutely randomly (usually between the 5th and 25th run() or sudo() call for some reason), but I always got that exception before the script finished (a successful run has about 60 sudo/run calls). This only started happening after I upgraded from paramiko 1.7.4 installed via the python-paramiko package on Ubuntu 9.04 to paramiko 1.7.5 installed via pip in my virtualenv. I had also upgraded from fabric 0.9a3 to 0.9b1 at the same time, but I was able to narrow it down to the paramiko change by going back to 0.9a with the problem continuing. The annoying part is that 1.7.4 isn't hosted anywhere on pypi, so we're having to go back to paramiko 1.7.2. Good news is that everything is working again at least. Hope this helps. -WesOffhand that doesn't look like a config issue, especially if it's intermittent. Are you saying that sometimes that exact command below will work, or does it always bail out? What other commands have you successfully run with run() or sudo(), and what other commands have died -- or is it truly random?What version of Fabric are you using, a git clone or 0.9b1 or what? :)What version of Paramiko do you have installed? IIRC some older versions of Paramiko can cause problems, you'll want 1.7.4 or newer. (In fact, 1.7.5 came out recently, and looks like it may fix those Python 2.6 warnings, hooray!)Finally, it looks like you're using Python 2.6 on...OS X 10.3 Panther?Is that accurate or is your egg path leading me astray? Don't know of any specific issues on 10.3, just want to make sure I know what your platform is for the record. Sorry for the interrogation but that's tech support for you :) Best, JeffOn Sat, Aug 8, 2009 at 7:27 PM, Ted Carroll<ted.a.carr...@gmail.com> wrote:I'm trying out fabric for the first time so this is probably a silly config problem on my part, but I'm running ubuntu 9.04 in a vmware vm and having a lot of problems getting SSHExceptions. Here's a fabfile that reproduces theproblem: from fabric.api import * def production(): env.hosts = ['192.168.1.228'] env.user = 'deployment' env.password = 'password' def test_sudo(): require('hosts', provided_by=[production]) put('apache-website-config', 'apache-website-config') sudo('rm -f apache-website-config') sudo('rm -f bad_file_name2') The output is:/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/ site-packages/Crypto/Hash/SHA.py:6: DeprecationWarning: the sha module is deprecated; use the hashlib moduleinstead from sha import */Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/ site-packages/Crypto/Hash/MD5.py:6: DeprecationWarning: the md5 module is deprecated; use hashlib insteadfrom md5 import * [192.168.1.228] put: apache-website-config -> apache-website-config [192.168.1.228] sudo: rm -f apache-website-config Traceback (most recent call last):File "build/bdist.macosx-10.3-i386/egg/fabric/main.py", line 481, in mainFile "/Users/tedc/project_46062/deployment/fabfile.py", line 11, in test_sudo sudo('rm -f apache-website-config')File "build/bdist.macosx-10.3-i386/egg/fabric/network.py", line 369, inhost_prompting_wrapperFile "build/bdist.macosx-10.3-i386/egg/fabric/operations.py", line 517, insudoFile "build/bdist.macosx-10.3-i386/egg/paramiko/channel.py", line 212, inexec_commandFile "build/bdist.macosx-10.3-i386/egg/paramiko/channel.py", line 1077, in_wait_for_event paramiko.SSHException: Channel closed. Disconnecting from 192.168.1.228... done.It seams to be intermittent -- occasionally it will work but mostly itfails. Any ideas? Thanks, Ted C _______________________________________________ Fab-user mailing list Fab-user@nongnu.org http://lists.nongnu.org/mailman/listinfo/fab-user------------------------------ _______________________________________________ Fab-user mailing list Fab-user@nongnu.org http://lists.nongnu.org/mailman/listinfo/fab-user End of Fab-user Digest, Vol 19, Issue 7 ***************************************-- Wes Winham m. 405.206.4913 w. 317.844.6885 x139 _______________________________________________ Fab-user mailing list Fab-user@nongnu.org http://lists.nongnu.org/mailman/listinfo/fab-user
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________ Fab-user mailing list Fab-user@nongnu.org http://lists.nongnu.org/mailman/listinfo/fab-user