|
From: | Alan Hawrylyshen |
Subject: | [Fab-user] Parmiko issues write() argument errors - unsure how to get around this. |
Date: | Sun, 19 Jul 2009 10:14:57 -0700 |
I am very new to fabric, and it looks like just the tool I need to manage my deployments, however I'm having some challenges getting started. First, I'm trying to use fabric from the git repository (master / HEAD) and when I run a simple test (say a task to run 'uname' on the target host). I never see any output. Instead I see output like: (running on a host on the same local network with ip 10.0.10.200, target is 10.0.10.20) $ fab production host_type /Users/alan/venv/X/lib/python2.6/site-packages/pycrypto-2.0.1-py2.6-macosx-10.5-i386.egg/Crypto/Hash/SHA.py:6: DeprecationWarning: the sha module is deprecated; use the hashlib module instead /Users/alan/venv/X/lib/python2.6/site-packages/pycrypto-2.0.1-py2.6-macosx-10.5-i386.egg/Crypto/Hash/MD5.py:6: DeprecationWarning: the md5 module is deprecated; use hashlib instead [10.0.10.20] run: uname -a AND in the secure logfile on the host 10.0.10.20 (the target host): Jul 19 17:06:07 targethost sshd[1746]: Connection closed by 10.0.10.200 Clearly a network connection is made, but something goes wrong shortly thereafter. The paramiko log file contains errors after the early connection phase where a write fails due to being passed the wrong types or aguments. Here is the logfile, edited for readability: DEB [20090719-10:06:06.900] thr=1 paramiko.transport: starting thread (client mode): 0x12f6ff0L INF [20090719-10:06:06.967] thr=1 paramiko.transport: Connected (version 2.0, client OpenSSH_4.3) DEB [20090719-10:06:07.027] thr=1 paramiko.transport: kex algos:[{MANYKEYS}] server key:[{ALGOS}] client encrypt:[{MANYALGOS}] server encrypt:[{MANYALGOS}] client mac:[{MACS}] server mac:[{MACS}] client compress:[{COMPS}] server compress:[{COMPS}] client lang:[''] server lang:[''] kex follows?False DEB [20090719-10:06:07.028] thr=1 paramiko.transport: Ciphers agreed: local=aes128-cbc, remote=aes128-cbc DEB [20090719-10:06:07.028] thr=1 paramiko.transport: using kex diffie-hellman-group1-sha1; server key type ssh-rsa; cipher: local aes128-cbc remote aes128-cbc; mac: local hmac-sha1, remote hmac-sha1; compression: local none, remote none DEB [20090719-10:06:07.256] thr=1 paramiko.transport: Switch to new keys ... DEB [20090719-10:06:07.258] thr=2 paramiko.transport: Trying SSH agent key {KEY} DEB [20090719-10:06:07.416] thr=1 paramiko.transport: userauth is OK ERR [20090719-10:06:07.416] thr=1 paramiko.transport: Unknown exception: write() argument 1 must be string or read-only character buffer, not list ERR [20090719-10:06:07.421] thr=1 paramiko.transport: Traceback (most recent call last): ERR [20090719-10:06:07.421] thr=1 paramiko.transport: File "build/bdist.macosx-10.5-i386/egg/paramiko/transport.py", line 1526, in run ERR [20090719-10:06:07.422] thr=1 paramiko.transport: self.auth_handler._handler_table[ptype](self.auth_handler, m) ERR [20090719-10:06:07.422] thr=1 paramiko.transport: File "build/bdist.macosx-10.5-i386/egg/paramiko/auth_handler.py", line 195, in _parse_service_accept ERR [20090719-10:06:07.422] thr=1 paramiko.transport: m.add_string(self.username) ERR [20090719-10:06:07.422] thr=1 paramiko.transport: File "build/bdist.macosx-10.5-i386/egg/paramiko/message.py", line 258, in add_string ERR [20090719-10:06:07.422] thr=1 paramiko.transport: self.packet.write(s) ERR [20090719-10:06:07.423] thr=1 paramiko.transport: TypeError: write() argument 1 must be string or read-only character buffer, not list ERR [20090719-10:06:07.423] thr=1 paramiko.transport: Does anyone have ANY idea how to go about debugging this? Has this happened to anyone else? I could not find any explanation for this in a few dedicated minutes of searching. Your help is appreciated, since I'm quite interested in using fabric to manage my build outs. Here is my fabfile: from fabric.api import run, env import sys import os import paramiko #for the log setup for debugging paramiko.util.log_to_file('paramiko.log') def production(): """ For host in that place over there """ env.hosts = [ '10.0.10.20' ] env.user = [ 'deploy' ] def host_type(): run('uname -a') Thanks Alan Hawrylyshen -- Alan Hawrylyshen a l a n a t p o l y p h a s e d o t c a |
[Prev in Thread] | Current Thread | [Next in Thread] |