[
https://issues.apache.org/jira/browse/SSHD-891?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16770055#comment-16770055
]
Anudeep commented on SSHD-891:
--
Hi [~lgoldstein],
We have uplifted sshd-core version from 0.13.0 to 2.1.0.
But with 2.1.0 we see many impacts
one such is client session is getting closed abruptly after few minutes
Please find below logs
{code:java}
[id=0, recipient=43]-ServerSessionImpl[administrator@/141.137.237.205:58516])
by 4 down to 191244
2019-02-16 06:34:10,697 DEBUG [org.apache.sshd.common.io.nio2.Nio2Session] (EJB
default - 44) writePacket(Nio2Session[local=/10.247.
246.100:8345, remote=/141.137.237.205:58516]) Writing 68 bytes
2019-02-16 06:34:10,697 DEBUG [org.apache.sshd.common.io.nio2.Nio2Session]
(sshd-SshServer[5c704bd8]-nio2-thread-3)
handleCompletedWriteCycle(Nio2Session[local=/10.247.246.100:8345,
remote=/141.137.237.205:58516]) finished writing len=68
2019-02-16 06:34:17,050 DEBUG [org.apache.sshd.common.io.nio2.Nio2Session]
(sshd-SshServer[5c704bd8]-nio2-thread-1)
exceptionCaught(Nio2Session[local=/10.247.246.100:8345,
remote=/141.137.237.205:58516]) caught InterruptedByTimeoutException[null] -
calling handler
2019-02-16 06:34:17,050 WARN [org.apache.sshd.server.session.ServerSessionImpl]
(sshd-SshServer[5c704bd8]-nio2-thread-1)
exceptionCaught(ServerSessionImpl[administrator@/141.137.237.205:58516])[state=Opened]
InterruptedByTimeoutException: null
2019-02-16 06:34:17,050 DEBUG
[org.apache.sshd.server.session.ServerSessionImpl]
(sshd-SshServer[5c704bd8]-nio2-thread-1)
exceptionCaught(ServerSessionImpl[administrator@/141.137.237.205:58516])[state=Opened]
details: java.nio.channels.InterruptedByTimeoutException
at
sun.nio.ch.UnixAsynchronousSocketChannelImpl$1.run(UnixAsynchronousSocketChannelImpl.java:456)
[rt.jar:1.8.0_172]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
[rt.jar:1.8.0_172]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) [rt.jar:1.8.0_172]
at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
[rt.jar:1.8.0_172]
at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
[rt.jar:1.8.0_172]
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
[rt.jar:1.8.0_172]
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
[rt.jar:1.8.0_172]
at java.lang.Thread.run(Thread.java:748) [rt.jar:1.8.0_172]
2019-02-16 06:34:17,053 DEBUG
[org.apache.sshd.common.session.helpers.SessionTimeoutListener]
(sshd-SshServer[5c704bd8]-nio2-thread-1)
sessionException(ServerSessionImpl[administrator@/141.137.237.205:58516])
InterruptedByTimeoutException: null
2019-02-16 06:34:17,053 DEBUG
[org.apache.sshd.common.session.helpers.SessionTimeoutListener]
(sshd-SshServer[5c704bd8]-nio2-thread-1)
sessionClosed(ServerSessionImpl[administrator@/141.137.237.205:58516])
un-tracked
2019-02-16 06:34:17,053 DEBUG
[org.apache.sshd.server.session.ServerSessionImpl]
(sshd-SshServer[5c704bd8]-nio2-thread-1)
close(ServerSessionImpl[administrator@/141.137.237.205:58516]) Closing
immediately
2019-02-16 06:34:17,053 DEBUG
[org.apache.sshd.server.session.ServerConnectionService]
(sshd-SshServer[5c704bd8]-nio2-thread-1)
close(ServerConnectionService[ServerSessionImpl[administrator@/141.137.237.205:58516]])
Closing immediately
2019-02-16 06:34:17,054 DEBUG [org.apache.sshd.server.channel.ChannelSession]
(sshd-SshServer[5c704bd8]-nio2-thread-1) close(ChannelSession[id=0,
recipient=43]-ServerSessionImpl[administrator@/141.137.237.205:58516]) Closing
immediately
2019-02-16 06:34:17,054 DEBUG [org.apache.sshd.server.channel.ChannelSession]
(sshd-SshServer[5c704bd8]-nio2-thread-1) close(Channel:
{code}
And with respect to setting the state of sshd we are not able to access the
state variable from ssh-server package as state varaible is made protected in
ssh-common package
{code}
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.sshd.common.util.closeable;
import java.util.concurrent.atomic.AtomicRef