You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@mina.apache.org by Moshe Moshe <ka...@gmail.com> on 2014/12/01 23:24:35 UTC

SSHD client losing connection to server

Hi,

We use SSHD client to run long running commands (1 hour) on remote devices.

Sometimes while the command is executing the physical connection is
lost(for example: network card disabled), when this happens while the
client is executing:
channel.waitFor(ClientChannel.CLOSED, commandTimeout)

the client will hang for a long time until the timeout has ended and return
value is the flags OPENED | TIMEOUT.

Moreorver, it seems that enabling client heatbeat, the client sends
heatbeat :
[sshd-SshClient[1afecda0]-timer-thread-1] DEBUG Nio2Session:104 - Writing
96 bytes
[sshd-SshClient[1afecda0]-nio2-thread-5] DEBUG Nio2Session:220 - Finished
writing

even after the physical connection was lost.


Is there away to check if such physical connection lost has happened?

Thanks.