[jira] [Commented] (SSHD-1281) ClientSession.auth().verify() is terminated with timeout
[ https://issues.apache.org/jira/browse/SSHD-1281?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17573332#comment-17573332 ] dgü commented on SSHD-1281: --- Since connection attempt is asynchronous, calling _verify()_ and _getSession()_ may not be after the connection attempt as written above. They might be completed during the connection attempt. After _future.setSession(session)_ line in _org.apache.sshd.common.io.nio2.Nio2Connector.ConnectionCompletionHandler#onCompleted(Void,Object)_ is called but before exiting its method; _verify()_ and _getSession()_ might be completed. That is what problem happens after {_}verify(){_}, _getSession()_ are completed, but then connection is closed in connection attempt. > ClientSession.auth().verify() is terminated with timeout > > > Key: SSHD-1281 > URL: https://issues.apache.org/jira/browse/SSHD-1281 > Project: MINA SSHD > Issue Type: Bug >Affects Versions: 2.9.0 > Environment: Java SE 8, Apache NetBeans IDE 12.5, Bitvise SSH Server > 9.23 >Reporter: dgü >Priority: Major > Attachments: SSHD-NoTimeout-2.8.9.PNG, SSHDTimeout.PNG, > screenshot-1.png, screenshot-2.png, screenshot-3.png > > > Hello! > The following code works successfully in SSHD 2.8.0; but it fails in SSHD > 2.9.0: > {code:java} > final ClientSession clientSession = > SSH_CLIENT.connect(pURI.toString()).verify().getSession(); > System.out.println("clientSession.getSessionState(): " + > clientSession.getSessionState()); > System.out.println("clientSession.isClosed() : " + > clientSession.isClosed()); > System.out.println("clientSession.isClosing() : " + > clientSession.isClosing()); > System.out.println("clientSession.isOpen() : " + > clientSession.isOpen()); > System.out.println("before addPasswordIdentity: " + new > Date(System.currentTimeMillis())); > clientSession.addPasswordIdentity("deneme123"); > try { > Thread.sleep(3000); > } catch (InterruptedException ex) { > > Logger.getLogger(UBSSHDProcessProvider.class.getName()).log(Level.SEVERE, > null, ex); > } > System.out.println("clientSession.getSessionState(): " + > clientSession.getSessionState()); > System.out.println("clientSession.isClosed() : " + > clientSession.isClosed()); > System.out.println("clientSession.isClosing() : " + > clientSession.isClosing()); > System.out.println("clientSession.isOpen() : " + > clientSession.isOpen()); > System.out.println("before auth().verify(): " + new > Date(System.currentTimeMillis())); > clientSession.auth().verify(); > {code} > The output and exception: > {quote}Tem 27, 2022 11:50:19 PM > org.apache.sshd.common.io.DefaultIoServiceFactoryFactory getIoServiceProvider > INFO: No detected/configured IoServiceFactoryFactory using > Nio2ServiceFactoryFactory > clientSession.getSessionState(): [] > clientSession.isClosed() : false > clientSession.isClosing() : false > clientSession.isOpen() : true > before addPasswordIdentity: Wed Jul 27 23:50:19 EET 2022 > clientSession.getSessionState(): [] > clientSession.isClosed() : false > clientSession.isClosing() : false > clientSession.isOpen() : true > before auth().verify(): Wed Jul 27 23:50:22 EET 2022 > Tem 27, 2022 11:52:20 PM org.apache.sshd.common.session.helpers.SessionHelper > disconnect > INFO: Disconnecting(ClientSessionImpl[deneme@/127.0.0.1:22]): > SSH2_DISCONNECT_PROTOCOL_ERROR - Detected AuthTimeout after 120687/12 ms. > Exception in thread "main" org.apache.sshd.common.SshException: Session is > being closed > at > org.apache.sshd.common.future.AbstractSshFuture.verifyResult(AbstractSshFuture.java:127) > at > org.apache.sshd.client.future.DefaultAuthFuture.verify(DefaultAuthFuture.java:39) > at > org.apache.sshd.client.future.DefaultAuthFuture.verify(DefaultAuthFuture.java:32) > at > org.apache.sshd.common.future.VerifiableFuture.verify(VerifiableFuture.java:43) > at > com.ubtools.ubutils.system.impl.UBSSHDProcessProvider.getServiceConnection(UBSSHDProcessProvider.java:85) > at > com.ubtools.ubutils.system.impl.UBSSHDProcessProvider.getServiceConnection(UBSSHDProcessProvider.java:19) > at > com.ubtools.ubutils.service.UBServiceManager.getServiceConnection(UBServiceManager.java:135) > at com.ubtools.ubutils.UBExec.main(UBExec.java:33) > Caused by: org.apache.sshd.common.SshException: Session is being closed > at > org.apache.sshd.client.session.ClientSessionImpl.preClose(ClientSessionImpl.java:169) > at > org.apache.sshd.common.util.closeable.AbstractCloseable.close(AbstractCloseable.java:94) > at > org.apache.sshd.common.session.helpers.AbstractSessionIoHandler.sessionClosed(AbstractSessionIoHandler.ja
[jira] [Commented] (SSHD-1281) ClientSession.auth().verify() is terminated with timeout
[ https://issues.apache.org/jira/browse/SSHD-1281?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17573331#comment-17573331 ] dgü commented on SSHD-1281: --- Summary: - Root cause: SSHD terminates network connection. This needs furher analysis to find the root cause that it is out of my expertise - Symptom: SSHD is not aware of network termination > ClientSession.auth().verify() is terminated with timeout > > > Key: SSHD-1281 > URL: https://issues.apache.org/jira/browse/SSHD-1281 > Project: MINA SSHD > Issue Type: Bug >Affects Versions: 2.9.0 > Environment: Java SE 8, Apache NetBeans IDE 12.5, Bitvise SSH Server > 9.23 >Reporter: dgü >Priority: Major > Attachments: SSHD-NoTimeout-2.8.9.PNG, SSHDTimeout.PNG, > screenshot-1.png, screenshot-2.png, screenshot-3.png > > > Hello! > The following code works successfully in SSHD 2.8.0; but it fails in SSHD > 2.9.0: > {code:java} > final ClientSession clientSession = > SSH_CLIENT.connect(pURI.toString()).verify().getSession(); > System.out.println("clientSession.getSessionState(): " + > clientSession.getSessionState()); > System.out.println("clientSession.isClosed() : " + > clientSession.isClosed()); > System.out.println("clientSession.isClosing() : " + > clientSession.isClosing()); > System.out.println("clientSession.isOpen() : " + > clientSession.isOpen()); > System.out.println("before addPasswordIdentity: " + new > Date(System.currentTimeMillis())); > clientSession.addPasswordIdentity("deneme123"); > try { > Thread.sleep(3000); > } catch (InterruptedException ex) { > > Logger.getLogger(UBSSHDProcessProvider.class.getName()).log(Level.SEVERE, > null, ex); > } > System.out.println("clientSession.getSessionState(): " + > clientSession.getSessionState()); > System.out.println("clientSession.isClosed() : " + > clientSession.isClosed()); > System.out.println("clientSession.isClosing() : " + > clientSession.isClosing()); > System.out.println("clientSession.isOpen() : " + > clientSession.isOpen()); > System.out.println("before auth().verify(): " + new > Date(System.currentTimeMillis())); > clientSession.auth().verify(); > {code} > The output and exception: > {quote}Tem 27, 2022 11:50:19 PM > org.apache.sshd.common.io.DefaultIoServiceFactoryFactory getIoServiceProvider > INFO: No detected/configured IoServiceFactoryFactory using > Nio2ServiceFactoryFactory > clientSession.getSessionState(): [] > clientSession.isClosed() : false > clientSession.isClosing() : false > clientSession.isOpen() : true > before addPasswordIdentity: Wed Jul 27 23:50:19 EET 2022 > clientSession.getSessionState(): [] > clientSession.isClosed() : false > clientSession.isClosing() : false > clientSession.isOpen() : true > before auth().verify(): Wed Jul 27 23:50:22 EET 2022 > Tem 27, 2022 11:52:20 PM org.apache.sshd.common.session.helpers.SessionHelper > disconnect > INFO: Disconnecting(ClientSessionImpl[deneme@/127.0.0.1:22]): > SSH2_DISCONNECT_PROTOCOL_ERROR - Detected AuthTimeout after 120687/12 ms. > Exception in thread "main" org.apache.sshd.common.SshException: Session is > being closed > at > org.apache.sshd.common.future.AbstractSshFuture.verifyResult(AbstractSshFuture.java:127) > at > org.apache.sshd.client.future.DefaultAuthFuture.verify(DefaultAuthFuture.java:39) > at > org.apache.sshd.client.future.DefaultAuthFuture.verify(DefaultAuthFuture.java:32) > at > org.apache.sshd.common.future.VerifiableFuture.verify(VerifiableFuture.java:43) > at > com.ubtools.ubutils.system.impl.UBSSHDProcessProvider.getServiceConnection(UBSSHDProcessProvider.java:85) > at > com.ubtools.ubutils.system.impl.UBSSHDProcessProvider.getServiceConnection(UBSSHDProcessProvider.java:19) > at > com.ubtools.ubutils.service.UBServiceManager.getServiceConnection(UBServiceManager.java:135) > at com.ubtools.ubutils.UBExec.main(UBExec.java:33) > Caused by: org.apache.sshd.common.SshException: Session is being closed > at > org.apache.sshd.client.session.ClientSessionImpl.preClose(ClientSessionImpl.java:169) > at > org.apache.sshd.common.util.closeable.AbstractCloseable.close(AbstractCloseable.java:94) > at > org.apache.sshd.common.session.helpers.AbstractSessionIoHandler.sessionClosed(AbstractSessionIoHandler.java:46) > at > org.apache.sshd.common.io.nio2.Nio2Session.doCloseImmediately(Nio2Session.java:283) > at > org.apache.sshd.common.util.closeable.AbstractCloseable.close(AbstractCloseable.java:95) > at > org.apache.sshd.common.io.nio2.Nio2Session.exceptionCaught(Nio2Session.java:215) > at > org.apache.sshd.common.io.nio2.Nio2Session.handleWriteCycleFailure(Nio2Sessio
[jira] [Commented] (SSHD-1281) ClientSession.auth().verify() is terminated with timeout
[ https://issues.apache.org/jira/browse/SSHD-1281?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17573330#comment-17573330 ] dgü commented on SSHD-1281: --- I did further debugging of the following code by Netbeans debugger: The code: {code:java} ClientSession clientSession = SSH_CLIENT.connect(pURI.toString()).verify().getSession(); {code} According to my observation, SSHD 2.9.0 terminates the network connection termination. These are the steps: - _SSH_CLIENT.connect(pURI.toString())_ is called - _socket.connect(address, null, completionHandler)_ in _org.apache.sshd.common.io.nio2.Nio2Connector#connect(SocketAddress, AttributeRepository, SocketAddress)_ creates network connection - _session.startReading()_ line in _org.apache.sshd.common.io.nio2.Nio2Connector.ConnectionCompletionHandler#onCompleted(Void,Object)_ causes failing into the exception block - Network connection is terminated by _socket.close()_ in the exception block - Bitvise SSH Server pops up a connection termination message immediately - _verify()_ is called - _getSession()_ is called > ClientSession.auth().verify() is terminated with timeout > > > Key: SSHD-1281 > URL: https://issues.apache.org/jira/browse/SSHD-1281 > Project: MINA SSHD > Issue Type: Bug >Affects Versions: 2.9.0 > Environment: Java SE 8, Apache NetBeans IDE 12.5, Bitvise SSH Server > 9.23 >Reporter: dgü >Priority: Major > Attachments: SSHD-NoTimeout-2.8.9.PNG, SSHDTimeout.PNG, > screenshot-1.png, screenshot-2.png, screenshot-3.png > > > Hello! > The following code works successfully in SSHD 2.8.0; but it fails in SSHD > 2.9.0: > {code:java} > final ClientSession clientSession = > SSH_CLIENT.connect(pURI.toString()).verify().getSession(); > System.out.println("clientSession.getSessionState(): " + > clientSession.getSessionState()); > System.out.println("clientSession.isClosed() : " + > clientSession.isClosed()); > System.out.println("clientSession.isClosing() : " + > clientSession.isClosing()); > System.out.println("clientSession.isOpen() : " + > clientSession.isOpen()); > System.out.println("before addPasswordIdentity: " + new > Date(System.currentTimeMillis())); > clientSession.addPasswordIdentity("deneme123"); > try { > Thread.sleep(3000); > } catch (InterruptedException ex) { > > Logger.getLogger(UBSSHDProcessProvider.class.getName()).log(Level.SEVERE, > null, ex); > } > System.out.println("clientSession.getSessionState(): " + > clientSession.getSessionState()); > System.out.println("clientSession.isClosed() : " + > clientSession.isClosed()); > System.out.println("clientSession.isClosing() : " + > clientSession.isClosing()); > System.out.println("clientSession.isOpen() : " + > clientSession.isOpen()); > System.out.println("before auth().verify(): " + new > Date(System.currentTimeMillis())); > clientSession.auth().verify(); > {code} > The output and exception: > {quote}Tem 27, 2022 11:50:19 PM > org.apache.sshd.common.io.DefaultIoServiceFactoryFactory getIoServiceProvider > INFO: No detected/configured IoServiceFactoryFactory using > Nio2ServiceFactoryFactory > clientSession.getSessionState(): [] > clientSession.isClosed() : false > clientSession.isClosing() : false > clientSession.isOpen() : true > before addPasswordIdentity: Wed Jul 27 23:50:19 EET 2022 > clientSession.getSessionState(): [] > clientSession.isClosed() : false > clientSession.isClosing() : false > clientSession.isOpen() : true > before auth().verify(): Wed Jul 27 23:50:22 EET 2022 > Tem 27, 2022 11:52:20 PM org.apache.sshd.common.session.helpers.SessionHelper > disconnect > INFO: Disconnecting(ClientSessionImpl[deneme@/127.0.0.1:22]): > SSH2_DISCONNECT_PROTOCOL_ERROR - Detected AuthTimeout after 120687/12 ms. > Exception in thread "main" org.apache.sshd.common.SshException: Session is > being closed > at > org.apache.sshd.common.future.AbstractSshFuture.verifyResult(AbstractSshFuture.java:127) > at > org.apache.sshd.client.future.DefaultAuthFuture.verify(DefaultAuthFuture.java:39) > at > org.apache.sshd.client.future.DefaultAuthFuture.verify(DefaultAuthFuture.java:32) > at > org.apache.sshd.common.future.VerifiableFuture.verify(VerifiableFuture.java:43) > at > com.ubtools.ubutils.system.impl.UBSSHDProcessProvider.getServiceConnection(UBSSHDProcessProvider.java:85) > at > com.ubtools.ubutils.system.impl.UBSSHDProcessProvider.getServiceConnection(UBSSHDProcessProvider.java:19) > at > com.ubtools.ubutils.service.UBServiceManager.getServiceConnection(UBServiceManager.java:135) > at com.ubtools.ubutils.UBExec.main(UBExec.java:33) > Caused by: org.apach
[jira] [Commented] (SSHD-1281) ClientSession.auth().verify() is terminated with timeout
[ https://issues.apache.org/jira/browse/SSHD-1281?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17573315#comment-17573315 ] dgü commented on SSHD-1281: --- I think this issue should be reopened to fix _missing termination of network connection_ even it's symptom. Otherwise, unexpected behaviours happen as authentication timeout happened in this issue. > ClientSession.auth().verify() is terminated with timeout > > > Key: SSHD-1281 > URL: https://issues.apache.org/jira/browse/SSHD-1281 > Project: MINA SSHD > Issue Type: Bug >Affects Versions: 2.9.0 > Environment: Java SE 8, Apache NetBeans IDE 12.5, Bitvise SSH Server > 9.23 >Reporter: dgü >Priority: Major > Attachments: SSHD-NoTimeout-2.8.9.PNG, SSHDTimeout.PNG, > screenshot-1.png, screenshot-2.png, screenshot-3.png > > > Hello! > The following code works successfully in SSHD 2.8.0; but it fails in SSHD > 2.9.0: > {code:java} > final ClientSession clientSession = > SSH_CLIENT.connect(pURI.toString()).verify().getSession(); > System.out.println("clientSession.getSessionState(): " + > clientSession.getSessionState()); > System.out.println("clientSession.isClosed() : " + > clientSession.isClosed()); > System.out.println("clientSession.isClosing() : " + > clientSession.isClosing()); > System.out.println("clientSession.isOpen() : " + > clientSession.isOpen()); > System.out.println("before addPasswordIdentity: " + new > Date(System.currentTimeMillis())); > clientSession.addPasswordIdentity("deneme123"); > try { > Thread.sleep(3000); > } catch (InterruptedException ex) { > > Logger.getLogger(UBSSHDProcessProvider.class.getName()).log(Level.SEVERE, > null, ex); > } > System.out.println("clientSession.getSessionState(): " + > clientSession.getSessionState()); > System.out.println("clientSession.isClosed() : " + > clientSession.isClosed()); > System.out.println("clientSession.isClosing() : " + > clientSession.isClosing()); > System.out.println("clientSession.isOpen() : " + > clientSession.isOpen()); > System.out.println("before auth().verify(): " + new > Date(System.currentTimeMillis())); > clientSession.auth().verify(); > {code} > The output and exception: > {quote}Tem 27, 2022 11:50:19 PM > org.apache.sshd.common.io.DefaultIoServiceFactoryFactory getIoServiceProvider > INFO: No detected/configured IoServiceFactoryFactory using > Nio2ServiceFactoryFactory > clientSession.getSessionState(): [] > clientSession.isClosed() : false > clientSession.isClosing() : false > clientSession.isOpen() : true > before addPasswordIdentity: Wed Jul 27 23:50:19 EET 2022 > clientSession.getSessionState(): [] > clientSession.isClosed() : false > clientSession.isClosing() : false > clientSession.isOpen() : true > before auth().verify(): Wed Jul 27 23:50:22 EET 2022 > Tem 27, 2022 11:52:20 PM org.apache.sshd.common.session.helpers.SessionHelper > disconnect > INFO: Disconnecting(ClientSessionImpl[deneme@/127.0.0.1:22]): > SSH2_DISCONNECT_PROTOCOL_ERROR - Detected AuthTimeout after 120687/12 ms. > Exception in thread "main" org.apache.sshd.common.SshException: Session is > being closed > at > org.apache.sshd.common.future.AbstractSshFuture.verifyResult(AbstractSshFuture.java:127) > at > org.apache.sshd.client.future.DefaultAuthFuture.verify(DefaultAuthFuture.java:39) > at > org.apache.sshd.client.future.DefaultAuthFuture.verify(DefaultAuthFuture.java:32) > at > org.apache.sshd.common.future.VerifiableFuture.verify(VerifiableFuture.java:43) > at > com.ubtools.ubutils.system.impl.UBSSHDProcessProvider.getServiceConnection(UBSSHDProcessProvider.java:85) > at > com.ubtools.ubutils.system.impl.UBSSHDProcessProvider.getServiceConnection(UBSSHDProcessProvider.java:19) > at > com.ubtools.ubutils.service.UBServiceManager.getServiceConnection(UBServiceManager.java:135) > at com.ubtools.ubutils.UBExec.main(UBExec.java:33) > Caused by: org.apache.sshd.common.SshException: Session is being closed > at > org.apache.sshd.client.session.ClientSessionImpl.preClose(ClientSessionImpl.java:169) > at > org.apache.sshd.common.util.closeable.AbstractCloseable.close(AbstractCloseable.java:94) > at > org.apache.sshd.common.session.helpers.AbstractSessionIoHandler.sessionClosed(AbstractSessionIoHandler.java:46) > at > org.apache.sshd.common.io.nio2.Nio2Session.doCloseImmediately(Nio2Session.java:283) > at > org.apache.sshd.common.util.closeable.AbstractCloseable.close(AbstractCloseable.java:95) > at > org.apache.sshd.common.io.nio2.Nio2Session.exceptionCaught(Nio2Session.java:215) > at > org.apache.sshd.common.io.nio2.Nio2Session.handleWriteCycleFailure(Nio2Sess
[jira] [Commented] (SSHD-1281) ClientSession.auth().verify() is terminated with timeout
[ https://issues.apache.org/jira/browse/SSHD-1281?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17573314#comment-17573314 ] dgü commented on SSHD-1281: --- If problem is not reproduced in your environment, it doesn't mean that there is no problem in your environment. In my environment, the result is {_}positive{_}, which means I can reproduce the problem. In your environment, the result is {_}negative{_}, which means there may a problem or not, but it could not be reproduced. > ClientSession.auth().verify() is terminated with timeout > > > Key: SSHD-1281 > URL: https://issues.apache.org/jira/browse/SSHD-1281 > Project: MINA SSHD > Issue Type: Bug >Affects Versions: 2.9.0 > Environment: Java SE 8, Apache NetBeans IDE 12.5, Bitvise SSH Server > 9.23 >Reporter: dgü >Priority: Major > Attachments: SSHD-NoTimeout-2.8.9.PNG, SSHDTimeout.PNG, > screenshot-1.png, screenshot-2.png, screenshot-3.png > > > Hello! > The following code works successfully in SSHD 2.8.0; but it fails in SSHD > 2.9.0: > {code:java} > final ClientSession clientSession = > SSH_CLIENT.connect(pURI.toString()).verify().getSession(); > System.out.println("clientSession.getSessionState(): " + > clientSession.getSessionState()); > System.out.println("clientSession.isClosed() : " + > clientSession.isClosed()); > System.out.println("clientSession.isClosing() : " + > clientSession.isClosing()); > System.out.println("clientSession.isOpen() : " + > clientSession.isOpen()); > System.out.println("before addPasswordIdentity: " + new > Date(System.currentTimeMillis())); > clientSession.addPasswordIdentity("deneme123"); > try { > Thread.sleep(3000); > } catch (InterruptedException ex) { > > Logger.getLogger(UBSSHDProcessProvider.class.getName()).log(Level.SEVERE, > null, ex); > } > System.out.println("clientSession.getSessionState(): " + > clientSession.getSessionState()); > System.out.println("clientSession.isClosed() : " + > clientSession.isClosed()); > System.out.println("clientSession.isClosing() : " + > clientSession.isClosing()); > System.out.println("clientSession.isOpen() : " + > clientSession.isOpen()); > System.out.println("before auth().verify(): " + new > Date(System.currentTimeMillis())); > clientSession.auth().verify(); > {code} > The output and exception: > {quote}Tem 27, 2022 11:50:19 PM > org.apache.sshd.common.io.DefaultIoServiceFactoryFactory getIoServiceProvider > INFO: No detected/configured IoServiceFactoryFactory using > Nio2ServiceFactoryFactory > clientSession.getSessionState(): [] > clientSession.isClosed() : false > clientSession.isClosing() : false > clientSession.isOpen() : true > before addPasswordIdentity: Wed Jul 27 23:50:19 EET 2022 > clientSession.getSessionState(): [] > clientSession.isClosed() : false > clientSession.isClosing() : false > clientSession.isOpen() : true > before auth().verify(): Wed Jul 27 23:50:22 EET 2022 > Tem 27, 2022 11:52:20 PM org.apache.sshd.common.session.helpers.SessionHelper > disconnect > INFO: Disconnecting(ClientSessionImpl[deneme@/127.0.0.1:22]): > SSH2_DISCONNECT_PROTOCOL_ERROR - Detected AuthTimeout after 120687/12 ms. > Exception in thread "main" org.apache.sshd.common.SshException: Session is > being closed > at > org.apache.sshd.common.future.AbstractSshFuture.verifyResult(AbstractSshFuture.java:127) > at > org.apache.sshd.client.future.DefaultAuthFuture.verify(DefaultAuthFuture.java:39) > at > org.apache.sshd.client.future.DefaultAuthFuture.verify(DefaultAuthFuture.java:32) > at > org.apache.sshd.common.future.VerifiableFuture.verify(VerifiableFuture.java:43) > at > com.ubtools.ubutils.system.impl.UBSSHDProcessProvider.getServiceConnection(UBSSHDProcessProvider.java:85) > at > com.ubtools.ubutils.system.impl.UBSSHDProcessProvider.getServiceConnection(UBSSHDProcessProvider.java:19) > at > com.ubtools.ubutils.service.UBServiceManager.getServiceConnection(UBServiceManager.java:135) > at com.ubtools.ubutils.UBExec.main(UBExec.java:33) > Caused by: org.apache.sshd.common.SshException: Session is being closed > at > org.apache.sshd.client.session.ClientSessionImpl.preClose(ClientSessionImpl.java:169) > at > org.apache.sshd.common.util.closeable.AbstractCloseable.close(AbstractCloseable.java:94) > at > org.apache.sshd.common.session.helpers.AbstractSessionIoHandler.sessionClosed(AbstractSessionIoHandler.java:46) > at > org.apache.sshd.common.io.nio2.Nio2Session.doCloseImmediately(Nio2Session.java:283) > at > org.apache.sshd.common.util.closeable.AbstractCloseable.close(AbstractCloseable.java:95) > at > org.apache.sshd.common.io.nio2.Nio2
[jira] [Commented] (SSHD-1281) ClientSession.auth().verify() is terminated with timeout
[ https://issues.apache.org/jira/browse/SSHD-1281?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17573313#comment-17573313 ] dgü commented on SSHD-1281: --- Correction of the typo: Anyway, SSHD should catch the termination of network connection. > ClientSession.auth().verify() is terminated with timeout > > > Key: SSHD-1281 > URL: https://issues.apache.org/jira/browse/SSHD-1281 > Project: MINA SSHD > Issue Type: Bug >Affects Versions: 2.9.0 > Environment: Java SE 8, Apache NetBeans IDE 12.5, Bitvise SSH Server > 9.23 >Reporter: dgü >Priority: Major > Attachments: SSHD-NoTimeout-2.8.9.PNG, SSHDTimeout.PNG, > screenshot-1.png, screenshot-2.png, screenshot-3.png > > > Hello! > The following code works successfully in SSHD 2.8.0; but it fails in SSHD > 2.9.0: > {code:java} > final ClientSession clientSession = > SSH_CLIENT.connect(pURI.toString()).verify().getSession(); > System.out.println("clientSession.getSessionState(): " + > clientSession.getSessionState()); > System.out.println("clientSession.isClosed() : " + > clientSession.isClosed()); > System.out.println("clientSession.isClosing() : " + > clientSession.isClosing()); > System.out.println("clientSession.isOpen() : " + > clientSession.isOpen()); > System.out.println("before addPasswordIdentity: " + new > Date(System.currentTimeMillis())); > clientSession.addPasswordIdentity("deneme123"); > try { > Thread.sleep(3000); > } catch (InterruptedException ex) { > > Logger.getLogger(UBSSHDProcessProvider.class.getName()).log(Level.SEVERE, > null, ex); > } > System.out.println("clientSession.getSessionState(): " + > clientSession.getSessionState()); > System.out.println("clientSession.isClosed() : " + > clientSession.isClosed()); > System.out.println("clientSession.isClosing() : " + > clientSession.isClosing()); > System.out.println("clientSession.isOpen() : " + > clientSession.isOpen()); > System.out.println("before auth().verify(): " + new > Date(System.currentTimeMillis())); > clientSession.auth().verify(); > {code} > The output and exception: > {quote}Tem 27, 2022 11:50:19 PM > org.apache.sshd.common.io.DefaultIoServiceFactoryFactory getIoServiceProvider > INFO: No detected/configured IoServiceFactoryFactory using > Nio2ServiceFactoryFactory > clientSession.getSessionState(): [] > clientSession.isClosed() : false > clientSession.isClosing() : false > clientSession.isOpen() : true > before addPasswordIdentity: Wed Jul 27 23:50:19 EET 2022 > clientSession.getSessionState(): [] > clientSession.isClosed() : false > clientSession.isClosing() : false > clientSession.isOpen() : true > before auth().verify(): Wed Jul 27 23:50:22 EET 2022 > Tem 27, 2022 11:52:20 PM org.apache.sshd.common.session.helpers.SessionHelper > disconnect > INFO: Disconnecting(ClientSessionImpl[deneme@/127.0.0.1:22]): > SSH2_DISCONNECT_PROTOCOL_ERROR - Detected AuthTimeout after 120687/12 ms. > Exception in thread "main" org.apache.sshd.common.SshException: Session is > being closed > at > org.apache.sshd.common.future.AbstractSshFuture.verifyResult(AbstractSshFuture.java:127) > at > org.apache.sshd.client.future.DefaultAuthFuture.verify(DefaultAuthFuture.java:39) > at > org.apache.sshd.client.future.DefaultAuthFuture.verify(DefaultAuthFuture.java:32) > at > org.apache.sshd.common.future.VerifiableFuture.verify(VerifiableFuture.java:43) > at > com.ubtools.ubutils.system.impl.UBSSHDProcessProvider.getServiceConnection(UBSSHDProcessProvider.java:85) > at > com.ubtools.ubutils.system.impl.UBSSHDProcessProvider.getServiceConnection(UBSSHDProcessProvider.java:19) > at > com.ubtools.ubutils.service.UBServiceManager.getServiceConnection(UBServiceManager.java:135) > at com.ubtools.ubutils.UBExec.main(UBExec.java:33) > Caused by: org.apache.sshd.common.SshException: Session is being closed > at > org.apache.sshd.client.session.ClientSessionImpl.preClose(ClientSessionImpl.java:169) > at > org.apache.sshd.common.util.closeable.AbstractCloseable.close(AbstractCloseable.java:94) > at > org.apache.sshd.common.session.helpers.AbstractSessionIoHandler.sessionClosed(AbstractSessionIoHandler.java:46) > at > org.apache.sshd.common.io.nio2.Nio2Session.doCloseImmediately(Nio2Session.java:283) > at > org.apache.sshd.common.util.closeable.AbstractCloseable.close(AbstractCloseable.java:95) > at > org.apache.sshd.common.io.nio2.Nio2Session.exceptionCaught(Nio2Session.java:215) > at > org.apache.sshd.common.io.nio2.Nio2Session.handleWriteCycleFailure(Nio2Session.java:548) > at org.apache.sshd.common.io.nio2.Nio2Session$2.onFailed(Nio2Session.java:506) > at > org.ap
[jira] [Commented] (SSHD-1281) ClientSession.auth().verify() is terminated with timeout
[ https://issues.apache.org/jira/browse/SSHD-1281?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17573311#comment-17573311 ] dgü commented on SSHD-1281: --- I debuged the following code by Netbeans debugger: The code: {code:java} ClientSession clientSession = SSH_CLIENT.connect(pURI.toString()).verify().getSession(); {code} According to my observation, SSHD 2.9.0 misses network connection termination. These are the steps: - _SSH_CLIENT.connect(pURI.toString())_ is called - _socket.connect(address, null, completionHandler)_ in _org.apache.sshd.common.io.nio2.Nio2Connector#connect(SocketAddress, AttributeRepository, SocketAddress)_ creates network connection. But, this connection is terminated immediately - Network connection termination is not caught by SSHD - _verify()_ is called - _getSession()_ is called I still don't know why network connection is terminated. Anyway, SSHD should catch the network connection. > ClientSession.auth().verify() is terminated with timeout > > > Key: SSHD-1281 > URL: https://issues.apache.org/jira/browse/SSHD-1281 > Project: MINA SSHD > Issue Type: Bug >Affects Versions: 2.9.0 > Environment: Java SE 8, Apache NetBeans IDE 12.5, Bitvise SSH Server > 9.23 >Reporter: dgü >Priority: Major > Attachments: SSHD-NoTimeout-2.8.9.PNG, SSHDTimeout.PNG, > screenshot-1.png, screenshot-2.png, screenshot-3.png > > > Hello! > The following code works successfully in SSHD 2.8.0; but it fails in SSHD > 2.9.0: > {code:java} > final ClientSession clientSession = > SSH_CLIENT.connect(pURI.toString()).verify().getSession(); > System.out.println("clientSession.getSessionState(): " + > clientSession.getSessionState()); > System.out.println("clientSession.isClosed() : " + > clientSession.isClosed()); > System.out.println("clientSession.isClosing() : " + > clientSession.isClosing()); > System.out.println("clientSession.isOpen() : " + > clientSession.isOpen()); > System.out.println("before addPasswordIdentity: " + new > Date(System.currentTimeMillis())); > clientSession.addPasswordIdentity("deneme123"); > try { > Thread.sleep(3000); > } catch (InterruptedException ex) { > > Logger.getLogger(UBSSHDProcessProvider.class.getName()).log(Level.SEVERE, > null, ex); > } > System.out.println("clientSession.getSessionState(): " + > clientSession.getSessionState()); > System.out.println("clientSession.isClosed() : " + > clientSession.isClosed()); > System.out.println("clientSession.isClosing() : " + > clientSession.isClosing()); > System.out.println("clientSession.isOpen() : " + > clientSession.isOpen()); > System.out.println("before auth().verify(): " + new > Date(System.currentTimeMillis())); > clientSession.auth().verify(); > {code} > The output and exception: > {quote}Tem 27, 2022 11:50:19 PM > org.apache.sshd.common.io.DefaultIoServiceFactoryFactory getIoServiceProvider > INFO: No detected/configured IoServiceFactoryFactory using > Nio2ServiceFactoryFactory > clientSession.getSessionState(): [] > clientSession.isClosed() : false > clientSession.isClosing() : false > clientSession.isOpen() : true > before addPasswordIdentity: Wed Jul 27 23:50:19 EET 2022 > clientSession.getSessionState(): [] > clientSession.isClosed() : false > clientSession.isClosing() : false > clientSession.isOpen() : true > before auth().verify(): Wed Jul 27 23:50:22 EET 2022 > Tem 27, 2022 11:52:20 PM org.apache.sshd.common.session.helpers.SessionHelper > disconnect > INFO: Disconnecting(ClientSessionImpl[deneme@/127.0.0.1:22]): > SSH2_DISCONNECT_PROTOCOL_ERROR - Detected AuthTimeout after 120687/12 ms. > Exception in thread "main" org.apache.sshd.common.SshException: Session is > being closed > at > org.apache.sshd.common.future.AbstractSshFuture.verifyResult(AbstractSshFuture.java:127) > at > org.apache.sshd.client.future.DefaultAuthFuture.verify(DefaultAuthFuture.java:39) > at > org.apache.sshd.client.future.DefaultAuthFuture.verify(DefaultAuthFuture.java:32) > at > org.apache.sshd.common.future.VerifiableFuture.verify(VerifiableFuture.java:43) > at > com.ubtools.ubutils.system.impl.UBSSHDProcessProvider.getServiceConnection(UBSSHDProcessProvider.java:85) > at > com.ubtools.ubutils.system.impl.UBSSHDProcessProvider.getServiceConnection(UBSSHDProcessProvider.java:19) > at > com.ubtools.ubutils.service.UBServiceManager.getServiceConnection(UBServiceManager.java:135) > at com.ubtools.ubutils.UBExec.main(UBExec.java:33) > Caused by: org.apache.sshd.common.SshException: Session is being closed > at > org.apache.sshd.client.session.ClientSessionImpl.preClose(ClientSessionImpl.java:1
Re: Infinite loop in Apache Directory Server when using MINA 2.2.1
Seems like it's an issue with a mixed Java version being used: the lib built with Java 11 and running tests in Java 8, or something like that. Still investigating. On 30/07/2022 10:03, Emmanuel Lécharny wrote: Hi, I'm currently investiagting some infinite loop in Apache DS when setting up a LDAPS server. I have no idea what's going on atm - but I will keep you posted. Here is the trace I get when doing a kill -3: "NioProcesso-- *Emmanuel Lécharny - CTO* 205 Promenade des Anglais – 06200 NICE T. +33 (0)4 89 97 36 50 P. +33 (0)6 08 33 32 61 emmanuel.lecha...@busit.com https://www.busit.com/ - To unsubscribe, e-mail: dev-unsubscr...@mina.apache.org For additional commands, e-mail: dev-h...@mina.apache.org