Hi,
I am intermittently getting InternalError: channel is not opened when I am using SSHSession.executecommand.
I am establishing a connection using
var session = new SSHSession(ServerName, username);
var connect = session.connectWithIdentity("../conf/server_key");
And then executing multiple commands using session.executeCommand. It was working fine in my development envrionment without any issues. But as soon as I promoted my code to UAT environment, I am getting failures intermittently due to above mentioned error.
Also, error doesn't come on a specific command, sometime it comes while executing first command itself, sometime it executes few commands and then occurs in between.
I have make sure in my workflow (at every possible place i.e. end of script of whenever any exception is thrown out etc) that I am closing the session before I finish my workflow. Not sure what else is causing this.
Any idea, thoughts on this? Really appriciate your responses.
Sushant