Discussion:
[JSch-users] com.jcraft.jsch.JSchException: session is down
Manan Bhatt
2016-07-15 07:29:51 UTC
Permalink
Hi all,
This is my first mail in mailer list so pardon me for bad formatting.

I am facing session is down exception while transferring file to remote vm
which runs on ubuntu.
In a high level debug issue comes when I called openChannel("sftp")
The implementation of openChanel(String type) looks like,

if(!isConnected){ //isConnected is true
throw new JSchException("session is down");
}
try{
Channel channel=Channel.getChannel(type); //After this
isConnected is coming false
addChannel(channel);
channel.init();
return channel;
}
catch(Exception e){
//e.printStackTrace();
}
return null;

So I tried to debug if more than one thread is trying to access isConnected
variable but it is not the case. Also getChannel has nothing to do with
isConnected.
Is any one of you have face this issue? Your help will be really
appreciated.
--
Regards,
Manan Bhatt
Loading...