VMware Cloud Community
rkrichevskiy
Enthusiast
Enthusiast
Jump to solution

SSH timeout

Is there a way to specify SSHsession timeout in Orchestrator's Run SSH command workflow? We seem to be getting hung up once in awhile, and it tends to happen during the destination VM boot up. Session gets opened but is not completed and get's stuck in established state indefinitely.

1 Solution

Accepted Solutions
carl1
Expert
Expert
Jump to solution

I created a WF to do just that.  Take a look on flowgrab for nestedesxiinstaller and the WF "Run SSH command With Timeout".  It's not the prettiest thing but it works Smiley Happy.

Carl L.

View solution in original post

7 Replies
iiliev
VMware Employee
VMware Employee
Jump to solution

Currently, there is no public API to configure SSH timeouts, so the default values of the underlying SSH library (JSch) are used.

Reply
0 Kudos
rkrichevskiy
Enthusiast
Enthusiast
Jump to solution

Ok thanks. If I am looking at the correct reference, Session (simple JSch API) it seems that it in fact will default to no timeout..

Reply
0 Kudos
carl1
Expert
Expert
Jump to solution

I created a WF to do just that.  Take a look on flowgrab for nestedesxiinstaller and the WF "Run SSH command With Timeout".  It's not the prettiest thing but it works Smiley Happy.

Carl L.

rkrichevskiy
Enthusiast
Enthusiast
Jump to solution

Thanks! I was thinking something along the lines of spawning a check and this async call is clearly the way to do it.

Another option I was thinking about was to use external SSH client. We tend to go with intermediate system approach any time we hit Orchestrator limitation.

And thanks for introducing me to flowgrab. I didn't know about it.

Reply
0 Kudos
jauling
Enthusiast
Enthusiast
Jump to solution

Can someone extract the workflow and paste it here? Looks like flowgrab is down, and probably has been for a while.

We often run SSH tasks to VMs that are geographically very far, and sometimes the ssh connections never come back. Would like to add some kind of timeout and retry if possible. Thanks!

Reply
0 Kudos
oscaralvarez
Enthusiast
Enthusiast
Jump to solution

yes. a code example would be nice to see!
Reply
0 Kudos
qc4vmware
Virtuoso
Virtuoso
Jump to solution

The way I have accomplished this in the past is to use the "Asynchronous" workflow element with a timer loop of some sort.  Just keeping checking to see if the status ever equals "Completed".  Once it hits your timeout you can cancel the workflow and handle things in whatever way makes sense.

Reply
0 Kudos