Re: [VOTE] Release Apache Mina SSHD 2.9.0

2022-07-12 Thread Thomas Wolf

On 13.07.22 00:20 , Emmanuel Lécharny wrote:

Hi Guillaume,

I get some error while running tests:

[ERROR] Tests run: 6, Failures: 0, Errors: 6, Skipped: 0, Time elapsed: 
33.642 s <<< FAILURE! - in 
org.apache.sshd.client.auth.pubkey.HostBoundPubKeyAuthTest
[ERROR] 
org.apache.sshd.client.auth.pubkey.HostBoundPubKeyAuthTest.testPubkeyAuth[user01_rsa_sha2_512_2048] 
  Time elapsed: 5.598 s  <<< ERROR!
org.testcontainers.containers.ContainerLaunchException: Container 
startup failed



I have Docker started on my Mac, and it should work (I have another 
project using test container), but maybe this is an issue with the mac 
OS upgrade I did 2 weeks ago.


Indeed, building from the expanded source tar gives such test failures,
also for our other testcontainers tests. The problem is that the
entrypoint.sh files in the test resources don't have the executable bit
set.

Looks like the container setup has to ensure the files get copied into
the container with the executable bit set. I'll push a PR to fix this
probably tonight.

Cheers,

  Thomas



-
To unsubscribe, e-mail: dev-unsubscr...@mina.apache.org
For additional commands, e-mail: dev-h...@mina.apache.org



Re: Exception in filter (was: Re: [Vote] MINA 2.2.0 release)

2022-07-12 Thread Emmanuel Lécharny

Here are some of my current findings.

For the (failing) test shouldFailWhenUsingBadClientCertificate, here are 
the traces we get:


juil. 13, 2022 6:28:42 AM org.apache.mina.filter.ssl.SSLHandlerG0 
execute_task
GRAVE: SSLHandlerG0@ae273e3[mode=server, connected=false] task() - 
storing error {}
javax.net.ssl.SSLHandshakeException: PKIX path validation failed: 
java.security.cert.CertPathValidatorException: signature check failed

at java.base/sun.security.ssl.Alert.createSSLException(Alert.java:131)
	at 
java.base/sun.security.ssl.TransportContext.fatal(TransportContext.java:349)
	at 
java.base/sun.security.ssl.TransportContext.fatal(TransportContext.java:292)
	at 
java.base/sun.security.ssl.TransportContext.fatal(TransportContext.java:287)
	at 
java.base/sun.security.ssl.CertificateMessage$T12CertificateConsumer.checkClientCerts(CertificateMessage.java:700)
	at 
java.base/sun.security.ssl.CertificateMessage$T12CertificateConsumer.onCertificate(CertificateMessage.java:411)
	at 
java.base/sun.security.ssl.CertificateMessage$T12CertificateConsumer.consume(CertificateMessage.java:375)

at 
java.base/sun.security.ssl.SSLHandshake.consume(SSLHandshake.java:392)
	at 
java.base/sun.security.ssl.HandshakeContext.dispatch(HandshakeContext.java:443)
	at 
java.base/sun.security.ssl.SSLEngineImpl$DelegatedTask$DelegatedAction.run(SSLEngineImpl.java:1074)
	at 
java.base/sun.security.ssl.SSLEngineImpl$DelegatedTask$DelegatedAction.run(SSLEngineImpl.java:1061)

at java.base/java.security.AccessController.doPrivileged(Native Method)
	at 
java.base/sun.security.ssl.SSLEngineImpl$DelegatedTask.run(SSLEngineImpl.java:1008)
	at 
org.apache.mina.filter.ssl.SSLHandlerG0.execute_task(SSLHandlerG0.java:743)
	at 
org.apache.mina.filter.ssl.SSLHandlerG0.receive_loop(SSLHandlerG0.java:255)

at 
org.apache.mina.filter.ssl.SSLHandlerG0.receive(SSLHandlerG0.java:162)
at 
org.apache.mina.filter.ssl.SslFilter.messageReceived(SslFilter.java:342)
	at 
org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:650)
	at 
org.apache.mina.core.filterchain.DefaultIoFilterChain.access$1300(DefaultIoFilterChain.java:49)
	at 
org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.messageReceived(DefaultIoFilterChain.java:1128)
	at 
org.apache.mina.core.filterchain.IoFilterAdapter.messageReceived(IoFilterAdapter.java:122)
	at 
org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:650)
	at 
org.apache.mina.core.filterchain.DefaultIoFilterChain.access$1300(DefaultIoFilterChain.java:49)
	at 
org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.messageReceived(DefaultIoFilterChain.java:1128)
	at 
org.apache.mina.core.filterchain.IoFilterAdapter.messageReceived(IoFilterAdapter.java:122)
	at 
org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:650)
	at 
org.apache.mina.core.filterchain.DefaultIoFilterChain.fireMessageReceived(DefaultIoFilterChain.java:643)
	at 
org.apache.mina.core.polling.AbstractPollingIoProcessor.read(AbstractPollingIoProcessor.java:539)
	at 
org.apache.mina.core.polling.AbstractPollingIoProcessor.access$1200(AbstractPollingIoProcessor.java:68)
	at 
org.apache.mina.core.polling.AbstractPollingIoProcessor$Processor.process(AbstractPollingIoProcessor.java:1224)
	at 
org.apache.mina.core.polling.AbstractPollingIoProcessor$Processor.process(AbstractPollingIoProcessor.java:1213)
	at 
org.apache.mina.core.polling.AbstractPollingIoProcessor$Processor.run(AbstractPollingIoProcessor.java:683)
	at 
org.apache.mina.util.NamePreservingRunnable.run(NamePreservingRunnable.java:64)
	at 
java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at 
java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)

at java.base/java.lang.Thread.run(Thread.java:829)
Caused by: sun.security.validator.ValidatorException: PKIX path 
validation failed: java.security.cert.CertPathValidatorException: 
signature check failed
	at 
java.base/sun.security.validator.PKIXValidator.doValidate(PKIXValidator.java:369)
	at 
java.base/sun.security.validator.PKIXValidator.engineValidate(PKIXValidator.java:275)

at 
java.base/sun.security.validator.Validator.validate(Validator.java:264)
	at 
java.base/sun.security.ssl.X509TrustManagerImpl.validate(X509TrustManagerImpl.java:313)
	at 
java.base/sun.security.ssl.X509TrustManagerImpl.checkTrusted(X509TrustManagerImpl.java:233)
	at 
java.base/sun.security.ssl.X509TrustManagerImpl.checkClientTrusted(X509TrustManagerImpl.java:104)
	at 
quickfix.mina.ssl.X509TrustManagerWrapper.checkClientTrusted(X509TrustManagerWrapper.java:60)
	at 
java.base/sun.security.ssl.AbstractTrustManagerWrapper.checkClientTrusted(SSLContextImpl.java:1517)
	at 
java.base/sun.security.ssl.CertificateMessage$T12CertificateConsumer.checkClientCerts(CertificateMessage.java:6

Re: Exception in filter (was: Re: [Vote] MINA 2.2.0 release)

2022-07-12 Thread Emmanuel Lécharny

Never mind, I'm set up now, and in debug mode. All is good !

On 13/07/2022 00:47, Emmanuel Lécharny wrote:

Hi Christoph,

I'm trying to  ran the failing tests on my machine (eclipse with Java 8 
and Java 11), and I'll probably need some assistance.



I'm using the chrjohn-mina-2.2.0 branch. It seems that the generated 
code is not stored at the proper place.


Any clue?


On 09/07/2022 11:49, Christoph John wrote:
Thanks. Anything I can do to assist? Although I might only find time 
the week after next because am currently on vacation.


Jul 9, 2022 09:00:21 Emmanuel Lécharny :

I do think we need to have a look at it (and I may find some time to 
do it too, as I'm in vacation in the coming week)


However, I think we should get this 2.0 out. Ther eis no problem in 
releasing a fix if needed.


Thanks !

On 09/07/2022 07:17, Jonathan Valliere wrote:

Sooo… do I need to look into this or was this resolved?
On Fri, Jul 8, 2022 at 11:51 PM Emmanuel Lécharny 
mailto:elecha...@gmail.com>> wrote:

 The changes I did were to ensure that any ouutbound data are sent
 when a
 TLS erroroccurs, because the Alert must be sent no matter what. 
This is

 critical for a client to know what is the cause of the failure
 (typically when a bad certificate is provided - expired, revoked,
 etc -):
 https://datatracker.ietf.org/doc/html/rfc5246#section-7.2
 
 I also checked that in this case an exception is propagated up 
to the

 IoHandler for teh server to be informed about the situuation.

 On 06/07/2022 12:42, Jonathan Valliere wrote:
  >   What test are you trying?  Emmanuel made changes from the
 original design
  > to cause it to throw on the filter.  My original design 
threw on

 the filter
  > but only during a subsequent read or write action thereby
 enforcing strong
  > concurrency within the pipeline.
  >
  > On Jul 6, 2022 at 3:53:57 AM, Christoph John
  > mailto:christoph.j...@macd.com>.invalid> wrote:
  >
  >> Ok, the tests in QuickFIX/J which expect the exception to be
 caught in a
  >> filter still don't work.
  >> I recall that you also did some changes in other Apache 
projects

 to make
  >> it work with MINA 2.2.0. Could it be that I also need to adapt
 something in
  >> this regard?
  >>
  >> Thanks
  >> Chris
  >>
  >> Jul 5, 2022 18:47:09 Emmanuel Lécharny mailto:elecha...@gmail.com>>:
  >>
  >> I have tested that the exception gets propagated before
 launching the vote
  >> to be clear :-)
  >>
  >>
  >> On 05/07/2022 18:17, Christoph John wrote:
  >>
  >>> Sorry, no. The last message regarding this was:
  >>
  >>>
  >>
  >>> --snip-
  >>
  >>>
  >>
  >>> 11.04.2022 09:37:30 Emmanuel Lécharny mailto:elecha...@gmail.com>>:
  >>
  >>> Hi Christophe,
  >>
  >>> sorry, my late mail was off base.
  >>
  >>> The pb here is that the SSLEngine excpeiton is not propagated
 to the
  >> handler, when it should.
  >>
  >>> My guess is that we have some missing call somewhere in the
 stack. I'm
  >> going to check that out.
  >>
  >>> On 11/04/2022 00:15, Christoph John wrote:
  >>
   Hi,
  >>
   thanks Jonathan and Emmanuel for working on this!
  >>
   I tried to integrate this into QuickFIX/J and it compiles
 successfully.
  >> However there are some tests failing that expect an Exception.
 For example
  >> we have
  >>
  
  >>
 
https://github.com/quickfix-j/quickfixj/blob/b6a822a46a5278dcd0985a5a77299ed03168ab03/quickfixj-core/src/test/java/quickfix/mina/ssl/SecureSocketTest.java#L54 

 
 


  >>
   Up to now it was tried to get the Exception via a filter in
 the chain.
  >> This no longer seems to work but I think I can see the error
 getting thrown
  >> in the log:
  >>
   SEVERE: SSLHandlerG0@590ec99c[mode=server, connected=false]
 task() -
  >> storing error {}
  >>
   javax.net.ssl.SSLHandshakeException: No available
 authentication scheme
  >>
        at
  >> 
java.base/sun.security.ssl.Alert.createSSLException(Alert.java:131)

  >>
        at
  >> 
java.base/sun.security.ssl.Alert.createSSLException(Alert.java:117)

  >>
        at
  >>
 
java.base/sun.security.ssl.TransportContext.fatal(TransportContext.java:358) 


  >>
        at
  >>
 
java.base/sun.security.ssl.TransportContext.fatal(TransportContext.java:314) 


  >>
        at
  >>
 
java.base/sun.security.ssl.TransportContext.

Re: Exception in filter (was: Re: [Vote] MINA 2.2.0 release)

2022-07-12 Thread Emmanuel Lécharny

Hi Christoph,

I'm trying to  ran the failing tests on my machine (eclipse with Java 8 
and Java 11), and I'll probably need some assistance.



I'm using the chrjohn-mina-2.2.0 branch. It seems that the generated 
code is not stored at the proper place.


Any clue?


On 09/07/2022 11:49, Christoph John wrote:

Thanks. Anything I can do to assist? Although I might only find time the week 
after next because am currently on vacation.

Jul 9, 2022 09:00:21 Emmanuel Lécharny :


I do think we need to have a look at it (and I may find some time to do it too, 
as I'm in vacation in the coming week)

However, I think we should get this 2.0 out. Ther eis no problem in releasing a 
fix if needed.

Thanks !

On 09/07/2022 07:17, Jonathan Valliere wrote:

Sooo… do I need to look into this or was this resolved?
On Fri, Jul 8, 2022 at 11:51 PM Emmanuel Lécharny mailto:elecha...@gmail.com>> wrote:
     The changes I did were to ensure that any ouutbound data are sent
     when a
     TLS erroroccurs, because the Alert must be sent no matter what. This is
     critical for a client to know what is the cause of the failure
     (typically when a bad certificate is provided - expired, revoked,
     etc -):
     https://datatracker.ietf.org/doc/html/rfc5246#section-7.2
     
     I also checked that in this case an exception is propagated up to the
     IoHandler for teh server to be informed about the situuation.

     On 06/07/2022 12:42, Jonathan Valliere wrote:
  >   What test are you trying?  Emmanuel made changes from the
     original design
  > to cause it to throw on the filter.  My original design threw on
     the filter
  > but only during a subsequent read or write action thereby
     enforcing strong
  > concurrency within the pipeline.
  >
  > On Jul 6, 2022 at 3:53:57 AM, Christoph John
  > mailto:christoph.j...@macd.com>.invalid> wrote:
  >
  >> Ok, the tests in QuickFIX/J which expect the exception to be
     caught in a
  >> filter still don't work.
  >> I recall that you also did some changes in other Apache projects
     to make
  >> it work with MINA 2.2.0. Could it be that I also need to adapt
     something in
  >> this regard?
  >>
  >> Thanks
  >> Chris
  >>
  >> Jul 5, 2022 18:47:09 Emmanuel Lécharny mailto:elecha...@gmail.com>>:
  >>
  >> I have tested that the exception gets propagated before
     launching the vote
  >> to be clear :-)
  >>
  >>
  >> On 05/07/2022 18:17, Christoph John wrote:
  >>
  >>> Sorry, no. The last message regarding this was:
  >>
  >>>
  >>
  >>> --snip-
  >>
  >>>
  >>
  >>> 11.04.2022 09:37:30 Emmanuel Lécharny mailto:elecha...@gmail.com>>:
  >>
  >>> Hi Christophe,
  >>
  >>> sorry, my late mail was off base.
  >>
  >>> The pb here is that the SSLEngine excpeiton is not propagated
     to the
  >> handler, when it should.
  >>
  >>> My guess is that we have some missing call somewhere in the
     stack. I'm
  >> going to check that out.
  >>
  >>> On 11/04/2022 00:15, Christoph John wrote:
  >>
   Hi,
  >>
   thanks Jonathan and Emmanuel for working on this!
  >>
   I tried to integrate this into QuickFIX/J and it compiles
     successfully.
  >> However there are some tests failing that expect an Exception.
     For example
  >> we have
  >>
  
  >>
     
https://github.com/quickfix-j/quickfixj/blob/b6a822a46a5278dcd0985a5a77299ed03168ab03/quickfixj-core/src/test/java/quickfix/mina/ssl/SecureSocketTest.java#L54
     

  >>
   Up to now it was tried to get the Exception via a filter in
     the chain.
  >> This no longer seems to work but I think I can see the error
     getting thrown
  >> in the log:
  >>
   SEVERE: SSLHandlerG0@590ec99c[mode=server, connected=false]
     task() -
  >> storing error {}
  >>
   javax.net.ssl.SSLHandshakeException: No available
     authentication scheme
  >>
        at
  >> java.base/sun.security.ssl.Alert.createSSLException(Alert.java:131)
  >>
        at
  >> java.base/sun.security.ssl.Alert.createSSLException(Alert.java:117)
  >>
        at
  >>
     
java.base/sun.security.ssl.TransportContext.fatal(TransportContext.java:358)
  >>
        at
  >>
     
java.base/sun.security.ssl.TransportContext.fatal(TransportContext.java:314)
  >>
        at
  >>
     
java.base/sun.security.ssl.TransportContext.fatal(TransportContext.java:305)
  >>
        at
  >>
     
java.base/sun.security.ssl.CertificateMessage$T13Certificat

Re: [VOTE] Release Apache Mina SSHD 2.9.0

2022-07-12 Thread Emmanuel Lécharny

Hi Guillaume,

I get some error while running tests:

[ERROR] Tests run: 6, Failures: 0, Errors: 6, Skipped: 0, Time elapsed: 
33.642 s <<< FAILURE! - in 
org.apache.sshd.client.auth.pubkey.HostBoundPubKeyAuthTest
[ERROR] 
org.apache.sshd.client.auth.pubkey.HostBoundPubKeyAuthTest.testPubkeyAuth[user01_rsa_sha2_512_2048] 
 Time elapsed: 5.598 s  <<< ERROR!
org.testcontainers.containers.ContainerLaunchException: Container 
startup failed



I have Docker started on my Mac, and it should work (I have another 
project using test container), but maybe this is an issue with the mac 
OS upgrade I did 2 weeks ago.



On 11/07/2022 15:34, Guillaume Nodet wrote:

I've staged a candidate release at:
   https://repository.apache.org/content/repositories/orgapachemina-1071
Git tag:
   https://github.com/apache/mina-sshd/tree/sshd-2.9.0
Issues solved:
   https://github.com/apache/mina-sshd/blob/sshd-2.9.0/docs/changes/2.9.0.md

Please review and vote !



--
*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



[jira] [Comment Edited] (DIRMINA-1168) How can we send multiple file with same name which can be retain( rename each file appending random number)

2022-07-12 Thread Kemal Soysal (Jira)


[ 
https://issues.apache.org/jira/browse/DIRMINA-1168?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17566010#comment-17566010
 ] 

Kemal Soysal edited comment on DIRMINA-1168 at 7/12/22 9:02 PM:


The user sending different files with same name is sure, that this is the right 
thing to do?

And how will the receivers know, that it is not being meant as resume?


was (Author: JIRAUSER290322):
The user sending different files with same name is sure, that this is the right 
thing to do?

> How can we send multiple file with same name which can be retain( rename each 
> file appending random number)
> ---
>
> Key: DIRMINA-1168
> URL: https://issues.apache.org/jira/browse/DIRMINA-1168
> Project: MINA
>  Issue Type: Bug
>  Components: Core
>Reporter: Yuvaraj
>Priority: Major
>
> How can we send multiple file with same name which can be retain( rename each 
> file appending random number)
> We have a use case, where user A send multiple files with same file 
> parallelly . But file has been override in apache mina as user sent same file 
> name even though its content is different.
> Any solution to retain the multiple files.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

-
To unsubscribe, e-mail: dev-unsubscr...@mina.apache.org
For additional commands, e-mail: dev-h...@mina.apache.org



[jira] [Commented] (DIRMINA-1168) How can we send multiple file with same name which can be retain( rename each file appending random number)

2022-07-12 Thread Kemal Soysal (Jira)


[ 
https://issues.apache.org/jira/browse/DIRMINA-1168?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17566010#comment-17566010
 ] 

Kemal Soysal commented on DIRMINA-1168:
---

The user sending different files with same name is sure, that this is the right 
thing to do?

> How can we send multiple file with same name which can be retain( rename each 
> file appending random number)
> ---
>
> Key: DIRMINA-1168
> URL: https://issues.apache.org/jira/browse/DIRMINA-1168
> Project: MINA
>  Issue Type: Bug
>  Components: Core
>Reporter: Yuvaraj
>Priority: Major
>
> How can we send multiple file with same name which can be retain( rename each 
> file appending random number)
> We have a use case, where user A send multiple files with same file 
> parallelly . But file has been override in apache mina as user sent same file 
> name even though its content is different.
> Any solution to retain the multiple files.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

-
To unsubscribe, e-mail: dev-unsubscr...@mina.apache.org
For additional commands, e-mail: dev-h...@mina.apache.org



[jira] [Closed] (SSHD-1278) How to release client connection resources after connection timeout occurs ?

2022-07-12 Thread Lyor Goldstein (Jira)


 [ 
https://issues.apache.org/jira/browse/SSHD-1278?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Lyor Goldstein closed SSHD-1278.

Resolution: Information Provided

> How to release client connection resources after connection timeout occurs ?
> 
>
> Key: SSHD-1278
> URL: https://issues.apache.org/jira/browse/SSHD-1278
> Project: MINA SSHD
>  Issue Type: Question
>Affects Versions: 2.8.0
> Environment: Java SE 8, NetBeans IDE 8.2
>Reporter: dgü
>Assignee: Lyor Goldstein
>Priority: Major
>
> Hello!
> I want to release client connection resources after connection timeout occurs 
> ?
> This is the code:
> {code:java}
> ConnectFuture connectFuture = sshClient.connect(uri.toString());
> try {
> //connectFuture.isConnected() returns false
> connectFuture.verify(timeout);
> } catch (IOException e) {
> //connectFuture.isConnected() returns true
> connectFuture.cancel();
> //connectFuture.isCanceled() returns false
> //connectFuture.isConnected() returns true
> throw e;
> }
> {code}
> I guess there is a race condition between client connection and 
> {{ConnectFuture#isConnected()}}. 
> For example, this code may be wrong:
> {code:java}
> if (!connectFuture.isConnected()) {
>   //connectFuture.isConnected() may return true
> }
> {code}
> In my case, session is connected after timeout. 
> How can I be sure that client is still not connected and release its 
> resources after connection timeout occurs ?
> Thanks in advance!



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

-
To unsubscribe, e-mail: dev-unsubscr...@mina.apache.org
For additional commands, e-mail: dev-h...@mina.apache.org



[jira] [Commented] (SSHD-1278) How to release client connection resources after connection timeout occurs ?

2022-07-12 Thread Lyor Goldstein (Jira)


[ 
https://issues.apache.org/jira/browse/SSHD-1278?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17565939#comment-17565939
 ] 

Lyor Goldstein commented on SSHD-1278:
--

I don't understand the code and what you are trying to achieve - it does seem 
though that you have not read the documentation carefully. In any case, here is 
the recommended way to connect and authenticate using {{try-with-resource}}:

{code:java}
try (ClientSession session = 
client.connect(...uri...).verify(CONNECT_TIMEOUT).getSession()) {
  session.addPasswordIdentity(getCurrentTestName()); // or add key identity
  session.auth().verify(AUTH_TIMEOUT);
}
{code}
I fail to see the need to use the {{ConnectFuture}} or query it for 
{{isConnected}}. As far as releasing the connection - there is no need - if 
{{verify}} fails, it throws an exception which causes the {{try-with-resource}} 
block to exit and thus release whatever needs to be released.


As far as your code is concerned - it behaves as it should:
{code:java}
ConnectFuture connectFuture = sshClient.connect(uri.toString());
try {
//connectFuture.isConnected() returns false - Of course it does, only when 
verify returns the connection is established
connectFuture.verify(timeout);
} catch (IOException e) {
//connectFuture.isConnected() returns true - so what ? there was an 
exception so obviously the connection is doomed.
 Furthermore, the disconnect is ASYNCHRONOUS - 
so you might have sampled isConnected too soon
connectFuture.cancel();
//connectFuture.isCanceled() returns false - ASYNCHRONOUS (!)
//connectFuture.isConnected() returns true - ASYNCHRONOUS (!)

throw e;
}
{code}

Please documentation carefully (again, and again, and again) - and make sure to 
look at the code samples there for recommended usage. Try to adhere to the 
coding patterns shown in the documentation unless there is very good 
justification to do otherwise. Also, I highly recommend to look at you test 
code as it contains 100's of examples of possible use cases - even unusual ones.

> How to release client connection resources after connection timeout occurs ?
> 
>
> Key: SSHD-1278
> URL: https://issues.apache.org/jira/browse/SSHD-1278
> Project: MINA SSHD
>  Issue Type: Question
>Affects Versions: 2.8.0
> Environment: Java SE 8, NetBeans IDE 8.2
>Reporter: dgü
>Assignee: Lyor Goldstein
>Priority: Major
>
> Hello!
> I want to release client connection resources after connection timeout occurs 
> ?
> This is the code:
> {code:java}
> ConnectFuture connectFuture = sshClient.connect(uri.toString());
> try {
> //connectFuture.isConnected() returns false
> connectFuture.verify(timeout);
> } catch (IOException e) {
> //connectFuture.isConnected() returns true
> connectFuture.cancel();
> //connectFuture.isCanceled() returns false
> //connectFuture.isConnected() returns true
> throw e;
> }
> {code}
> I guess there is a race condition between client connection and 
> {{ConnectFuture#isConnected()}}. 
> For example, this code may be wrong:
> {code:java}
> if (!connectFuture.isConnected()) {
>   //connectFuture.isConnected() may return true
> }
> {code}
> In my case, session is connected after timeout. 
> How can I be sure that client is still not connected and release its 
> resources after connection timeout occurs ?
> Thanks in advance!



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

-
To unsubscribe, e-mail: dev-unsubscr...@mina.apache.org
For additional commands, e-mail: dev-h...@mina.apache.org



[jira] [Assigned] (SSHD-1278) How to release client connection resources after connection timeout occurs ?

2022-07-12 Thread Lyor Goldstein (Jira)


 [ 
https://issues.apache.org/jira/browse/SSHD-1278?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Lyor Goldstein reassigned SSHD-1278:


Assignee: Lyor Goldstein

> How to release client connection resources after connection timeout occurs ?
> 
>
> Key: SSHD-1278
> URL: https://issues.apache.org/jira/browse/SSHD-1278
> Project: MINA SSHD
>  Issue Type: Question
>Affects Versions: 2.8.0
> Environment: Java SE 8, NetBeans IDE 8.2
>Reporter: dgü
>Assignee: Lyor Goldstein
>Priority: Major
>
> Hello!
> I want to release client connection resources after connection timeout occurs 
> ?
> This is the code:
> {code:java}
> ConnectFuture connectFuture = sshClient.connect(uri.toString());
> try {
> //connectFuture.isConnected() returns false
> connectFuture.verify(timeout);
> } catch (IOException e) {
> //connectFuture.isConnected() returns true
> connectFuture.cancel();
> //connectFuture.isCanceled() returns false
> //connectFuture.isConnected() returns true
> throw e;
> }
> {code}
> I guess there is a race condition between client connection and 
> {{ConnectFuture#isConnected()}}. 
> For example, this code may be wrong:
> {code:java}
> if (!connectFuture.isConnected()) {
>   //connectFuture.isConnected() may return true
> }
> {code}
> In my case, session is connected after timeout. 
> How can I be sure that client is still not connected and release its 
> resources after connection timeout occurs ?
> Thanks in advance!



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

-
To unsubscribe, e-mail: dev-unsubscr...@mina.apache.org
For additional commands, e-mail: dev-h...@mina.apache.org



Re: [VOTE] Release Apache Mina SSHD 2.9.0

2022-07-12 Thread Thomas Wolf

On 11.07.22 15:34 , Guillaume Nodet wrote:

I've staged a candidate release at:
   https://repository.apache.org/content/repositories/orgapachemina-1071
Git tag:
   https://github.com/apache/mina-sshd/tree/sshd-2.9.0
Issues solved:
   https://github.com/apache/mina-sshd/blob/sshd-2.9.0/docs/changes/2.9.0.md

Please review and vote !


Thanks!

+1

Cheers,

  Thomas


-
To unsubscribe, e-mail: dev-unsubscr...@mina.apache.org
For additional commands, e-mail: dev-h...@mina.apache.org