SSH RunCommand never ends

0 votes
asked Oct 31, 2010 by Nabil (120 points)
edited Mar 21, 2011

Hi,

I am trying to run a command on a remote unix box, via SSH. This command takes a lot of time to complete (something like 45 minutes). However even if the process at te Unix side terminates (I check that with the unix 'ps' command to ensure that the process has terminated), the Rebex.NET side is still stuck at the RunComand and never ends....

Maybe a timeout issue from the SSH server ? I have already tried to put the Timeout property to -1 on the Rebex side.

Regards,

Nabil.

1 Answer

0 votes
answered Nov 1, 2010 by Lukas Pokorny (111,330 points)
edited Nov 1, 2010

Normally, with Timeout property set to -1, the RunCommand method should end when the command finishes and the underlying channel is closed by the server.

A timeout from the SSH server should manifest itself in form of connection or channel termination, which in turn would cause the RunCommand method to throw an exception.

The behavior you encountered is not any of these two cases, which means something strange is going on. Would it be possible to create a communication log (which spans those >45 minutes) using Ssh object's LogWriter property and either edit your question to include it or mail it to support@rebex.net for analysis?

...