I am trying to close a channel gracefully however I am getting this SshException. this is how I close it (this code runs in Akka Actor ):
if (channelShell.isOpen) { channelShell.close(immediate) but looking at the logs I see this exception : 15:45:26.202 [test-system-akka.actor.default-dispatcher-5] DEBUG o.a.s.c.channel.ChannelSession$1 - close([ChannelShell[id=1, recipient=1]-ClientSessionImpl[xxx@/193.95.63.15:22]] cmd=SSH_MSG_CHANNEL_DATA][Graceful] - operationComplete() closed 15:45:26.202 [test-system-akka.actor.default-dispatcher-4] DEBUG o.a.s.c.channel.ChannelSession$1 - close([ChannelShell[id=0, recipient=0]-ClientSessionImpl[xxx@/193.95.63.15:22]] cmd=SSH_MSG_CHANNEL_DATA][Graceful] - operationComplete() closed 15:45:26.203 [test-system-akka.actor.default-dispatcher-5] DEBUG o.a.s.c.c.ChannelAsyncInputStream - close(ChannelAsyncInputStream[ChannelShell[id=1, recipient=1]-ClientSessionImpl[xxx@/193.95.63.15:22]]) Closing gracefully 15:45:26.203 [test-system-akka.actor.default-dispatcher-4] DEBUG o.a.s.c.c.ChannelAsyncInputStream - close(ChannelAsyncInputStream[ChannelShell[id=0, recipient=0]-ClientSessionImpl[xxx@/193.95.63.15:22]]) Closing gracefully org.apache.sshd.common.SshException: Closed at org.apache.sshd.common.channel.ChannelAsyncInputStream.preClose(ChannelAsyncInputStream.java:83) at org.apache.sshd.common.util.closeable.AbstractCloseable.close(AbstractCloseable.java:95) at org.apache.sshd.common.util.closeable.ParallelCloseable.doClose(ParallelCloseable.java:65) at org.apache.sshd.common.util.closeable.SimpleCloseable.close(SimpleCloseable.java:63) at org.apache.sshd.common.util.closeable.SequentialCloseable$1.operationComplete(SequentialCloseable.java:56) at org.apache.sshd.common.util.closeable.SequentialCloseable$1.operationComplete(SequentialCloseable.java:46) at org.apache.sshd.common.future.AbstractSshFuture.notifyListener(AbstractSshFuture.java:165) at org.apache.sshd.common.future.DefaultSshFuture.addListener(DefaultSshFuture.java:159) at org.apache.sshd.common.util.closeable.SequentialCloseable$1.operationComplete(SequentialCloseable.java:57) at org.apache.sshd.common.util.closeable.SequentialCloseable$1.operationComplete(SequentialCloseable.java:46) at org.apache.sshd.common.future.AbstractSshFuture.notifyListener(AbstractSshFuture.java:165) at org.apache.sshd.common.future.DefaultSshFuture.addListener(DefaultSshFuture.java:159) at org.apache.sshd.common.util.closeable.SequentialCloseable$1.operationComplete(SequentialCloseable.java:57) at org.apache.sshd.common.util.closeable.SequentialCloseable$1.operationComplete(SequentialCloseable.java:46) at org.apache.sshd.common.util.closeable.SequentialCloseable.doClose(SequentialCloseable.java:69) at org.apache.sshd.common.util.closeable.SimpleCloseable.close(SimpleCloseable.java:63) at org.apache.sshd.common.util.closeable.AbstractInnerCloseable.doCloseGracefully(AbstractInnerCloseable.java:42) at org.apache.sshd.common.util.closeable.AbstractCloseable.close(AbstractCloseable.java:96) at org.apache.sshd.common.channel.AbstractChannel.close(AbstractChannel.java:448) Any help will be greatly appreciate Sincerely, Avi Levi m: +972-52-3459959 <https://www.linkedin.com/in/leviavi> https://il.linkedin.com/in/leviavi