Exception :: Timeout occurred due to inact - WeOnlyDo Discussion board Exception :: Timeout occurred due to inact (wodSSH / wodSSH.NET)

by Jairo Martinez, Wednesday, July 25, 2012, 20:25 (2159 days ago)

So i am having this response most of the time in conjunction with using the Execute() Method.

(one other thing -- i am very very green to the software development world. If any of you out there are familiar with AMX System Control hardware, this is the type of programming i am familiar with (kinda of like C, but with its very significant differences).


Here is a quick break down of my assignment, my program and its environment:

I was task with the job of creating of what is called the VC Connector . Its task is to do the following:

Connect to (up to) 230 video conferencing systems (ie CODECS) via ssh providing back the functions of: Call, Disconnect, Call Status, Camera Control, Volume Control, Content Sharing, Microphone Muting.
These functions will be available via a Web/HTTP service that will be constantly accesses from another program (written by others) that will consume those a fore mention functions.

There are two Manufactures of VTC Codecs being used: Cisco Tele-Presence (CTS) Codecs.
Tandberg C-Series and EX-Series Codecs (Now owned by Cisco)

The Program: (Where the library comes in)
I have written a class that will be used to create each VTC (codec) object. Inside the class, i use the library.

So, for each instance of my VTC class, an instance of the library is created inside that object.

The hardware limitations of Cisco CTS codecs:
Whenever you connect to a Cisco CTS codec, it can take up to 15 to 20 seconds to log-in before you can issue a command. When it is ready, the prompt is basically this: admin:

Now the really issue: When you execute a command to a Cisco CTS Codec, it can take from 3 to 10 seconds before you get a reply message back.

But on top of that, it may between .5 to 1 second after you receive the response message, before you get the prompt of admin: back. Plus, during its long reply time, NO COMMAND can be sent while waiting for the prompt to return.

This is where I need help to understand what is going inside the library. library version ->

To begin, here is my constructor:

ssh = new SSH();
ssh.LicenseKey = xxxx-xxxx-xxxx-xxxx ; ( Don't want to share my key with everyone :) )
ssh.Hostname = this.ipAddress;
ssh.Login = this.user;
ssh.Password = this.pass;

ssh.DebugFile = @ G: acconnectorssh_logsssh_ + this.e164number + .log ;
ssh.Compression = 6;
ssh.Protocol = SSH.SupportedProtocols.SSHAuto;
ssh.Blocking = true;

ssh.Timeout = 1800;

ssh.DataReceivedEvent += new SSH.DataReceivedDelegate(sshDataReceivedEvent);
ssh.StateChangedEvent += new SSH.StateChangedDelegate(sshStateChangedEvent);
ssh.DisconnectedEvent += new SSH.DisconnectedDelegate(ssh_DisconnectedEvent);

so when I use my instance of the ssh library (which I cleverly call ssh ) i am doing this: (example)

string prompt = admin: ;
string cmd = call state
string str = ssh.Execute(cmd,prompt); (--> I have also used the third parameter of time setting it to 30 which i assume is 30 seconds.)
catch(Exception ex)

The following is an excerpt from my own logs:

INFO ,2012-07-25 11:14:55,TAC : -> Call? : VTC #036 (
INFO ,2012-07-25 11:14:55,VTC : -> #036 :: -> GetStatus() Request
INFO ,2012-07-25 11:14:55,VTC : -> #036 :: -> Execute() Request
ERROR,2012-07-25 11:15:11,VTC : !! #036 :: Execute(22) Exception :: Timeout occurred due to inactivity.

INFO ,2012-07-25 11:15:36,TAC : -> Call? : VTC #036 (
INFO ,2012-07-25 11:15:36,VTC : -> #036 :: -> GetStatus() Request
INFO ,2012-07-25 11:15:36,VTC : -> #036 :: -> Execute() Request
ERROR,2012-07-25 11:15:52,VTC : !! #036 :: Execute(179) Exception :: Timeout occurred due to inactivity.

(Where is it getting the roughly 16 second timeout from?)
Now, the log service that is built in the library is to simple, in that it does not provide alot of information such as:
-The time a command went out and when/or if it w

Complete thread: