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

Youssouf Maiga updated HTTPASYNC-167:
-------------------------------------
    Description: 
CloseableHttpAsyncClient with  HttpVersionPolicy.NEGOTIATE is not working with 
Open JDK greater or equal 16. When we force HttpVersionPolicy to HTTP_1 or 
HTTP_2, we do not face the issue. The issue happens only with 
HttpVersionPolicy.NEGOTIATE.

We have the Following exception :
{code:java}
Executing request GET https://nghttp2.org/httpbin/
GET 
https://nghttp2.org/httpbin/->org.apache.hc.core5.http.ConnectionClosedException:
 Connection closed by peer
Exception in thread "main" java.util.concurrent.ExecutionException: 
org.apache.hc.core5.http.ConnectionClosedException: Connection closed by peer
        at 
org.apache.hc.core5.concurrent.BasicFuture.getResult(BasicFuture.java:72)
        at org.apache.hc.core5.concurrent.BasicFuture.get(BasicFuture.java:85)
        at org.apache.hc.client5.http.examples.main(AsyncClientTlsAlpn.java:85)
Caused by: org.apache.hc.core5.http.ConnectionClosedException: Connection 
closed by peer
        at 
org.apache.hc.core5.http.impl.nio.AbstractHttp1StreamDuplexer.onInput(AbstractHttp1StreamDuplexer.java:341)
        at 
org.apache.hc.core5.http.impl.nio.AbstractHttp1IOEventHandler.inputReady(AbstractHttp1IOEventHandler.java:64)
        at 
org.apache.hc.core5.http.impl.nio.ClientHttp1IOEventHandler.inputReady(ClientHttp1IOEventHandler.java:39)
        at 
org.apache.hc.core5.reactor.ssl.SSLIOSession.decryptData(SSLIOSession.java:549)
        at 
org.apache.hc.core5.reactor.ssl.SSLIOSession.access$400(SSLIOSession.java:72)
        at 
org.apache.hc.core5.reactor.ssl.SSLIOSession$1.inputReady(SSLIOSession.java:172)
        at 
org.apache.hc.core5.reactor.InternalDataChannel.onIOEvent(InternalDataChannel.java:131)
        at 
org.apache.hc.core5.reactor.InternalChannel.handleIOEvent(InternalChannel.java:51)
        at 
org.apache.hc.core5.reactor.SingleCoreIOReactor.processEvents(SingleCoreIOReactor.java:178)
        at 
org.apache.hc.core5.reactor.SingleCoreIOReactor.doExecute(SingleCoreIOReactor.java:127)
        at 
org.apache.hc.core5.reactor.AbstractSingleCoreIOReactor.execute(AbstractSingleCoreIOReactor.java:85)
        at 
org.apache.hc.core5.reactor.IOReactorWorker.run(IOReactorWorker.java:44)
        at java.base/java.lang.Thread.run(Thread.java:833)
{code}
In order to reproduce : 

Execute the following java class ([ 
https://raw.githubusercontent.com/apache/httpcomponents-client/5.1.x/httpclient5/src/test/java/org/apache/hc/client5/http/examples/AsyncClientTlsAlpn.java|https://raw.githubusercontent.com/apache/httpcomponents-client/5.1.x/httpclient5/src/test/java/org/apache/hc/client5/http/examples/AsyncClientTlsAlpn.java]
 ) with a version of OpenJDK <= 15 then you will succesfully get the result. 

After, execute the same class with OpenJDK 17, then you you will face the issue.

 

  was:
CloseableHttpAsyncClient with  HttpVersionPolicy.NEGOTIATE is not working with 
Open JDK greater or equal 16. When we force HttpVersionPolicy to HTTP_1 or 
HTTP_2, we do not face the issue. The issue happens only with 
HttpVersionPolicy.NEGOTIATE.

We have the Following exception :
{quote}>org.apache.hc.core5.http.ConnectionClosedException: Connection closed 
by peerException in thread "main" java.util.concurrent.ExecutionException: 
org.apache.hc.core5.http.ConnectionClosedException: Connection closed by peer 
at org.apache.hc.core5.concurrent.BasicFuture.getResult(BasicFuture.java:72) at 
org.apache.hc.core5.concurrent.BasicFuture.get(BasicFuture.java:85) at 
fr.nexcer.uninov.webcrm.AsyncClientTlsAlpn.main(AsyncClientTlsAlpn.java:85)Caused
 by: org.apache.hc.core5.http.ConnectionClosedException: Connection closed by 
peer at 
org.apache.hc.core5.http.impl.nio.AbstractHttp1StreamDuplexer.onInput(AbstractHttp1StreamDuplexer.java:341)
 at 
org.apache.hc.core5.http.impl.nio.AbstractHttp1IOEventHandler.inputReady(AbstractHttp1IOEventHandler.java:64)
 at 
org.apache.hc.core5.http.impl.nio.ClientHttp1IOEventHandler.inputReady(ClientHttp1IOEventHandler.java:39)
 at 
org.apache.hc.core5.reactor.ssl.SSLIOSession.decryptData(SSLIOSession.java:549) 
at 
org.apache.hc.core5.reactor.ssl.SSLIOSession.access$400(SSLIOSession.java:72) 
at 
org.apache.hc.core5.reactor.ssl.SSLIOSession$1.inputReady(SSLIOSession.java:172)
 at 
org.apache.hc.core5.reactor.InternalDataChannel.onIOEvent(InternalDataChannel.java:131)
 at 
org.apache.hc.core5.reactor.InternalChannel.handleIOEvent(InternalChannel.java:51)
 at 
org.apache.hc.core5.reactor.SingleCoreIOReactor.processEvents(SingleCoreIOReactor.java:178)
 at 
org.apache.hc.core5.reactor.SingleCoreIOReactor.doExecute(SingleCoreIOReactor.java:127)
 at 
org.apache.hc.core5.reactor.AbstractSingleCoreIOReactor.execute(AbstractSingleCoreIOReactor.java:85)
 at org.apache.hc.core5.reactor.IOReactorWorker.run(IOReactorWorker.java:44) at 
java.base/java.lang.Thread.run(Thread.java:833)
{quote}
In order to reproduce : 

Execute the following java class ([ 
https://raw.githubusercontent.com/apache/httpcomponents-client/5.1.x/httpclient5/src/test/java/org/apache/hc/client5/http/examples/AsyncClientTlsAlpn.java|https://raw.githubusercontent.com/apache/httpcomponents-client/5.1.x/httpclient5/src/test/java/org/apache/hc/client5/http/examples/AsyncClientTlsAlpn.java]
 ) with a version of OpenJDK <= 15 then you will succesfully get the result. 

After, execute the same class with OpenJDK 17, then you you will face the issue.

 


> [CloseableHttpAsyncClient] HttpVersionPolicy.NEGOTIATE Not working with Open 
> JDK >= 16
> --------------------------------------------------------------------------------------
>
>                 Key: HTTPASYNC-167
>                 URL: https://issues.apache.org/jira/browse/HTTPASYNC-167
>             Project: HttpComponents HttpAsyncClient
>          Issue Type: Bug
>    Affects Versions: HttpClient 5.0, Future
>            Reporter: Youssouf Maiga
>            Priority: Major
>             Fix For: HttpClient 5.0, Future
>
>
> CloseableHttpAsyncClient with  HttpVersionPolicy.NEGOTIATE is not working 
> with Open JDK greater or equal 16. When we force HttpVersionPolicy to HTTP_1 
> or HTTP_2, we do not face the issue. The issue happens only with 
> HttpVersionPolicy.NEGOTIATE.
> We have the Following exception :
> {code:java}
> Executing request GET https://nghttp2.org/httpbin/
> GET 
> https://nghttp2.org/httpbin/->org.apache.hc.core5.http.ConnectionClosedException:
>  Connection closed by peer
> Exception in thread "main" java.util.concurrent.ExecutionException: 
> org.apache.hc.core5.http.ConnectionClosedException: Connection closed by peer
>       at 
> org.apache.hc.core5.concurrent.BasicFuture.getResult(BasicFuture.java:72)
>       at org.apache.hc.core5.concurrent.BasicFuture.get(BasicFuture.java:85)
>       at org.apache.hc.client5.http.examples.main(AsyncClientTlsAlpn.java:85)
> Caused by: org.apache.hc.core5.http.ConnectionClosedException: Connection 
> closed by peer
>       at 
> org.apache.hc.core5.http.impl.nio.AbstractHttp1StreamDuplexer.onInput(AbstractHttp1StreamDuplexer.java:341)
>       at 
> org.apache.hc.core5.http.impl.nio.AbstractHttp1IOEventHandler.inputReady(AbstractHttp1IOEventHandler.java:64)
>       at 
> org.apache.hc.core5.http.impl.nio.ClientHttp1IOEventHandler.inputReady(ClientHttp1IOEventHandler.java:39)
>       at 
> org.apache.hc.core5.reactor.ssl.SSLIOSession.decryptData(SSLIOSession.java:549)
>       at 
> org.apache.hc.core5.reactor.ssl.SSLIOSession.access$400(SSLIOSession.java:72)
>       at 
> org.apache.hc.core5.reactor.ssl.SSLIOSession$1.inputReady(SSLIOSession.java:172)
>       at 
> org.apache.hc.core5.reactor.InternalDataChannel.onIOEvent(InternalDataChannel.java:131)
>       at 
> org.apache.hc.core5.reactor.InternalChannel.handleIOEvent(InternalChannel.java:51)
>       at 
> org.apache.hc.core5.reactor.SingleCoreIOReactor.processEvents(SingleCoreIOReactor.java:178)
>       at 
> org.apache.hc.core5.reactor.SingleCoreIOReactor.doExecute(SingleCoreIOReactor.java:127)
>       at 
> org.apache.hc.core5.reactor.AbstractSingleCoreIOReactor.execute(AbstractSingleCoreIOReactor.java:85)
>       at 
> org.apache.hc.core5.reactor.IOReactorWorker.run(IOReactorWorker.java:44)
>       at java.base/java.lang.Thread.run(Thread.java:833)
> {code}
> In order to reproduce : 
> Execute the following java class ([ 
> https://raw.githubusercontent.com/apache/httpcomponents-client/5.1.x/httpclient5/src/test/java/org/apache/hc/client5/http/examples/AsyncClientTlsAlpn.java|https://raw.githubusercontent.com/apache/httpcomponents-client/5.1.x/httpclient5/src/test/java/org/apache/hc/client5/http/examples/AsyncClientTlsAlpn.java]
>  ) with a version of OpenJDK <= 15 then you will succesfully get the result. 
> After, execute the same class with OpenJDK 17, then you you will face the 
> issue.
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to