I am using fabric
to remotely deploy my application to a rackspace server. I tried my scripts on virtual machines using the same OS (Ubuntu Server 10.04) on my home computer and they all work.
Strange, all triang put
commands do not work on a real server. All other commands ( run
, cd
, sudo
, etc.), It seems to work fine.
This only happens when targeting this particular server, this is the command I execute:
fab test --host remote-server
remote-server
is an alias on my .ssh/config
. My file:
@task def test(): sudo("echo testing") put("/tmp/file.txt", "/tmp/")
tmp/test_file.txt
is just a text file that I use for my tests
This is the conclusion.
[remote-server] Executing task 'test' [remote-server] sudo: echo testing [remote-server] out: testing Traceback (most recent call last): File "/home/user/env/lib/python2.6/site-packages/fabric/main.py", line 712, in main *args, **kwargs File "/home/user/env/lib/python2.6/site-packages/fabric/tasks.py", line 298, in execute multiprocessing File "/home/user/env/lib/python2.6/site-packages/fabric/tasks.py", line 197, in _execute return task.run(*args, **kwargs) File "/home/user/env/lib/python2.6/site-packages/fabric/tasks.py", line 112, in run return self.wrapped(*args, **kwargs) File "/home/user/project/fabfile/__init__.py", line 33, in test put("/tmp/file.txt", "/tmp/") File "/home/user/env/lib/python2.6/site-packages/fabric/network.py", line 457, in host_prompting_wrapper return func(*args, **kwargs) File "/home/user/env/lib/python2.6/site-packages/fabric/operations.py", line 338, in put ftp = SFTP(env.host_string) File "/home/user/env/lib/python2.6/site-packages/fabric/sftp.py", line 20, in __init__ self.ftp = connections[host_string].open_sftp() File "/home/user/env/lib/python2.6/site-packages/ssh/client.py", line 399, in open_sftp return self._transport.open_sftp_client() File "/home/user/env/lib/python2.6/site-packages/ssh/transport.py", line 844, in open_sftp_client return SFTPClient.from_transport(self) File "/home/user/env/lib/python2.6/site-packages/ssh/sftp_client.py", line 105, in from_transport chan.invoke_subsystem('sftp') File "/home/user/env/lib/python2.6/site-packages/ssh/channel.py", line 240, in invoke_subsystem self._wait_for_event() File "/home/user/env/lib/python2.6/site-packages/ssh/channel.py", line 1114, in _wait_for_event raise e ssh.SSHException: Channel closed. Disconnecting from root@server.com... done.
Is there anything I need to configure on a remote server to send files using put
?