[jira] [Commented] (HTTPCLIENT-2187) Classic proxy handling for HTTPS seems broken as of 5.1.1+
[ https://issues.apache.org/jira/browse/HTTPCLIENT-2187?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17446909#comment-17446909 ] Tim te Beek commented on HTTPCLIENT-2187: - Was able to find this place in the codebase where a SSLConnectionSocketFactory is created; might that be related? [https://github.com/wiremock/wiremock/blob/master/src/main/java/com/github/tomakehurst/wiremock/http/HttpClientFactory.java#L110] I'm a bit new to the WireMock project specifics, as well as Apache HttpClient, specially where it concerns the proxy/https handling. So sorry if details are only trickling in. Trying to brush up where I can but it's taking some time. > Classic proxy handling for HTTPS seems broken as of 5.1.1+ > -- > > Key: HTTPCLIENT-2187 > URL: https://issues.apache.org/jira/browse/HTTPCLIENT-2187 > Project: HttpComponents HttpClient > Issue Type: Bug > Components: HttpClient (classic) >Affects Versions: 5.1.1, 5.1.2, 5.2-alpha1 >Reporter: Tim te Beek >Priority: Major > > Classic proxy handling for HTTPS seems to have broken as of 5.1.1+, as seen > here: [https://github.com/wiremock/wiremock/pull/1698] > To give just one sample, we now see a failure stacktrace such as this: > {{java.lang.IllegalStateException: Endpoint is not connected}} > {{ at org.apache.hc.core5.util.Asserts.check(Asserts.java:38)}} > {{ at > org.apache.hc.client5.http.impl.io.PoolingHttpClientConnectionManager$InternalConnectionEndpoint.getValidatedPoolEntry(PoolingHttpClientConnectionManager.java:637)}} > {{ at > org.apache.hc.client5.http.impl.io.PoolingHttpClientConnectionManager.upgrade(PoolingHttpClientConnectionManager.java:454)}} > {{ at > org.apache.hc.client5.http.impl.classic.InternalExecRuntime.upgradeTls(InternalExecRuntime.java:190)}} > {{ at > org.apache.hc.client5.http.impl.classic.ConnectExec.execute(ConnectExec.java:172)}} > {{ at > org.apache.hc.client5.http.impl.classic.ExecChainElement.execute(ExecChainElement.java:51)}} > {{ at > org.apache.hc.client5.http.impl.classic.ProtocolExec.execute(ProtocolExec.java:197)}} > {{ at > org.apache.hc.client5.http.impl.classic.ExecChainElement.execute(ExecChainElement.java:51)}} > {{ at > org.apache.hc.client5.http.impl.classic.InternalHttpClient.doExecute(InternalHttpClient.java:170)}} > {{ at > org.apache.hc.client5.http.impl.classic.CloseableHttpClient.execute(CloseableHttpClient.java:75)}} > {{ at > org.apache.hc.client5.http.impl.classic.CloseableHttpClient.execute(CloseableHttpClient.java:89)}} > {{ at > com.github.tomakehurst.wiremock.junit5.JUnitJupiterExtensionJvmProxyNonStaticProgrammaticTest.getContent(JUnitJupiterExtensionJvmProxyNonStaticProgrammaticTest.java:67)}} > {{ at > com.github.tomakehurst.wiremock.junit5.JUnitJupiterExtensionJvmProxyNonStaticProgrammaticTest.configures_jvm_proxy_and_enables_browser_proxying_https(JUnitJupiterExtensionJvmProxyNonStaticProgrammaticTest.java:63)}} > That test basically calls this class to set the System proxy properties: > [https://github.com/wiremock/wiremock/blob/master/src/main/java/com/github/tomakehurst/wiremock/http/JvmProxyConfigurer.java#L48] > For HTTP that still works fine, for HTTPS it now fails. > > There were some recent changes in 5.1.1 related to proxy handling & keep > alive for async: > [https://issues.apache.org/jira/projects/HTTPCLIENT/issues/HTTPCLIENT-2177] > [https://github.com/apache/httpcomponents-client/compare/50f93ec18be8d6f49138825356051c4c0b60dce4...90f69c87b27b721ea8f0e23bdb4baf92bd7cde06] > However, we're using classic still, and seeing the error above, so not sure > it's related. > Could anyone look into why we are now having these issues with only a patch > version bump? -- This message was sent by Atlassian Jira (v8.20.1#820001) - To unsubscribe, e-mail: dev-unsubscr...@hc.apache.org For additional commands, e-mail: dev-h...@hc.apache.org
[jira] [Commented] (HTTPCLIENT-2187) Classic proxy handling for HTTPS seems broken as of 5.1.1+
[ https://issues.apache.org/jira/browse/HTTPCLIENT-2187?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17446880#comment-17446880 ] Tim te Beek commented on HTTPCLIENT-2187: - So I ran com.github.tomakehurst.wiremock.JvmProxyConfigAcceptanceTest.configuresHttpsProxyingOnlyFromAWireMockServer() in this branch: [https://github.com/wiremock/wiremock/pull/1698] These are the logs: {code:java} 2021-11-20 22:56:09,340 main ERROR Unable to locate appender "Console" for logger config "org.apache.hc.client5.http" 2021-11-20 22:56:09,344 main ERROR Unable to locate appender "Console" for logger config "org.apache.hc.client5.http.wire" 2021-11-20 22:56:09,403 INFO [com.tngtech.archunit.ArchConfiguration] Reading ArchUnit properties from file:/home/tim/Documents/workspace/wiremock/bin/test/archunit.properties 2021-11-20 22:56:09,829 INFO [org.eclipse.jetty.util.log] Logging initialized @1063ms to org.eclipse.jetty.util.log.Slf4jLog 2021-11-20 22:56:10,033 INFO [org.eclipse.jetty.server.Server] jetty-9.4.44.v20210927; built: 2021-09-27T23:02:44.612Z; git: 8da83308eeca865e495e53ef315a249d63ba9332; jvm 1.8.0_302-b08 2021-11-20 22:56:10,046 INFO [org.eclipse.jetty.server.handler.ContextHandler] Started o.e.j.s.ServletContextHandler@791cbf87{/__admin,null,AVAILABLE} 2021-11-20 22:56:10,051 INFO [org.eclipse.jetty.server.handler.ContextHandler.ROOT] RequestHandlerClass from context returned com.github.tomakehurst.wiremock.http.StubRequestHandler. Normalized mapped under returned 'null' 2021-11-20 22:56:10,051 INFO [org.eclipse.jetty.server.handler.ContextHandler] Started o.e.j.s.ServletContextHandler@66971f6b{/,null,AVAILABLE} 2021-11-20 22:56:10,062 INFO [org.eclipse.jetty.server.AbstractConnector] Started NetworkTrafficServerConnector@1c3b9394{HTTP/1.1, (http/1.1, h2c)}{0.0.0.0:41447} 2021-11-20 22:56:10,079 INFO [org.eclipse.jetty.server.AbstractConnector] Started NetworkTrafficServerConnector@54a67a45{SSL, (ssl, http/1.1)}{0.0.0.0:35709} 2021-11-20 22:56:10,079 INFO [org.eclipse.jetty.server.Server] Started @1314ms 2021-11-20 22:56:10,096 DEBUG [org.apache.hc.client5.http.impl.classic.InternalHttpClient] ex-01 preparing request execution 2021-11-20 22:56:10,100 DEBUG [org.apache.hc.client5.http.impl.classic.ProtocolExec] ex-01 target auth state: UNCHALLENGED 2021-11-20 22:56:10,100 DEBUG [org.apache.hc.client5.http.impl.classic.ConnectExec] ex-01 acquiring connection with route {tls}->http://localhost:41447->https://example.com:443 2021-11-20 22:56:10,101 DEBUG [org.apache.hc.client5.http.impl.classic.InternalHttpClient] ex-01 acquiring endpoint (3 MINUTES) 2021-11-20 22:56:10,102 DEBUG [org.apache.hc.client5.http.impl.io.PoolingHttpClientConnectionManager] ex-01 endpoint lease request (3 MINUTES) [route: {tls}->http://localhost:41447->https://example.com:443][total available: 0; route allocated: 0 of 5; total allocated: 0 of 25] 2021-11-20 22:56:10,104 DEBUG [org.apache.hc.client5.http.impl.io.PoolingHttpClientConnectionManager] ex-01 endpoint leased [route: {tls}->http://localhost:41447->https://example.com:443][total available: 0; route allocated: 1 of 5; total allocated: 1 of 25] 2021-11-20 22:56:10,111 DEBUG [org.apache.hc.client5.http.impl.io.PoolingHttpClientConnectionManager] ex-01 acquired ep-00 2021-11-20 22:56:10,112 DEBUG [org.apache.hc.client5.http.impl.classic.InternalHttpClient] ex-01 acquired endpoint ep-00 2021-11-20 22:56:10,112 DEBUG [org.apache.hc.client5.http.impl.classic.ConnectExec] ex-01 opening connection {tls}->http://localhost:41447->https://example.com:443 2021-11-20 22:56:10,112 DEBUG [org.apache.hc.client5.http.impl.classic.InternalHttpClient] ep-00 connecting endpoint (3 MINUTES) 2021-11-20 22:56:10,112 DEBUG [org.apache.hc.client5.http.impl.io.PoolingHttpClientConnectionManager] ep-00 connecting endpoint to http://localhost:41447 (3 MINUTES) 2021-11-20 22:56:10,114 DEBUG [org.apache.hc.client5.http.impl.io.DefaultHttpClientConnectionOperator] http-outgoing-0 connecting to localhost/127.0.0.1:41447 2021-11-20 22:56:10,115 DEBUG [org.apache.hc.client5.http.impl.io.DefaultHttpClientConnectionOperator] http-outgoing-0 connection established 127.0.0.1:55746<->127.0.0.1:41447 2021-11-20 22:56:10,115 DEBUG [org.apache.hc.client5.http.impl.io.PoolingHttpClientConnectionManager] ep-00 connected http-outgoing-0 2021-11-20 22:56:10,115 DEBUG [org.apache.hc.client5.http.impl.classic.InternalHttpClient] ep-00 endpoint connected 2021-11-20 22:56:10,115 DEBUG [org.apache.hc.client5.http.impl.io.DefaultManagedHttpClientConnection] http-outgoing-0 set socket timeout to 3 MILLISECONDS 2021-11-20 22:56:10,115 DEBUG [org.apache.hc.client5.http.impl.classic.InternalHttpClient] ep-00 start execution ex-01 2021-11-20 22:56:10,115 DEBUG
[jira] [Commented] (HTTPCLIENT-2187) Classic proxy handling for HTTPS seems broken as of 5.1.1+
[ https://issues.apache.org/jira/browse/HTTPCLIENT-2187?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17446879#comment-17446879 ] Tim te Beek commented on HTTPCLIENT-2187: - Could be; I had looked through the changes but didn't immediately recognize anything as a possible cause other than the proxy changes. [https://github.com/apache/httpcomponents-client/compare/rel/v5.1...rel/v5.1.1] Not too familiar with the httpclient code base to definitively say what the issue is; feel free to update the title/content if there's a better fitting description. > Classic proxy handling for HTTPS seems broken as of 5.1.1+ > -- > > Key: HTTPCLIENT-2187 > URL: https://issues.apache.org/jira/browse/HTTPCLIENT-2187 > Project: HttpComponents HttpClient > Issue Type: Bug > Components: HttpClient (classic) >Affects Versions: 5.1.1, 5.1.2, 5.2-alpha1 >Reporter: Tim te Beek >Priority: Major > > Classic proxy handling for HTTPS seems to have broken as of 5.1.1+, as seen > here: [https://github.com/wiremock/wiremock/pull/1698] > To give just one sample, we now see a failure stacktrace such as this: > {{java.lang.IllegalStateException: Endpoint is not connected}} > {{ at org.apache.hc.core5.util.Asserts.check(Asserts.java:38)}} > {{ at > org.apache.hc.client5.http.impl.io.PoolingHttpClientConnectionManager$InternalConnectionEndpoint.getValidatedPoolEntry(PoolingHttpClientConnectionManager.java:637)}} > {{ at > org.apache.hc.client5.http.impl.io.PoolingHttpClientConnectionManager.upgrade(PoolingHttpClientConnectionManager.java:454)}} > {{ at > org.apache.hc.client5.http.impl.classic.InternalExecRuntime.upgradeTls(InternalExecRuntime.java:190)}} > {{ at > org.apache.hc.client5.http.impl.classic.ConnectExec.execute(ConnectExec.java:172)}} > {{ at > org.apache.hc.client5.http.impl.classic.ExecChainElement.execute(ExecChainElement.java:51)}} > {{ at > org.apache.hc.client5.http.impl.classic.ProtocolExec.execute(ProtocolExec.java:197)}} > {{ at > org.apache.hc.client5.http.impl.classic.ExecChainElement.execute(ExecChainElement.java:51)}} > {{ at > org.apache.hc.client5.http.impl.classic.InternalHttpClient.doExecute(InternalHttpClient.java:170)}} > {{ at > org.apache.hc.client5.http.impl.classic.CloseableHttpClient.execute(CloseableHttpClient.java:75)}} > {{ at > org.apache.hc.client5.http.impl.classic.CloseableHttpClient.execute(CloseableHttpClient.java:89)}} > {{ at > com.github.tomakehurst.wiremock.junit5.JUnitJupiterExtensionJvmProxyNonStaticProgrammaticTest.getContent(JUnitJupiterExtensionJvmProxyNonStaticProgrammaticTest.java:67)}} > {{ at > com.github.tomakehurst.wiremock.junit5.JUnitJupiterExtensionJvmProxyNonStaticProgrammaticTest.configures_jvm_proxy_and_enables_browser_proxying_https(JUnitJupiterExtensionJvmProxyNonStaticProgrammaticTest.java:63)}} > That test basically calls this class to set the System proxy properties: > [https://github.com/wiremock/wiremock/blob/master/src/main/java/com/github/tomakehurst/wiremock/http/JvmProxyConfigurer.java#L48] > For HTTP that still works fine, for HTTPS it now fails. > > There were some recent changes in 5.1.1 related to proxy handling & keep > alive for async: > [https://issues.apache.org/jira/projects/HTTPCLIENT/issues/HTTPCLIENT-2177] > [https://github.com/apache/httpcomponents-client/compare/50f93ec18be8d6f49138825356051c4c0b60dce4...90f69c87b27b721ea8f0e23bdb4baf92bd7cde06] > However, we're using classic still, and seeing the error above, so not sure > it's related. > Could anyone look into why we are now having these issues with only a patch > version bump? -- This message was sent by Atlassian Jira (v8.20.1#820001) - To unsubscribe, e-mail: dev-unsubscr...@hc.apache.org For additional commands, e-mail: dev-h...@hc.apache.org
[jira] [Updated] (HTTPCLIENT-2187) Classic proxy handling for HTTPS seems broken as of 5.1.1+
[ https://issues.apache.org/jira/browse/HTTPCLIENT-2187?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Tim te Beek updated HTTPCLIENT-2187: Description: Classic proxy handling for HTTPS seems to have broken as of 5.1.1+, as seen here: [https://github.com/wiremock/wiremock/pull/1698] To give just one sample, we now see a failure stacktrace such as this: {{java.lang.IllegalStateException: Endpoint is not connected}} {{ at org.apache.hc.core5.util.Asserts.check(Asserts.java:38)}} {{ at org.apache.hc.client5.http.impl.io.PoolingHttpClientConnectionManager$InternalConnectionEndpoint.getValidatedPoolEntry(PoolingHttpClientConnectionManager.java:637)}} {{ at org.apache.hc.client5.http.impl.io.PoolingHttpClientConnectionManager.upgrade(PoolingHttpClientConnectionManager.java:454)}} {{ at org.apache.hc.client5.http.impl.classic.InternalExecRuntime.upgradeTls(InternalExecRuntime.java:190)}} {{ at org.apache.hc.client5.http.impl.classic.ConnectExec.execute(ConnectExec.java:172)}} {{ at org.apache.hc.client5.http.impl.classic.ExecChainElement.execute(ExecChainElement.java:51)}} {{ at org.apache.hc.client5.http.impl.classic.ProtocolExec.execute(ProtocolExec.java:197)}} {{ at org.apache.hc.client5.http.impl.classic.ExecChainElement.execute(ExecChainElement.java:51)}} {{ at org.apache.hc.client5.http.impl.classic.InternalHttpClient.doExecute(InternalHttpClient.java:170)}} {{ at org.apache.hc.client5.http.impl.classic.CloseableHttpClient.execute(CloseableHttpClient.java:75)}} {{ at org.apache.hc.client5.http.impl.classic.CloseableHttpClient.execute(CloseableHttpClient.java:89)}} {{ at com.github.tomakehurst.wiremock.junit5.JUnitJupiterExtensionJvmProxyNonStaticProgrammaticTest.getContent(JUnitJupiterExtensionJvmProxyNonStaticProgrammaticTest.java:67)}} {{ at com.github.tomakehurst.wiremock.junit5.JUnitJupiterExtensionJvmProxyNonStaticProgrammaticTest.configures_jvm_proxy_and_enables_browser_proxying_https(JUnitJupiterExtensionJvmProxyNonStaticProgrammaticTest.java:63)}} That test basically calls this class to set the System proxy properties: [https://github.com/wiremock/wiremock/blob/master/src/main/java/com/github/tomakehurst/wiremock/http/JvmProxyConfigurer.java#L48] For HTTP that still works fine, for HTTPS it now fails. There were some recent changes in 5.1.1 related to proxy handling & keep alive for async: [https://issues.apache.org/jira/projects/HTTPCLIENT/issues/HTTPCLIENT-2177] [https://github.com/apache/httpcomponents-client/compare/50f93ec18be8d6f49138825356051c4c0b60dce4...90f69c87b27b721ea8f0e23bdb4baf92bd7cde06] However, we're using classic still, and seeing the error above, so not sure it's related. Could anyone look into why we are now having these issues with only a patch version bump? was: Classic proxy handling for HTTPS seems to have broken as of 5.1.1+, as seen here: https://github.com/wiremock/wiremock/pull/1698 To give just one sample, we now see a failure stacktrace such as this: ``` java.lang.IllegalStateException: Endpoint is not connected at org.apache.hc.core5.util.Asserts.check(Asserts.java:38) at org.apache.hc.client5.http.impl.io.PoolingHttpClientConnectionManager$InternalConnectionEndpoint.getValidatedPoolEntry(PoolingHttpClientConnectionManager.java:637) at org.apache.hc.client5.http.impl.io.PoolingHttpClientConnectionManager.upgrade(PoolingHttpClientConnectionManager.java:454) at org.apache.hc.client5.http.impl.classic.InternalExecRuntime.upgradeTls(InternalExecRuntime.java:190) at org.apache.hc.client5.http.impl.classic.ConnectExec.execute(ConnectExec.java:172) at org.apache.hc.client5.http.impl.classic.ExecChainElement.execute(ExecChainElement.java:51) at org.apache.hc.client5.http.impl.classic.ProtocolExec.execute(ProtocolExec.java:197) at org.apache.hc.client5.http.impl.classic.ExecChainElement.execute(ExecChainElement.java:51) at org.apache.hc.client5.http.impl.classic.InternalHttpClient.doExecute(InternalHttpClient.java:170) at org.apache.hc.client5.http.impl.classic.CloseableHttpClient.execute(CloseableHttpClient.java:75) at org.apache.hc.client5.http.impl.classic.CloseableHttpClient.execute(CloseableHttpClient.java:89) at com.github.tomakehurst.wiremock.junit5.JUnitJupiterExtensionJvmProxyNonStaticProgrammaticTest.getContent(JUnitJupiterExtensionJvmProxyNonStaticProgrammaticTest.java:67) at com.github.tomakehurst.wiremock.junit5.JUnitJupiterExtensionJvmProxyNonStaticProgrammaticTest.configures_jvm_proxy_and_enables_browser_proxying_https(JUnitJupiterExtensionJvmProxyNonStaticProgrammaticTest.java:63) ``` That test basically calls this class to set the System proxy properties: [https://github.com/wiremock/wiremock/blob/master/src/main/java/com/github/tomakehurst/wiremock/http/JvmProxyConfigurer.java#L48] For HTTP that still works fine, for HTTPS it now fails. There were
[jira] [Created] (HTTPCLIENT-2187) Classic proxy handling for HTTPS seems broken as of 5.1.1+
Tim te Beek created HTTPCLIENT-2187: --- Summary: Classic proxy handling for HTTPS seems broken as of 5.1.1+ Key: HTTPCLIENT-2187 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-2187 Project: HttpComponents HttpClient Issue Type: Bug Components: HttpClient (classic) Affects Versions: 5.2-alpha1, 5.1.2, 5.1.1 Reporter: Tim te Beek Classic proxy handling for HTTPS seems to have broken as of 5.1.1+, as seen here: https://github.com/wiremock/wiremock/pull/1698 To give just one sample, we now see a failure stacktrace such as this: ``` java.lang.IllegalStateException: Endpoint is not connected at org.apache.hc.core5.util.Asserts.check(Asserts.java:38) at org.apache.hc.client5.http.impl.io.PoolingHttpClientConnectionManager$InternalConnectionEndpoint.getValidatedPoolEntry(PoolingHttpClientConnectionManager.java:637) at org.apache.hc.client5.http.impl.io.PoolingHttpClientConnectionManager.upgrade(PoolingHttpClientConnectionManager.java:454) at org.apache.hc.client5.http.impl.classic.InternalExecRuntime.upgradeTls(InternalExecRuntime.java:190) at org.apache.hc.client5.http.impl.classic.ConnectExec.execute(ConnectExec.java:172) at org.apache.hc.client5.http.impl.classic.ExecChainElement.execute(ExecChainElement.java:51) at org.apache.hc.client5.http.impl.classic.ProtocolExec.execute(ProtocolExec.java:197) at org.apache.hc.client5.http.impl.classic.ExecChainElement.execute(ExecChainElement.java:51) at org.apache.hc.client5.http.impl.classic.InternalHttpClient.doExecute(InternalHttpClient.java:170) at org.apache.hc.client5.http.impl.classic.CloseableHttpClient.execute(CloseableHttpClient.java:75) at org.apache.hc.client5.http.impl.classic.CloseableHttpClient.execute(CloseableHttpClient.java:89) at com.github.tomakehurst.wiremock.junit5.JUnitJupiterExtensionJvmProxyNonStaticProgrammaticTest.getContent(JUnitJupiterExtensionJvmProxyNonStaticProgrammaticTest.java:67) at com.github.tomakehurst.wiremock.junit5.JUnitJupiterExtensionJvmProxyNonStaticProgrammaticTest.configures_jvm_proxy_and_enables_browser_proxying_https(JUnitJupiterExtensionJvmProxyNonStaticProgrammaticTest.java:63) ``` That test basically calls this class to set the System proxy properties: [https://github.com/wiremock/wiremock/blob/master/src/main/java/com/github/tomakehurst/wiremock/http/JvmProxyConfigurer.java#L48] For HTTP that still works fine, for HTTPS it now fails. There were some recent changes in 5.1.1 related to proxy handling & keep alive for async: [https://issues.apache.org/jira/projects/HTTPCLIENT/issues/HTTPCLIENT-2177] [https://github.com/apache/httpcomponents-client/compare/50f93ec18be8d6f49138825356051c4c0b60dce4...90f69c87b27b721ea8f0e23bdb4baf92bd7cde06] However, we're using classic still, and seeing the error above, so not sure it's related. Could anyone look into why we are now having these issues with only a patch version bump? -- This message was sent by Atlassian Jira (v8.20.1#820001) - To unsubscribe, e-mail: dev-unsubscr...@hc.apache.org For additional commands, e-mail: dev-h...@hc.apache.org