hierynomus / sshj

ssh, scp and sftp for java

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

use watchdog to close session failed.

wangjunhan2018 opened this issue · comments

commented

I use jnc library,it use sshj.
image
when close(), error as fllows, please help me!!! Thank you!!!

2024-03-15 01:17:13.585 WARN 10666 --- [ Thread-3] com.baidu.jnc.SSHSession : read timeout, closing session
Exception caught while closing net.schmizz.sshj.connection.ConnectionException
net.schmizz.sshj.connection.ConnectionException
at net.schmizz.sshj.connection.ConnectionException$1.chain(ConnectionException.java:32)
at net.schmizz.sshj.connection.ConnectionException$1.chain(ConnectionException.java:26)
at net.schmizz.concurrent.Promise.tryRetrieve(Promise.java:179)
at net.schmizz.concurrent.Promise.retrieve(Promise.java:137)
at net.schmizz.concurrent.Event.await(Event.java:105)
at net.schmizz.sshj.connection.channel.AbstractChannel.close(AbstractChannel.java:266)
at com.baidu.jnc.SSHSession.close(SSHSession.java:260)
at com.baidu.jnc.SSHSession$TimeoutWatchdog.run(SSHSession.java:100)
Caused by: java.lang.InterruptedException
at java.base/java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2197)
at net.schmizz.concurrent.Promise.tryRetrieve(Promise.java:170)
... 5 more

commented

Is there anyone can answer this question?

I am a maintainer of the original JNC library, so I can comment: an exception in TimeoutWatchdog means that reading from the remote device took longer than the read timeout you set for your SSH session. But you are using jnc from com.baidu, so you should ask them if more details are needed.