Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
2.2.0
-
None
-
Linux RH
Description
Similar bug from the 1.2.0 version
https://issues.apache.org/jira/browse/SSHD-669
In SftpSubsystem on performing the destroy logic (on a client disconnect f.e.), the code will also terminate the current executor service as well.
*** There is no shutdownExecutor parameter in SftpSubsystem.
2019-07-14 19:00:14,236 ERROR [sshd-FactoryExecutorService-thread-1] (SftpSubsystem:316) - run(ServerSessionImpl[user1@DOMAIN/137.72.216.21:50597]) InterruptedException caught in SFTP subsystem: null
2019-07-14 19:00:14,236 DEBUG [sshd-FactoryExecutorService-thread-1] (SftpSubsystem:319) - run(ServerSessionImpl[user1@il-agofman-w2.adprod.bmc.com/137.72.216.21:50597]) caught exception details
java.lang.InterruptedException: null
at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.reportInterruptAfterWait(AbstractQueuedSynchronizer.java:2056) ~[?:?]
at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2090) ~[?:?]
at java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:433) ~[?:?]
at org.apache.sshd.server.subsystem.sftp.SftpSubsystem.run(SftpSubsystem.java:304) [sshd-sftp-2.2.0.jar!/:2.2.0]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) [?:?]
at java.util.concurrent.FutureTask.run(FutureTask.java:264) [?:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]
at java.lang.Thread.run(Thread.java:834) [?:?]
----------------------------------------------------------------------------------------------------------------------
Using protectExecutorServiceShutdown wrapper with shutdownOnExit = false will not solve the problem due to another exception thrown from NoCloseExecutor by
ValidateUtils.checkState(!isShutdown(), "Executor has been shut down");
***The second time Unable to render embedded object: File (isShutdown() issues it will return true) not found.!!
2019-07-12 22:18:07,097 ERROR [sshd-SshServer[3245efdb](port=1222)-nio2-thread-8] (HubSftpSubsystemWrapper:274) - Failed (IllegalStateException) to start command: java.lang.IllegalStateException: Executor has been shut down
java.lang.IllegalStateException: Executor has been shut down
at org.apache.sshd.common.util.ValidateUtils.createFormattedException(ValidateUtils.java:213) ~[sshd-common-2.2.0.jar!/:2.2.0]
at org.apache.sshd.common.util.ValidateUtils.throwIllegalStateException(ValidateUtils.java:207) ~[sshd-common-2.2.0.jar!/:2.2.0]
at org.apache.sshd.common.util.ValidateUtils.checkState(ValidateUtils.java:184) ~[sshd-common-2.2.0.jar!/:2.2.0]
at org.apache.sshd.common.util.threads.NoCloseExecutor.submit(NoCloseExecutor.java:66) ~[sshd-common-2.2.0.jar!/:2.2.0]
Attachments
Issue Links
- relates to
-
SSHD-669 Destroying SftpSubsystem on client disconnect will terminate external ExecutorService - preventing re-connects
- Closed