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

ASF GitHub Bot commented on MRESOLVER-584:
------------------------------------------

cstamas commented on PR #532:
URL: https://github.com/apache/maven-resolver/pull/532#issuecomment-2226852534

   This fix is wrong.
   
   Tested using reproducer https://issues.apache.org/jira/browse/MNG-8145 
(reused same config and all).
   Maven 4.0.0-beta-3 fails (reproducer reproduces). And this PR built JDK 
transport works OK.
   
   BUT, the reason why it works is due this PR "shortening" the lifespan of JDK 
HttpClient, and not due "client swap".
   
   When I set nginx config from original `keepalive_requests 500;` to 
`keepalive_requests 100;` (or even 50), this PR fails in very same way.
   
   Still, the PR is correct in a way it keeps HttpClient per Transporter 
instance, and that is _correct change_.
   
   Will see in some other solution...




> 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
>            Assignee: Tamas Cservenak
>            Priority: Major
>             Fix For: 2.0.1
>
>         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)

Reply via email to