[ https://issues.apache.org/jira/browse/HTTPCORE-777?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17933011#comment-17933011 ]
Oleksandr Kriuchenko edited comment on HTTPCORE-777 at 3/6/25 2:34 PM: ----------------------------------------------------------------------- Oh, I tried it with *5.3.4-SNAPSHOT* and it *passes* there by failing the future with this error: {code:java} java.util.concurrent.ExecutionException: org.apache.hc.core5.http.ConnectionClosedException: Connection closed by peer at org.apache.hc.core5.concurrent.BasicFuture.getResult(BasicFuture.java:84) at org.apache.hc.core5.concurrent.BasicFuture.get(BasicFuture.java:99) at ApacheHttpClient5TransportIT.connectionResetIsHandledSuccessfully(ApacheHttpClient5TransportIT.java:132) at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103) at java.base/java.lang.reflect.Method.invoke(Method.java:580) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:59) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:56) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17) at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306) at org.junit.runners.BlockJUnit4ClassRunner$1.evaluate(BlockJUnit4ClassRunner.java:100) at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:366) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:103) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:63) at org.junit.runners.ParentRunner$4.run(ParentRunner.java:331) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:79) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:329) at org.junit.runners.ParentRunner.access$100(ParentRunner.java:66) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:293) at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306) at org.junit.runners.ParentRunner.run(ParentRunner.java:413) at org.junit.runner.JUnitCore.run(JUnitCore.java:137) at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:69) at com.intellij.rt.junit.IdeaTestRunner$Repeater$1.execute(IdeaTestRunner.java:38) at com.intellij.rt.execution.junit.TestsRepeater.repeat(TestsRepeater.java:11) at com.intellij.rt.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:35) at com.intellij.rt.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:232) at com.intellij.rt.junit.JUnitStarter.main(JUnitStarter.java:55)Caused by: org.apache.hc.core5.http.ConnectionClosedException: Connection closed by peer at org.apache.hc.core5.http.impl.nio.AbstractHttp1StreamDuplexer.onInput(AbstractHttp1StreamDuplexer.java:355) 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:41) at org.apache.hc.client5.http.impl.async.LoggingIOSession$1.inputReady(LoggingIOSession.java:238) at org.apache.hc.core5.reactor.InternalDataChannel.onIOEvent(InternalDataChannel.java:143) at org.apache.hc.core5.reactor.InternalChannel.handleIOEvent(InternalChannel.java:51) at org.apache.hc.core5.reactor.SingleCoreIOReactor.processEvents(SingleCoreIOReactor.java:176) at org.apache.hc.core5.reactor.SingleCoreIOReactor.doExecute(SingleCoreIOReactor.java:125) at org.apache.hc.core5.reactor.AbstractSingleCoreIOReactor.execute(AbstractSingleCoreIOReactor.java:92) at org.apache.hc.core5.reactor.IOReactorWorker.run(IOReactorWorker.java:44) at java.base/java.lang.Thread.run(Thread.java:1583) {code} and with those logs: {code:java} 2025-03-06 16:24:22,903 DEBUG [org.apache.hc.client5.http.impl.async.InternalAbstractHttpAsyncClient] ex-0000000001 preparing request execution 2025-03-06 16:24:22,903 DEBUG [org.apache.hc.client5.http.impl.async.InternalAbstractHttpAsyncClient] ex-0000000001 preparing request execution 2025-03-06 16:24:22,907 DEBUG [org.apache.hc.client5.http.impl.async.AsyncProtocolExec] ex-0000000001 target auth state: UNCHALLENGED 2025-03-06 16:24:22,907 DEBUG [org.apache.hc.client5.http.impl.async.AsyncProtocolExec] ex-0000000001 target auth state: UNCHALLENGED 2025-03-06 16:24:22,907 DEBUG [org.apache.hc.client5.http.impl.async.AsyncProtocolExec] ex-0000000001 proxy auth state: UNCHALLENGED 2025-03-06 16:24:22,907 DEBUG [org.apache.hc.client5.http.impl.async.AsyncProtocolExec] ex-0000000001 proxy auth state: UNCHALLENGED 2025-03-06 16:24:22,908 DEBUG [org.apache.hc.client5.http.impl.async.AsyncConnectExec] ex-0000000001 acquiring connection with route {}->[http://localhost:1080] 2025-03-06 16:24:22,908 DEBUG [org.apache.hc.client5.http.impl.async.AsyncConnectExec] ex-0000000001 acquiring connection with route {}->[http://localhost:1080] 2025-03-06 16:24:22,908 DEBUG [org.apache.hc.client5.http.impl.async.InternalHttpAsyncClient] ex-0000000001 acquiring endpoint (3 MINUTES) 2025-03-06 16:24:22,908 DEBUG [org.apache.hc.client5.http.impl.async.InternalHttpAsyncClient] ex-0000000001 acquiring endpoint (3 MINUTES) 2025-03-06 16:24:22,909 DEBUG [org.apache.hc.client5.http.impl.nio.PoolingAsyncClientConnectionManager] ex-0000000001 endpoint lease request (3 MINUTES) [route: {}->[http://localhost:1080]][total available: 0; route allocated: 0 of 5; total allocated: 0 of 25] 2025-03-06 16:24:22,909 DEBUG [org.apache.hc.client5.http.impl.nio.PoolingAsyncClientConnectionManager] ex-0000000001 endpoint lease request (3 MINUTES) [route: {}->[http://localhost:1080]][total available: 0; route allocated: 0 of 5; total allocated: 0 of 25] 2025-03-06 16:24:22,911 DEBUG [org.apache.hc.client5.http.impl.nio.PoolingAsyncClientConnectionManager] ex-0000000001 endpoint leased [route: {}->[http://localhost:1080]][total available: 0; route allocated: 1 of 5; total allocated: 1 of 25] 2025-03-06 16:24:22,911 DEBUG [org.apache.hc.client5.http.impl.nio.PoolingAsyncClientConnectionManager] ex-0000000001 endpoint leased [route: {}->[http://localhost:1080]][total available: 0; route allocated: 1 of 5; total allocated: 1 of 25] 2025-03-06 16:24:22,911 DEBUG [org.apache.hc.client5.http.impl.nio.PoolingAsyncClientConnectionManager] ex-0000000001 acquired ep-0000000001 2025-03-06 16:24:22,911 DEBUG [org.apache.hc.client5.http.impl.nio.PoolingAsyncClientConnectionManager] ex-0000000001 acquired ep-0000000001 2025-03-06 16:24:22,911 DEBUG [org.apache.hc.client5.http.impl.async.InternalHttpAsyncClient] ex-0000000001 acquired endpoint ep-0000000001 2025-03-06 16:24:22,911 DEBUG [org.apache.hc.client5.http.impl.async.InternalHttpAsyncClient] ex-0000000001 acquired endpoint ep-0000000001 2025-03-06 16:24:22,911 DEBUG [org.apache.hc.client5.http.impl.async.InternalHttpAsyncClient] ep-0000000001 connecting endpoint (null) 2025-03-06 16:24:22,911 DEBUG [org.apache.hc.client5.http.impl.async.InternalHttpAsyncClient] ep-0000000001 connecting endpoint (null) 2025-03-06 16:24:22,911 DEBUG [org.apache.hc.client5.http.impl.nio.PoolingAsyncClientConnectionManager] ep-0000000001 connecting endpoint to http://localhost:1080 (15 SECONDS) 2025-03-06 16:24:22,911 DEBUG [org.apache.hc.client5.http.impl.nio.PoolingAsyncClientConnectionManager] ep-0000000001 connecting endpoint to http://localhost:1080 (15 SECONDS) 2025-03-06 16:24:22,912 DEBUG [org.apache.hc.client5.http.impl.nio.DefaultAsyncClientConnectionOperator] http://localhost:1080 connecting null->null (15 SECONDS) 2025-03-06 16:24:22,912 DEBUG [org.apache.hc.client5.http.impl.nio.DefaultAsyncClientConnectionOperator] http://localhost:1080 connecting null->null (15 SECONDS) 2025-03-06 16:24:22,913 DEBUG [org.apache.hc.client5.http.impl.nio.MultihomeIOSessionRequester] localhost resolving remote address 2025-03-06 16:24:22,913 DEBUG [org.apache.hc.client5.http.impl.nio.MultihomeIOSessionRequester] localhost resolving remote address 2025-03-06 16:24:22,913 DEBUG [org.apache.hc.client5.http.impl.nio.MultihomeIOSessionRequester] localhost resolved to [localhost/127.0.0.1, localhost/0:0:0:0:0:0:0:1] 2025-03-06 16:24:22,913 DEBUG [org.apache.hc.client5.http.impl.nio.MultihomeIOSessionRequester] localhost resolved to [localhost/127.0.0.1, localhost/0:0:0:0:0:0:0:1] 2025-03-06 16:24:22,913 DEBUG [org.apache.hc.client5.http.impl.nio.MultihomeIOSessionRequester] localhost:1080 connecting null->localhost/127.0.0.1:1080 (15 SECONDS) 2025-03-06 16:24:22,913 DEBUG [org.apache.hc.client5.http.impl.nio.MultihomeIOSessionRequester] localhost:1080 connecting null->localhost/127.0.0.1:1080 (15 SECONDS) 2025-03-06 16:24:22,921 DEBUG [org.apache.hc.core5.reactor.IOSessionImpl] c-0000000000[ACTIVE][rc:c] protocol upgrade class org.apache.hc.core5.http.impl.nio.ClientHttp1IOEventHandler 2025-03-06 16:24:22,921 DEBUG [org.apache.hc.client5.http.impl.nio.MultihomeIOSessionRequester] localhost:1080 connected null->localhost/127.0.0.1:1080 as c-0000000000 2025-03-06 16:24:22,921 DEBUG [org.apache.hc.client5.http.impl.nio.MultihomeIOSessionRequester] localhost:1080 connected null->localhost/127.0.0.1:1080 as c-0000000000 2025-03-06 16:24:22,922 DEBUG [org.apache.hc.client5.http.impl.nio.DefaultAsyncClientConnectionOperator] c-0000000000 http://localhost:1080 connected /127.0.0.1:63023->localhost/127.0.0.1:1080 2025-03-06 16:24:22,922 DEBUG [org.apache.hc.client5.http.impl.nio.DefaultAsyncClientConnectionOperator] c-0000000000 http://localhost:1080 connected /127.0.0.1:63023->localhost/127.0.0.1:1080 2025-03-06 16:24:22,922 DEBUG [org.apache.hc.client5.http.impl.nio.PoolingAsyncClientConnectionManager] ep-0000000001 connected c-0000000000 2025-03-06 16:24:22,922 DEBUG [org.apache.hc.client5.http.impl.nio.PoolingAsyncClientConnectionManager] ep-0000000001 connected c-0000000000 2025-03-06 16:24:22,922 DEBUG [org.apache.hc.client5.http.impl.async.InternalHttpAsyncClient] ep-0000000001 endpoint connected 2025-03-06 16:24:22,922 DEBUG [org.apache.hc.client5.http.impl.async.InternalHttpAsyncClient] ep-0000000001 endpoint connected 2025-03-06 16:24:22,922 DEBUG [org.apache.hc.client5.http.impl.async.AsyncConnectExec] ex-0000000001 connected to target 2025-03-06 16:24:22,922 DEBUG [org.apache.hc.client5.http.impl.async.AsyncConnectExec] ex-0000000001 connected to target 2025-03-06 16:24:22,922 DEBUG [org.apache.hc.client5.http.impl.async.AsyncConnectExec] ex-0000000001 route fully established 2025-03-06 16:24:22,922 DEBUG [org.apache.hc.client5.http.impl.async.AsyncConnectExec] ex-0000000001 route fully established 2025-03-06 16:24:22,922 DEBUG [org.apache.hc.client5.http.impl.async.HttpAsyncMainClientExec] ex-0000000001 executing GET / 2025-03-06 16:24:22,922 DEBUG [org.apache.hc.client5.http.impl.async.HttpAsyncMainClientExec] ex-0000000001 executing GET / 2025-03-06 16:24:22,923 DEBUG [org.apache.hc.client5.http.impl.async.InternalHttpAsyncClient] ep-0000000001 start execution ex-0000000001 2025-03-06 16:24:22,923 DEBUG [org.apache.hc.client5.http.impl.async.InternalHttpAsyncClient] ep-0000000001 start execution ex-0000000001 2025-03-06 16:24:22,923 DEBUG [org.apache.hc.client5.http.impl.nio.PoolingAsyncClientConnectionManager] ep-0000000001 executing exchange ex-0000000001 over c-0000000000 2025-03-06 16:24:22,923 DEBUG [org.apache.hc.client5.http.impl.nio.PoolingAsyncClientConnectionManager] ep-0000000001 executing exchange ex-0000000001 over c-0000000000 2025-03-06 16:24:22,924 DEBUG [org.apache.hc.client5.http.impl.nio.DefaultManagedAsyncClientConnection] c-0000000000 RequestExecutionCommand with NORMAL priority 2025-03-06 16:24:22,924 DEBUG [org.apache.hc.client5.http.impl.nio.DefaultManagedAsyncClientConnection] c-0000000000 RequestExecutionCommand with NORMAL priority 2025-03-06 16:24:22,924 DEBUG [org.apache.hc.core5.reactor.IOSessionImpl] c-0000000000[ACTIVE][rwc:c] Enqueued RequestExecutionCommand with priority IMMEDIATE 2025-03-06 16:24:22,924 DEBUG [org.apache.hc.core5.reactor.IOSessionImpl] c-0000000000[ACTIVE][rw:c] Event cleared [c] 2025-03-06 16:24:22,925 DEBUG [org.apache.hc.core5.reactor.IOSessionImpl] c-0000000000[ACTIVE][r:c] Event cleared [w] 2025-03-06 16:24:22,926 DEBUG [org.apache.hc.client5.http.protocol.RequestAddCookies] ex-0000000001 Cookie spec selected: strict 2025-03-06 16:24:22,926 DEBUG [org.apache.hc.client5.http.protocol.RequestAddCookies] ex-0000000001 Cookie spec selected: strict 2025-03-06 16:24:22,929 DEBUG [org.apache.hc.client5.http.impl.async.HttpAsyncMainClientExec] ex-0000000001 send request GET /, null entity 2025-03-06 16:24:22,929 DEBUG [org.apache.hc.client5.http.impl.async.HttpAsyncMainClientExec] ex-0000000001 send request GET /, null entity 2025-03-06 16:24:22,929 DEBUG [org.apache.hc.client5.http.headers] c-0000000000 >> GET / HTTP/1.1 2025-03-06 16:24:22,929 DEBUG [org.apache.hc.client5.http.headers] c-0000000000 >> GET / HTTP/1.1 2025-03-06 16:24:22,929 DEBUG [org.apache.hc.client5.http.headers] c-0000000000 >> Host: localhost:1080 2025-03-06 16:24:22,929 DEBUG [org.apache.hc.client5.http.headers] c-0000000000 >> Host: localhost:1080 2025-03-06 16:24:22,929 DEBUG [org.apache.hc.client5.http.headers] c-0000000000 >> Connection: keep-alive 2025-03-06 16:24:22,929 DEBUG [org.apache.hc.client5.http.headers] c-0000000000 >> Connection: keep-alive 2025-03-06 16:24:22,929 DEBUG [org.apache.hc.client5.http.headers] c-0000000000 >> User-Agent: Apache-HttpAsyncClient/5.4.2 (Java/21.0.5) 2025-03-06 16:24:22,929 DEBUG [org.apache.hc.client5.http.headers] c-0000000000 >> User-Agent: Apache-HttpAsyncClient/5.4.2 (Java/21.0.5) 2025-03-06 16:24:22,930 DEBUG [org.apache.hc.core5.reactor.IOSessionImpl] c-0000000000[ACTIVE][r:c] 120 bytes written 2025-03-06 16:24:22,930 DEBUG [org.apache.hc.client5.http.wire] c-0000000000[ACTIVE][r:c] >> GET / HTTP/1.1 47 45 54 20 2f 20 48 54 54 50 2f 31 2e 31 0d 0a 2025-03-06 16:24:22,930 DEBUG [org.apache.hc.client5.http.wire] c-0000000000[ACTIVE][r:c] >> GET / HTTP/1.1 47 45 54 20 2f 20 48 54 54 50 2f 31 2e 31 0d 0a 2025-03-06 16:24:22,930 DEBUG [org.apache.hc.client5.http.wire] c-0000000000[ACTIVE][r:c] >> Host: localhost: 48 6f 73 74 3a 20 6c 6f 63 61 6c 68 6f 73 74 3a 2025-03-06 16:24:22,930 DEBUG [org.apache.hc.client5.http.wire] c-0000000000[ACTIVE][r:c] >> Host: localhost: 48 6f 73 74 3a 20 6c 6f 63 61 6c 68 6f 73 74 3a 2025-03-06 16:24:22,930 DEBUG [org.apache.hc.client5.http.wire] c-0000000000[ACTIVE][r:c] >> 1080 Connection 31 30 38 30 0d 0a 43 6f 6e 6e 65 63 74 69 6f 6e 2025-03-06 16:24:22,930 DEBUG [org.apache.hc.client5.http.wire] c-0000000000[ACTIVE][r:c] >> 1080 Connection 31 30 38 30 0d 0a 43 6f 6e 6e 65 63 74 69 6f 6e 2025-03-06 16:24:22,930 DEBUG [org.apache.hc.client5.http.wire] c-0000000000[ACTIVE][r:c] >> : keep-alive Us 3a 20 6b 65 65 70 2d 61 6c 69 76 65 0d 0a 55 73 2025-03-06 16:24:22,930 DEBUG [org.apache.hc.client5.http.wire] c-0000000000[ACTIVE][r:c] >> : keep-alive Us 3a 20 6b 65 65 70 2d 61 6c 69 76 65 0d 0a 55 73 2025-03-06 16:24:22,930 DEBUG [org.apache.hc.client5.http.wire] c-0000000000[ACTIVE][r:c] >> er-Agent: Apache 65 72 2d 41 67 65 6e 74 3a 20 41 70 61 63 68 65 2025-03-06 16:24:22,930 DEBUG [org.apache.hc.client5.http.wire] c-0000000000[ACTIVE][r:c] >> er-Agent: Apache 65 72 2d 41 67 65 6e 74 3a 20 41 70 61 63 68 65 2025-03-06 16:24:22,930 DEBUG [org.apache.hc.client5.http.wire] c-0000000000[ACTIVE][r:c] >> -HttpAsyncClient 2d 48 74 74 70 41 73 79 6e 63 43 6c 69 65 6e 74 2025-03-06 16:24:22,930 DEBUG [org.apache.hc.client5.http.wire] c-0000000000[ACTIVE][r:c] >> -HttpAsyncClient 2d 48 74 74 70 41 73 79 6e 63 43 6c 69 65 6e 74 2025-03-06 16:24:22,930 DEBUG [org.apache.hc.client5.http.wire] c-0000000000[ACTIVE][r:c] >> /5.4.2 (Java/21. 2f 35 2e 34 2e 32 20 28 4a 61 76 61 2f 32 31 2e 2025-03-06 16:24:22,930 DEBUG [org.apache.hc.client5.http.wire] c-0000000000[ACTIVE][r:c] >> /5.4.2 (Java/21. 2f 35 2e 34 2e 32 20 28 4a 61 76 61 2f 32 31 2e 2025-03-06 16:24:22,930 DEBUG [org.apache.hc.client5.http.wire] c-0000000000[ACTIVE][r:c] >> 0.5) 30 2e 35 29 0d 0a 0d 0a 2025-03-06 16:24:22,930 DEBUG [org.apache.hc.client5.http.wire] c-0000000000[ACTIVE][r:c] >> 0.5) 30 2e 35 29 0d 0a 0d 0a 2025-03-06 16:24:22,930 DEBUG [org.apache.hc.core5.reactor.IOSessionImpl] c-0000000000[ACTIVE][rw:c] Event set [w] 2025-03-06 16:24:22,930 DEBUG [org.apache.hc.core5.reactor.IOSessionImpl] c-0000000000[ACTIVE][r:c] Event cleared [w] 2025-03-06 16:24:22,934 INFO [org.mockserver.log.MockServerEventLog] 1080 received request: { "method" : "GET", "path" : "/", "headers" : { "content-length" : [ "0" ], "User-Agent" : [ "Apache-HttpAsyncClient/5.4.2 (Java/21.0.5)" ], "Host" : [ "localhost:1080" ], "Connection" : [ "keep-alive" ] }, "keepAlive" : true, "secure" : false, "protocol" : "HTTP_1_1", "localAddress" : "127.0.0.1:1080", "remoteAddress" : "127.0.0.1:63023" }2025-03-06 16:24:22,935 INFO [org.mockserver.log.MockServerEventLog] 1080 request: { "method" : "GET", "path" : "/", "headers" : { "content-length" : [ "0" ], "User-Agent" : [ "Apache-HttpAsyncClient/5.4.2 (Java/21.0.5)" ], "Host" : [ "localhost:1080" ], "Connection" : [ "keep-alive" ] }, "keepAlive" : true, "secure" : false, "protocol" : "HTTP_1_1", "localAddress" : "127.0.0.1:1080", "remoteAddress" : "127.0.0.1:63023" } matched expectation: { "httpError" : { "dropConnection" : true }, "httpRequest" : { }, "id" : "18259b70-3abf-4fa2-89ad-ae45ae7ee6f1", "priority" : 0, "timeToLive" : { "unlimited" : true }, "times" : { "unlimited" : true } }2025-03-06 16:24:22,936 DEBUG [org.apache.hc.core5.reactor.IOSessionImpl] c-0000000000[ACTIVE][r:r] -1 bytes read 2025-03-06 16:24:22,936 DEBUG [org.apache.hc.client5.http.impl.async.HttpAsyncMainClientExec] ex-0000000001: execution failed: Connection closed by peer 2025-03-06 16:24:22,936 DEBUG [org.apache.hc.client5.http.impl.async.HttpAsyncMainClientExec] ex-0000000001: execution failed: Connection closed by peer 2025-03-06 16:24:22,936 INFO [org.mockserver.log.MockServerEventLog] 1080 returning error: { "dropConnection" : true } for request: { "method" : "GET", "path" : "/", "headers" : { "content-length" : [ "0" ], "User-Agent" : [ "Apache-HttpAsyncClient/5.4.2 (Java/21.0.5)" ], "Host" : [ "localhost:1080" ], "Connection" : [ "keep-alive" ] }, "keepAlive" : true, "secure" : false, "protocol" : "HTTP_1_1", "localAddress" : "127.0.0.1:1080", "remoteAddress" : "127.0.0.1:63023" } for action: { "dropConnection" : true } from expectation: 18259b70-3abf-4fa2-89ad-ae45ae7ee6f12025-03-06 16:24:22,936 DEBUG [org.apache.hc.client5.http.impl.async.InternalAbstractHttpAsyncClient] ex-0000000001 request failed: Connection closed by peer 2025-03-06 16:24:22,936 DEBUG [org.apache.hc.client5.http.impl.async.InternalAbstractHttpAsyncClient] ex-0000000001 request failed: Connection closed by peer 2025-03-06 16:24:22,936 DEBUG [org.apache.hc.client5.http.impl.nio.PoolingAsyncClientConnectionManager] ep-0000000001 close IMMEDIATE 2025-03-06 16:24:22,936 DEBUG [org.apache.hc.client5.http.impl.nio.PoolingAsyncClientConnectionManager] ep-0000000001 close IMMEDIATE 2025-03-06 16:24:22,936 DEBUG [org.apache.hc.client5.http.impl.nio.DefaultManagedAsyncClientConnection] c-0000000000 Shutdown connection IMMEDIATE 2025-03-06 16:24:22,936 DEBUG [org.apache.hc.client5.http.impl.nio.DefaultManagedAsyncClientConnection] c-0000000000 Shutdown connection IMMEDIATE 2025-03-06 16:24:22,936 DEBUG [org.apache.hc.core5.reactor.IOSessionImpl] c-0000000000[ACTIVE][r:r] Close IMMEDIATE 2025-03-06 16:24:22,937 DEBUG [org.apache.hc.client5.http.impl.async.InternalHttpAsyncClient] ep-0000000001 endpoint closed 2025-03-06 16:24:22,937 DEBUG [org.apache.hc.client5.http.impl.async.InternalHttpAsyncClient] ep-0000000001 endpoint closed 2025-03-06 16:24:22,937 DEBUG [org.apache.hc.client5.http.impl.async.InternalHttpAsyncClient] ep-0000000001 discarding endpoint 2025-03-06 16:24:22,937 DEBUG [org.apache.hc.client5.http.impl.async.InternalHttpAsyncClient] ep-0000000001 discarding endpoint 2025-03-06 16:24:22,937 DEBUG [org.apache.hc.client5.http.impl.nio.PoolingAsyncClientConnectionManager] ep-0000000001 releasing endpoint 2025-03-06 16:24:22,937 DEBUG [org.apache.hc.client5.http.impl.nio.PoolingAsyncClientConnectionManager] ep-0000000001 releasing endpoint 2025-03-06 16:24:22,937 DEBUG [org.apache.hc.client5.http.impl.nio.PoolingAsyncClientConnectionManager] ep-0000000001 connection released [route: {}->[http://localhost:1080]][total available: 0; route allocated: 0 of 5; total allocated: 0 of 25] 2025-03-06 16:24:22,937 DEBUG [org.apache.hc.client5.http.impl.nio.PoolingAsyncClientConnectionManager] ep-0000000001 connection released [route: {}->[http://localhost:1080]][total available: 0; route allocated: 0 of 5; total allocated: 0 of 25] GET http://localhost:1080/->org.apache.hc.core5.http.ConnectionClosedException: Connection closed by peer 2025-03-06 16:24:22,937 DEBUG [org.apache.hc.client5.http.impl.async.AbstractHttpAsyncClientBase] Shutdown GRACEFUL 2025-03-06 16:24:22,937 DEBUG [org.apache.hc.client5.http.impl.async.AbstractHttpAsyncClientBase] Shutdown GRACEFUL 2025-03-06 16:24:22,938 DEBUG [org.apache.hc.client5.http.impl.nio.PoolingAsyncClientConnectionManager] Shutdown connection pool GRACEFUL 2025-03-06 16:24:22,938 DEBUG [org.apache.hc.client5.http.impl.nio.PoolingAsyncClientConnectionManager] Shutdown connection pool GRACEFUL 2025-03-06 16:24:22,938 DEBUG [org.apache.hc.client5.http.impl.nio.PoolingAsyncClientConnectionManager] Connection pool shut down 2025-03-06 16:24:22,938 DEBUG [org.apache.hc.client5.http.impl.nio.PoolingAsyncClientConnectionManager] Connection pool shut down 2025-03-06 16:24:22,939 INFO [org.mockserver.log.MockServerEventLog] stopped for port: 1080 2025-03-06 16:24:22,941 DEBUG [io.netty.buffer.PoolThreadCache] Freed 4 thread-local buffer(s) from thread: MockServer-MockServer-workerEventLoop4 2025-03-06 16:24:23,043 DEBUG [io.netty.buffer.PoolThreadCache] Freed 2 thread-local buffer(s) from thread: MockServer-MockServer-workerEventLoop5 Process finished with exit code 0 {code} was (Author: JIRAUSER308941): Oh, I tried it with *5.3.4-SNAPSHOT* and it *passes* there by failing the future with throwing this error: {code:java} java.util.concurrent.ExecutionException: org.apache.hc.core5.http.ConnectionClosedException: Connection closed by peer at org.apache.hc.core5.concurrent.BasicFuture.getResult(BasicFuture.java:84) at org.apache.hc.core5.concurrent.BasicFuture.get(BasicFuture.java:99) at ApacheHttpClient5TransportIT.connectionResetIsHandledSuccessfully(ApacheHttpClient5TransportIT.java:132) at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103) at java.base/java.lang.reflect.Method.invoke(Method.java:580) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:59) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:56) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17) at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306) at org.junit.runners.BlockJUnit4ClassRunner$1.evaluate(BlockJUnit4ClassRunner.java:100) at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:366) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:103) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:63) at org.junit.runners.ParentRunner$4.run(ParentRunner.java:331) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:79) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:329) at org.junit.runners.ParentRunner.access$100(ParentRunner.java:66) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:293) at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306) at org.junit.runners.ParentRunner.run(ParentRunner.java:413) at org.junit.runner.JUnitCore.run(JUnitCore.java:137) at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:69) at com.intellij.rt.junit.IdeaTestRunner$Repeater$1.execute(IdeaTestRunner.java:38) at com.intellij.rt.execution.junit.TestsRepeater.repeat(TestsRepeater.java:11) at com.intellij.rt.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:35) at com.intellij.rt.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:232) at com.intellij.rt.junit.JUnitStarter.main(JUnitStarter.java:55)Caused by: org.apache.hc.core5.http.ConnectionClosedException: Connection closed by peer at org.apache.hc.core5.http.impl.nio.AbstractHttp1StreamDuplexer.onInput(AbstractHttp1StreamDuplexer.java:355) 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:41) at org.apache.hc.client5.http.impl.async.LoggingIOSession$1.inputReady(LoggingIOSession.java:238) at org.apache.hc.core5.reactor.InternalDataChannel.onIOEvent(InternalDataChannel.java:143) at org.apache.hc.core5.reactor.InternalChannel.handleIOEvent(InternalChannel.java:51) at org.apache.hc.core5.reactor.SingleCoreIOReactor.processEvents(SingleCoreIOReactor.java:176) at org.apache.hc.core5.reactor.SingleCoreIOReactor.doExecute(SingleCoreIOReactor.java:125) at org.apache.hc.core5.reactor.AbstractSingleCoreIOReactor.execute(AbstractSingleCoreIOReactor.java:92) at org.apache.hc.core5.reactor.IOReactorWorker.run(IOReactorWorker.java:44) at java.base/java.lang.Thread.run(Thread.java:1583) {code} and with those logs: {code:java} 2025-03-06 16:24:22,903 DEBUG [org.apache.hc.client5.http.impl.async.InternalAbstractHttpAsyncClient] ex-0000000001 preparing request execution 2025-03-06 16:24:22,903 DEBUG [org.apache.hc.client5.http.impl.async.InternalAbstractHttpAsyncClient] ex-0000000001 preparing request execution 2025-03-06 16:24:22,907 DEBUG [org.apache.hc.client5.http.impl.async.AsyncProtocolExec] ex-0000000001 target auth state: UNCHALLENGED 2025-03-06 16:24:22,907 DEBUG [org.apache.hc.client5.http.impl.async.AsyncProtocolExec] ex-0000000001 target auth state: UNCHALLENGED 2025-03-06 16:24:22,907 DEBUG [org.apache.hc.client5.http.impl.async.AsyncProtocolExec] ex-0000000001 proxy auth state: UNCHALLENGED 2025-03-06 16:24:22,907 DEBUG [org.apache.hc.client5.http.impl.async.AsyncProtocolExec] ex-0000000001 proxy auth state: UNCHALLENGED 2025-03-06 16:24:22,908 DEBUG [org.apache.hc.client5.http.impl.async.AsyncConnectExec] ex-0000000001 acquiring connection with route {}->[http://localhost:1080] 2025-03-06 16:24:22,908 DEBUG [org.apache.hc.client5.http.impl.async.AsyncConnectExec] ex-0000000001 acquiring connection with route {}->[http://localhost:1080] 2025-03-06 16:24:22,908 DEBUG [org.apache.hc.client5.http.impl.async.InternalHttpAsyncClient] ex-0000000001 acquiring endpoint (3 MINUTES) 2025-03-06 16:24:22,908 DEBUG [org.apache.hc.client5.http.impl.async.InternalHttpAsyncClient] ex-0000000001 acquiring endpoint (3 MINUTES) 2025-03-06 16:24:22,909 DEBUG [org.apache.hc.client5.http.impl.nio.PoolingAsyncClientConnectionManager] ex-0000000001 endpoint lease request (3 MINUTES) [route: {}->[http://localhost:1080]][total available: 0; route allocated: 0 of 5; total allocated: 0 of 25] 2025-03-06 16:24:22,909 DEBUG [org.apache.hc.client5.http.impl.nio.PoolingAsyncClientConnectionManager] ex-0000000001 endpoint lease request (3 MINUTES) [route: {}->[http://localhost:1080]][total available: 0; route allocated: 0 of 5; total allocated: 0 of 25] 2025-03-06 16:24:22,911 DEBUG [org.apache.hc.client5.http.impl.nio.PoolingAsyncClientConnectionManager] ex-0000000001 endpoint leased [route: {}->[http://localhost:1080]][total available: 0; route allocated: 1 of 5; total allocated: 1 of 25] 2025-03-06 16:24:22,911 DEBUG [org.apache.hc.client5.http.impl.nio.PoolingAsyncClientConnectionManager] ex-0000000001 endpoint leased [route: {}->[http://localhost:1080]][total available: 0; route allocated: 1 of 5; total allocated: 1 of 25] 2025-03-06 16:24:22,911 DEBUG [org.apache.hc.client5.http.impl.nio.PoolingAsyncClientConnectionManager] ex-0000000001 acquired ep-0000000001 2025-03-06 16:24:22,911 DEBUG [org.apache.hc.client5.http.impl.nio.PoolingAsyncClientConnectionManager] ex-0000000001 acquired ep-0000000001 2025-03-06 16:24:22,911 DEBUG [org.apache.hc.client5.http.impl.async.InternalHttpAsyncClient] ex-0000000001 acquired endpoint ep-0000000001 2025-03-06 16:24:22,911 DEBUG [org.apache.hc.client5.http.impl.async.InternalHttpAsyncClient] ex-0000000001 acquired endpoint ep-0000000001 2025-03-06 16:24:22,911 DEBUG [org.apache.hc.client5.http.impl.async.InternalHttpAsyncClient] ep-0000000001 connecting endpoint (null) 2025-03-06 16:24:22,911 DEBUG [org.apache.hc.client5.http.impl.async.InternalHttpAsyncClient] ep-0000000001 connecting endpoint (null) 2025-03-06 16:24:22,911 DEBUG [org.apache.hc.client5.http.impl.nio.PoolingAsyncClientConnectionManager] ep-0000000001 connecting endpoint to http://localhost:1080 (15 SECONDS) 2025-03-06 16:24:22,911 DEBUG [org.apache.hc.client5.http.impl.nio.PoolingAsyncClientConnectionManager] ep-0000000001 connecting endpoint to http://localhost:1080 (15 SECONDS) 2025-03-06 16:24:22,912 DEBUG [org.apache.hc.client5.http.impl.nio.DefaultAsyncClientConnectionOperator] http://localhost:1080 connecting null->null (15 SECONDS) 2025-03-06 16:24:22,912 DEBUG [org.apache.hc.client5.http.impl.nio.DefaultAsyncClientConnectionOperator] http://localhost:1080 connecting null->null (15 SECONDS) 2025-03-06 16:24:22,913 DEBUG [org.apache.hc.client5.http.impl.nio.MultihomeIOSessionRequester] localhost resolving remote address 2025-03-06 16:24:22,913 DEBUG [org.apache.hc.client5.http.impl.nio.MultihomeIOSessionRequester] localhost resolving remote address 2025-03-06 16:24:22,913 DEBUG [org.apache.hc.client5.http.impl.nio.MultihomeIOSessionRequester] localhost resolved to [localhost/127.0.0.1, localhost/0:0:0:0:0:0:0:1] 2025-03-06 16:24:22,913 DEBUG [org.apache.hc.client5.http.impl.nio.MultihomeIOSessionRequester] localhost resolved to [localhost/127.0.0.1, localhost/0:0:0:0:0:0:0:1] 2025-03-06 16:24:22,913 DEBUG [org.apache.hc.client5.http.impl.nio.MultihomeIOSessionRequester] localhost:1080 connecting null->localhost/127.0.0.1:1080 (15 SECONDS) 2025-03-06 16:24:22,913 DEBUG [org.apache.hc.client5.http.impl.nio.MultihomeIOSessionRequester] localhost:1080 connecting null->localhost/127.0.0.1:1080 (15 SECONDS) 2025-03-06 16:24:22,921 DEBUG [org.apache.hc.core5.reactor.IOSessionImpl] c-0000000000[ACTIVE][rc:c] protocol upgrade class org.apache.hc.core5.http.impl.nio.ClientHttp1IOEventHandler 2025-03-06 16:24:22,921 DEBUG [org.apache.hc.client5.http.impl.nio.MultihomeIOSessionRequester] localhost:1080 connected null->localhost/127.0.0.1:1080 as c-0000000000 2025-03-06 16:24:22,921 DEBUG [org.apache.hc.client5.http.impl.nio.MultihomeIOSessionRequester] localhost:1080 connected null->localhost/127.0.0.1:1080 as c-0000000000 2025-03-06 16:24:22,922 DEBUG [org.apache.hc.client5.http.impl.nio.DefaultAsyncClientConnectionOperator] c-0000000000 http://localhost:1080 connected /127.0.0.1:63023->localhost/127.0.0.1:1080 2025-03-06 16:24:22,922 DEBUG [org.apache.hc.client5.http.impl.nio.DefaultAsyncClientConnectionOperator] c-0000000000 http://localhost:1080 connected /127.0.0.1:63023->localhost/127.0.0.1:1080 2025-03-06 16:24:22,922 DEBUG [org.apache.hc.client5.http.impl.nio.PoolingAsyncClientConnectionManager] ep-0000000001 connected c-0000000000 2025-03-06 16:24:22,922 DEBUG [org.apache.hc.client5.http.impl.nio.PoolingAsyncClientConnectionManager] ep-0000000001 connected c-0000000000 2025-03-06 16:24:22,922 DEBUG [org.apache.hc.client5.http.impl.async.InternalHttpAsyncClient] ep-0000000001 endpoint connected 2025-03-06 16:24:22,922 DEBUG [org.apache.hc.client5.http.impl.async.InternalHttpAsyncClient] ep-0000000001 endpoint connected 2025-03-06 16:24:22,922 DEBUG [org.apache.hc.client5.http.impl.async.AsyncConnectExec] ex-0000000001 connected to target 2025-03-06 16:24:22,922 DEBUG [org.apache.hc.client5.http.impl.async.AsyncConnectExec] ex-0000000001 connected to target 2025-03-06 16:24:22,922 DEBUG [org.apache.hc.client5.http.impl.async.AsyncConnectExec] ex-0000000001 route fully established 2025-03-06 16:24:22,922 DEBUG [org.apache.hc.client5.http.impl.async.AsyncConnectExec] ex-0000000001 route fully established 2025-03-06 16:24:22,922 DEBUG [org.apache.hc.client5.http.impl.async.HttpAsyncMainClientExec] ex-0000000001 executing GET / 2025-03-06 16:24:22,922 DEBUG [org.apache.hc.client5.http.impl.async.HttpAsyncMainClientExec] ex-0000000001 executing GET / 2025-03-06 16:24:22,923 DEBUG [org.apache.hc.client5.http.impl.async.InternalHttpAsyncClient] ep-0000000001 start execution ex-0000000001 2025-03-06 16:24:22,923 DEBUG [org.apache.hc.client5.http.impl.async.InternalHttpAsyncClient] ep-0000000001 start execution ex-0000000001 2025-03-06 16:24:22,923 DEBUG [org.apache.hc.client5.http.impl.nio.PoolingAsyncClientConnectionManager] ep-0000000001 executing exchange ex-0000000001 over c-0000000000 2025-03-06 16:24:22,923 DEBUG [org.apache.hc.client5.http.impl.nio.PoolingAsyncClientConnectionManager] ep-0000000001 executing exchange ex-0000000001 over c-0000000000 2025-03-06 16:24:22,924 DEBUG [org.apache.hc.client5.http.impl.nio.DefaultManagedAsyncClientConnection] c-0000000000 RequestExecutionCommand with NORMAL priority 2025-03-06 16:24:22,924 DEBUG [org.apache.hc.client5.http.impl.nio.DefaultManagedAsyncClientConnection] c-0000000000 RequestExecutionCommand with NORMAL priority 2025-03-06 16:24:22,924 DEBUG [org.apache.hc.core5.reactor.IOSessionImpl] c-0000000000[ACTIVE][rwc:c] Enqueued RequestExecutionCommand with priority IMMEDIATE 2025-03-06 16:24:22,924 DEBUG [org.apache.hc.core5.reactor.IOSessionImpl] c-0000000000[ACTIVE][rw:c] Event cleared [c] 2025-03-06 16:24:22,925 DEBUG [org.apache.hc.core5.reactor.IOSessionImpl] c-0000000000[ACTIVE][r:c] Event cleared [w] 2025-03-06 16:24:22,926 DEBUG [org.apache.hc.client5.http.protocol.RequestAddCookies] ex-0000000001 Cookie spec selected: strict 2025-03-06 16:24:22,926 DEBUG [org.apache.hc.client5.http.protocol.RequestAddCookies] ex-0000000001 Cookie spec selected: strict 2025-03-06 16:24:22,929 DEBUG [org.apache.hc.client5.http.impl.async.HttpAsyncMainClientExec] ex-0000000001 send request GET /, null entity 2025-03-06 16:24:22,929 DEBUG [org.apache.hc.client5.http.impl.async.HttpAsyncMainClientExec] ex-0000000001 send request GET /, null entity 2025-03-06 16:24:22,929 DEBUG [org.apache.hc.client5.http.headers] c-0000000000 >> GET / HTTP/1.1 2025-03-06 16:24:22,929 DEBUG [org.apache.hc.client5.http.headers] c-0000000000 >> GET / HTTP/1.1 2025-03-06 16:24:22,929 DEBUG [org.apache.hc.client5.http.headers] c-0000000000 >> Host: localhost:1080 2025-03-06 16:24:22,929 DEBUG [org.apache.hc.client5.http.headers] c-0000000000 >> Host: localhost:1080 2025-03-06 16:24:22,929 DEBUG [org.apache.hc.client5.http.headers] c-0000000000 >> Connection: keep-alive 2025-03-06 16:24:22,929 DEBUG [org.apache.hc.client5.http.headers] c-0000000000 >> Connection: keep-alive 2025-03-06 16:24:22,929 DEBUG [org.apache.hc.client5.http.headers] c-0000000000 >> User-Agent: Apache-HttpAsyncClient/5.4.2 (Java/21.0.5) 2025-03-06 16:24:22,929 DEBUG [org.apache.hc.client5.http.headers] c-0000000000 >> User-Agent: Apache-HttpAsyncClient/5.4.2 (Java/21.0.5) 2025-03-06 16:24:22,930 DEBUG [org.apache.hc.core5.reactor.IOSessionImpl] c-0000000000[ACTIVE][r:c] 120 bytes written 2025-03-06 16:24:22,930 DEBUG [org.apache.hc.client5.http.wire] c-0000000000[ACTIVE][r:c] >> GET / HTTP/1.1 47 45 54 20 2f 20 48 54 54 50 2f 31 2e 31 0d 0a 2025-03-06 16:24:22,930 DEBUG [org.apache.hc.client5.http.wire] c-0000000000[ACTIVE][r:c] >> GET / HTTP/1.1 47 45 54 20 2f 20 48 54 54 50 2f 31 2e 31 0d 0a 2025-03-06 16:24:22,930 DEBUG [org.apache.hc.client5.http.wire] c-0000000000[ACTIVE][r:c] >> Host: localhost: 48 6f 73 74 3a 20 6c 6f 63 61 6c 68 6f 73 74 3a 2025-03-06 16:24:22,930 DEBUG [org.apache.hc.client5.http.wire] c-0000000000[ACTIVE][r:c] >> Host: localhost: 48 6f 73 74 3a 20 6c 6f 63 61 6c 68 6f 73 74 3a 2025-03-06 16:24:22,930 DEBUG [org.apache.hc.client5.http.wire] c-0000000000[ACTIVE][r:c] >> 1080 Connection 31 30 38 30 0d 0a 43 6f 6e 6e 65 63 74 69 6f 6e 2025-03-06 16:24:22,930 DEBUG [org.apache.hc.client5.http.wire] c-0000000000[ACTIVE][r:c] >> 1080 Connection 31 30 38 30 0d 0a 43 6f 6e 6e 65 63 74 69 6f 6e 2025-03-06 16:24:22,930 DEBUG [org.apache.hc.client5.http.wire] c-0000000000[ACTIVE][r:c] >> : keep-alive Us 3a 20 6b 65 65 70 2d 61 6c 69 76 65 0d 0a 55 73 2025-03-06 16:24:22,930 DEBUG [org.apache.hc.client5.http.wire] c-0000000000[ACTIVE][r:c] >> : keep-alive Us 3a 20 6b 65 65 70 2d 61 6c 69 76 65 0d 0a 55 73 2025-03-06 16:24:22,930 DEBUG [org.apache.hc.client5.http.wire] c-0000000000[ACTIVE][r:c] >> er-Agent: Apache 65 72 2d 41 67 65 6e 74 3a 20 41 70 61 63 68 65 2025-03-06 16:24:22,930 DEBUG [org.apache.hc.client5.http.wire] c-0000000000[ACTIVE][r:c] >> er-Agent: Apache 65 72 2d 41 67 65 6e 74 3a 20 41 70 61 63 68 65 2025-03-06 16:24:22,930 DEBUG [org.apache.hc.client5.http.wire] c-0000000000[ACTIVE][r:c] >> -HttpAsyncClient 2d 48 74 74 70 41 73 79 6e 63 43 6c 69 65 6e 74 2025-03-06 16:24:22,930 DEBUG [org.apache.hc.client5.http.wire] c-0000000000[ACTIVE][r:c] >> -HttpAsyncClient 2d 48 74 74 70 41 73 79 6e 63 43 6c 69 65 6e 74 2025-03-06 16:24:22,930 DEBUG [org.apache.hc.client5.http.wire] c-0000000000[ACTIVE][r:c] >> /5.4.2 (Java/21. 2f 35 2e 34 2e 32 20 28 4a 61 76 61 2f 32 31 2e 2025-03-06 16:24:22,930 DEBUG [org.apache.hc.client5.http.wire] c-0000000000[ACTIVE][r:c] >> /5.4.2 (Java/21. 2f 35 2e 34 2e 32 20 28 4a 61 76 61 2f 32 31 2e 2025-03-06 16:24:22,930 DEBUG [org.apache.hc.client5.http.wire] c-0000000000[ACTIVE][r:c] >> 0.5) 30 2e 35 29 0d 0a 0d 0a 2025-03-06 16:24:22,930 DEBUG [org.apache.hc.client5.http.wire] c-0000000000[ACTIVE][r:c] >> 0.5) 30 2e 35 29 0d 0a 0d 0a 2025-03-06 16:24:22,930 DEBUG [org.apache.hc.core5.reactor.IOSessionImpl] c-0000000000[ACTIVE][rw:c] Event set [w] 2025-03-06 16:24:22,930 DEBUG [org.apache.hc.core5.reactor.IOSessionImpl] c-0000000000[ACTIVE][r:c] Event cleared [w] 2025-03-06 16:24:22,934 INFO [org.mockserver.log.MockServerEventLog] 1080 received request: { "method" : "GET", "path" : "/", "headers" : { "content-length" : [ "0" ], "User-Agent" : [ "Apache-HttpAsyncClient/5.4.2 (Java/21.0.5)" ], "Host" : [ "localhost:1080" ], "Connection" : [ "keep-alive" ] }, "keepAlive" : true, "secure" : false, "protocol" : "HTTP_1_1", "localAddress" : "127.0.0.1:1080", "remoteAddress" : "127.0.0.1:63023" }2025-03-06 16:24:22,935 INFO [org.mockserver.log.MockServerEventLog] 1080 request: { "method" : "GET", "path" : "/", "headers" : { "content-length" : [ "0" ], "User-Agent" : [ "Apache-HttpAsyncClient/5.4.2 (Java/21.0.5)" ], "Host" : [ "localhost:1080" ], "Connection" : [ "keep-alive" ] }, "keepAlive" : true, "secure" : false, "protocol" : "HTTP_1_1", "localAddress" : "127.0.0.1:1080", "remoteAddress" : "127.0.0.1:63023" } matched expectation: { "httpError" : { "dropConnection" : true }, "httpRequest" : { }, "id" : "18259b70-3abf-4fa2-89ad-ae45ae7ee6f1", "priority" : 0, "timeToLive" : { "unlimited" : true }, "times" : { "unlimited" : true } }2025-03-06 16:24:22,936 DEBUG [org.apache.hc.core5.reactor.IOSessionImpl] c-0000000000[ACTIVE][r:r] -1 bytes read 2025-03-06 16:24:22,936 DEBUG [org.apache.hc.client5.http.impl.async.HttpAsyncMainClientExec] ex-0000000001: execution failed: Connection closed by peer 2025-03-06 16:24:22,936 DEBUG [org.apache.hc.client5.http.impl.async.HttpAsyncMainClientExec] ex-0000000001: execution failed: Connection closed by peer 2025-03-06 16:24:22,936 INFO [org.mockserver.log.MockServerEventLog] 1080 returning error: { "dropConnection" : true } for request: { "method" : "GET", "path" : "/", "headers" : { "content-length" : [ "0" ], "User-Agent" : [ "Apache-HttpAsyncClient/5.4.2 (Java/21.0.5)" ], "Host" : [ "localhost:1080" ], "Connection" : [ "keep-alive" ] }, "keepAlive" : true, "secure" : false, "protocol" : "HTTP_1_1", "localAddress" : "127.0.0.1:1080", "remoteAddress" : "127.0.0.1:63023" } for action: { "dropConnection" : true } from expectation: 18259b70-3abf-4fa2-89ad-ae45ae7ee6f12025-03-06 16:24:22,936 DEBUG [org.apache.hc.client5.http.impl.async.InternalAbstractHttpAsyncClient] ex-0000000001 request failed: Connection closed by peer 2025-03-06 16:24:22,936 DEBUG [org.apache.hc.client5.http.impl.async.InternalAbstractHttpAsyncClient] ex-0000000001 request failed: Connection closed by peer 2025-03-06 16:24:22,936 DEBUG [org.apache.hc.client5.http.impl.nio.PoolingAsyncClientConnectionManager] ep-0000000001 close IMMEDIATE 2025-03-06 16:24:22,936 DEBUG [org.apache.hc.client5.http.impl.nio.PoolingAsyncClientConnectionManager] ep-0000000001 close IMMEDIATE 2025-03-06 16:24:22,936 DEBUG [org.apache.hc.client5.http.impl.nio.DefaultManagedAsyncClientConnection] c-0000000000 Shutdown connection IMMEDIATE 2025-03-06 16:24:22,936 DEBUG [org.apache.hc.client5.http.impl.nio.DefaultManagedAsyncClientConnection] c-0000000000 Shutdown connection IMMEDIATE 2025-03-06 16:24:22,936 DEBUG [org.apache.hc.core5.reactor.IOSessionImpl] c-0000000000[ACTIVE][r:r] Close IMMEDIATE 2025-03-06 16:24:22,937 DEBUG [org.apache.hc.client5.http.impl.async.InternalHttpAsyncClient] ep-0000000001 endpoint closed 2025-03-06 16:24:22,937 DEBUG [org.apache.hc.client5.http.impl.async.InternalHttpAsyncClient] ep-0000000001 endpoint closed 2025-03-06 16:24:22,937 DEBUG [org.apache.hc.client5.http.impl.async.InternalHttpAsyncClient] ep-0000000001 discarding endpoint 2025-03-06 16:24:22,937 DEBUG [org.apache.hc.client5.http.impl.async.InternalHttpAsyncClient] ep-0000000001 discarding endpoint 2025-03-06 16:24:22,937 DEBUG [org.apache.hc.client5.http.impl.nio.PoolingAsyncClientConnectionManager] ep-0000000001 releasing endpoint 2025-03-06 16:24:22,937 DEBUG [org.apache.hc.client5.http.impl.nio.PoolingAsyncClientConnectionManager] ep-0000000001 releasing endpoint 2025-03-06 16:24:22,937 DEBUG [org.apache.hc.client5.http.impl.nio.PoolingAsyncClientConnectionManager] ep-0000000001 connection released [route: {}->[http://localhost:1080]][total available: 0; route allocated: 0 of 5; total allocated: 0 of 25] 2025-03-06 16:24:22,937 DEBUG [org.apache.hc.client5.http.impl.nio.PoolingAsyncClientConnectionManager] ep-0000000001 connection released [route: {}->[http://localhost:1080]][total available: 0; route allocated: 0 of 5; total allocated: 0 of 25] GET http://localhost:1080/->org.apache.hc.core5.http.ConnectionClosedException: Connection closed by peer 2025-03-06 16:24:22,937 DEBUG [org.apache.hc.client5.http.impl.async.AbstractHttpAsyncClientBase] Shutdown GRACEFUL 2025-03-06 16:24:22,937 DEBUG [org.apache.hc.client5.http.impl.async.AbstractHttpAsyncClientBase] Shutdown GRACEFUL 2025-03-06 16:24:22,938 DEBUG [org.apache.hc.client5.http.impl.nio.PoolingAsyncClientConnectionManager] Shutdown connection pool GRACEFUL 2025-03-06 16:24:22,938 DEBUG [org.apache.hc.client5.http.impl.nio.PoolingAsyncClientConnectionManager] Shutdown connection pool GRACEFUL 2025-03-06 16:24:22,938 DEBUG [org.apache.hc.client5.http.impl.nio.PoolingAsyncClientConnectionManager] Connection pool shut down 2025-03-06 16:24:22,938 DEBUG [org.apache.hc.client5.http.impl.nio.PoolingAsyncClientConnectionManager] Connection pool shut down 2025-03-06 16:24:22,939 INFO [org.mockserver.log.MockServerEventLog] stopped for port: 1080 2025-03-06 16:24:22,941 DEBUG [io.netty.buffer.PoolThreadCache] Freed 4 thread-local buffer(s) from thread: MockServer-MockServer-workerEventLoop4 2025-03-06 16:24:23,043 DEBUG [io.netty.buffer.PoolThreadCache] Freed 2 thread-local buffer(s) from thread: MockServer-MockServer-workerEventLoop5 Process finished with exit code 0 {code} > CloseableHttpAsyncClient.execute hangs forever upon connection reset > -------------------------------------------------------------------- > > Key: HTTPCORE-777 > URL: https://issues.apache.org/jira/browse/HTTPCORE-777 > Project: HttpComponents HttpCore > Issue Type: Bug > Components: HttpCore > Affects Versions: 5.3.3 > Reporter: Oleksandr Kriuchenko > Priority: Major > > There seems to be an issue with async http client request execution: > if connection is closed during request execution then the future > returned by the CloseableHttpAsyncClient.execute never completes. > Please find a test setup to reproduce the issue (along with the > conditions description under which the issue reproduces) in > [https://github.com/oleksandr-kriuchenko-lohika/httpcore5-issue] -- This message was sent by Atlassian Jira (v8.20.10#820010) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@hc.apache.org For additional commands, e-mail: dev-h...@hc.apache.org