fab-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Fab-user] Fabric leaves open ssh connections, which are never close


From: Jeff Forcier
Subject: Re: [Fab-user] Fabric leaves open ssh connections, which are never closed
Date: Fri, 2 Mar 2012 14:16:48 -0800

Hi Daniel,

On Tue, Feb 28, 2012 at 2:12 AM, Daniel Gonzalez <address@hidden> wrote:
> Hello,
>
> I am running the following commands:
>
> fabric.api.sudo('. environment/complete_environment ; ps -ef', pty = False)
>
> And the ssh connections are never finishing. Exiting my program with
> sys.exit causes (sometimes) python interpreter errors.

I can't say for sure since it depends on what is in that file you're
sourcing, but nothing in your command seems obviously incorrect.

The main way to troubleshoot with this kind of situation is:

* Use fab --show=debug (or in-code, wrap the sudo call in a `with
show('debug'):` block). This will make Fabric print out the full,
unabridged command it is sending down the line, eg "sudo -flags
/bin/bash -l -c 'command here'".
* Then try running that command by hand against your server via normal
SSH: "ssh -T hostname <paste fabric full command here>". (The -T is
like Fabric's pty=False.) See how it behaves/runs.

If it works fine via ssh but not via Fabric, then please pastebin the
output of what you tried above (and if possible, the contents of that
complete_environment file) and maybe something will jump out at us.

If it hangs/pauses via ssh too, then it's something in your remote
command that is never exiting, and you'll need to figure out what that
is.

Good luck,
Jeff


-- 
Jeff Forcier
Unix sysadmin; Python/Ruby engineer
http://bitprophet.org



reply via email to

[Prev in Thread] Current Thread [Next in Thread]