[
https://issues.apache.org/jira/browse/MRESOLVER-584?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17865471#comment-17865471
]
ASF GitHub Bot commented on MRESOLVER-584:
------------------------------------------
cstamas commented on PR #532:
URL: https://github.com/apache/maven-resolver/pull/532#issuecomment-2225559285
I have a feeling that "swapping" will not even happen. What _actually
happened_ in this PR is that HttpClient go _much shorter lifespan_. Originally,
HttpClient was kept and reused (for same session+repository) across whole
session. Now, the client shares lifecycle with Transport instance, that is OTOH
created by connector per invocation.
> Jetty / JDK transport: HTTP2 GOAWAY handling
> ---------------------------------------------
>
> Key: MRESOLVER-584
> URL: https://issues.apache.org/jira/browse/MRESOLVER-584
> Project: Maven Resolver
> Issue Type: Bug
> Components: Resolver
> Affects Versions: 2.0.0-alpha-2, 2.0.0-alpha-3, 2.0.0-alpha-4,
> 2.0.0-alpha-5, 2.0.0-alpha-6, 2.0.0-alpha-7, 2.0.0-alpha-8, 2.0.0,
> 2.0.0-alpha-9, 2.0.0-alpha-10, 2.0.0-alpha-11
> Reporter: Paul Scholz
> Priority: Major
> Attachments: exception.log, exception_jetty.log
>
>
> I am encountering a problem with the implementation of JDK transport using
> HTTP/2, specifically related to re-establishing connections after receiving a
> GOAWAY frame. (RFC quote below)
> Just for example a nginx server with default configuration does only allow
> 1000 requests per connection before requiring "establishing a new connection".
> This results in IOException, stopping resolution process: [^exception.log].
> {code:java}
> Caused by: java.io.IOException: /10.8.2.106:51760: GOAWAY received
> at jdk.internal.net.http.HttpClientImpl.send(HttpClientImpl.java:586)
> at jdk.internal.net.http.HttpClientFacade.send(HttpClientFacade.java:123)
> at
> org.eclipse.aether.transport.jdk.JdkTransporter.send(JdkTransporter.java:392)
> at
> org.eclipse.aether.transport.jdk.JdkTransporter.implGet(JdkTransporter.java:271)
> at
> org.eclipse.aether.spi.connector.transport.AbstractTransporter.get(AbstractTransporter.java:64)
> at
> org.eclipse.aether.connector.basic.BasicRepositoryConnector$GetTaskRunner.runTask(BasicRepositoryConnector.java:501)
> at
> org.eclipse.aether.connector.basic.BasicRepositoryConnector$TaskRunner.run(BasicRepositoryConnector.java:433)
> at
> org.eclipse.aether.util.concurrency.RunnableErrorForwarder.lambda$wrap$0(RunnableErrorForwarder.java:66)
> at
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
> at java.lang.Thread.run(Thread.java:840)
> Caused by: java.io.IOException: /10.8.2.106:51760: GOAWAY received
> at
> jdk.internal.net.http.Http2Connection.handleGoAway(Http2Connection.java:1009)
> at
> jdk.internal.net.http.Http2Connection.handleConnectionFrame(Http2Connection.java:874)
> at
> jdk.internal.net.http.Http2Connection.processFrame(Http2Connection.java:749)
> ...
> {code}
> Related to: [How to handle HTTP/2 GOAWAY with
> java.net.HttpClient?|https://stackoverflow.com/a/55092354]
>
> {quote}Sets the maximum number of requests (...) that can be served through
> one HTTP/2 connection, after which the next client request will lead to
> connection closing and the need of establishing a new connection.
> --
> [https://nginx.org/en/docs/http/ngx_http_v2_module.html#http2_max_requests|http://nginx.org/en/docs/http/ngx_http_v2_module.html#http2_max_requests]
> [–
> https://nginx.org/en/docs/http/ngx_http_core_module.html#keepalive_requests|https://nginx.org/en/docs/http/ngx_http_core_module.html#keepalive_requests]
> {quote}
>
> {quote}Once sent, the sender will ignore frames sent on streams initiated by
> the receiver if the stream has an identifier higher than the included last
> stream identifier. Receivers of a GOAWAY frame MUST NOT open additional
> streams on the connection, although a new connection can be established for
> new streams.
> – [RFC 7540 6.7|https://datatracker.ietf.org/doc/html/rfc7540#section-6.8]
> {quote}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)