Hi Tamás,

> So IMHO there is NO (and I see no) difference between 1 or more checksum 
> algorithm used, unless you have some more information or some conditions you 
> did not mention...

This is a latency sensitive bug. Lots of irrelevant things affected how the 
problem appeared for different re-producers. There was a whole thing about 
TLS1.2 vs TLS1.3, that seems just to of been about overhead timing. I'm glad to 
have determined that the number of checksum algorithms is also not 
fundamentally connected.

Thank you
Jacob

-----Original Message-----
From: Tamás Cservenák <[email protected]> 
Sent: Tuesday, May 23, 2023 3:45 PM
To: Maven Developers List <[email protected]>
Cc: [email protected]
Subject: RE: Unreliable TCP and retries for maven publish

Jacob,

in this stack it is not checksum transport that failed but maven metadata 
(maven-metadata.xml upload), while the server error is same as before
(org.apache.http.NoHttpResponseException: ...:443 failed to respond). So IMHO 
there is NO (and I see no) difference between 1 or more checksum algorithm 
used, unless you have some more information or some conditions you did not 
mention...

Simply put, metadata upload as I see CANNOT make build fail, only the "main 
payload" can do it:
These methods whatever is thrown, just warn/log and cleanly return, they are 
not affecting the exec flow:
https://github.com/apache/maven-resolver/blob/maven-resolver-1.9.10/maven-resolver-connector-basic/src/main/java/org/eclipse/aether/connector/basic/BasicRepositoryConnector.java#L603-L612

Build fails ONLY when "main payload" fails, and in this case, the problem was 
the same, and would be gone if HTTP client would rety, that should be handled 
by the PR by use of "standard" (unsure what "default" is then) retry handler.

Thanks
T

On Tue, May 23, 2023 at 8:55 PM Finkelman, Jacob <[email protected]> 
wrote:

> Hi Tamás,
>
> Thank you for opening the JIRA ticket and PR. Here is a lightly edited 
> logs from a build that got BUILD FAILURE
>
> ```
> [INFO] Error stacktraces are turned on.
> [INFO] Scanning for projects...
> [WARNING]
> [WARNING] Some problems were encountered while building the effective 
> model for ...:task-consumer:jar:1.72.23-SNAPSHOT
> [WARNING] 'dependencies.dependency.(groupId:artifactId:type:classifier)'
> must be unique: ...
> [WARNING] 'dependencies.dependency.(groupId:artifactId:type:classifier)'
> must be unique: ...
> [WARNING] 'dependencies.dependency.(groupId:artifactId:type:classifier)'
> must be unique: ...
> [WARNING]
> [WARNING] It is highly recommended to fix these problems because they 
> threaten the stability of your build.
> [WARNING]
> [WARNING] For this reason, future Maven versions might no longer 
> support building such malformed projects.
> [WARNING]
> [INFO]
> ----------------------------------------------------------------------
> -- [INFO] Detecting the operating system and CPU architecture [INFO]
> ----------------------------------------------------------------------
> --
> [INFO] os.detected.name: linux
> [INFO] os.detected.arch: x86_64
> [INFO] os.detected.version: 5.15
> [INFO] os.detected.version.major: 5
> [INFO] os.detected.version.minor: 15
> [INFO] os.detected.release: ubuntu
> [INFO] os.detected.release.version: 22.04 [INFO] 
> os.detected.release.like.ubuntu: true [INFO] 
> os.detected.release.like.debian: true [INFO] os.detected.classifier: 
> linux-x86_64 [INFO]
> ----------------------------------------------------------------------
> --
> [INFO] Reactor Build Order:
> [INFO]
> [INFO] my-project                               [pom]
> [INFO] backfill-commons
>  [jar]
> [INFO] task-consumer
> [jar]
> [INFO] task-producer
> [jar]
> [INFO]
> [INFO] --< ...:my-project >--
> [INFO] Building my-project 1.72.23-SNAPSHOT     [1/4]
> [INFO]   from pom.xml
> [INFO] --------------------------------[ pom
> ]---------------------------------
> [INFO]
> [INFO] --- ...:0.8.9:prepare-agent (...-initialize) @ my-project --- 
> [INFO] argLine set to 
> -javaagent:/home/circleci/.m2/repository/org/.../0.8.9/...-0.8.9-runtime.jar=destfile=/home/circleci/project/target/...
> [INFO]
> [INFO] --- ...:0.8.9:report (...-site) @ my-project --- [INFO] 
> Skipping ... execution due to missing execution data file.
> [INFO]
> [INFO] --- install:3.0.1:install (default-install) @ my-project --- 
> [INFO] Installing /home/circleci/project/pom.xml to 
> /home/circleci/.m2/repository/com/.../my-project/1.72.23-SNAPSHOT/my-p
> roject-1.72.23-SNAPSHOT.pom
> [INFO]
> [INFO] --- deploy:3.0.0:deploy (default-deploy) @ my-project --- 
> Downloading from codeartifact-snapshot: https:// 
> .../maven/snapshots/com/.../my-project/1.72.23-SNAPSHOT/maven-metadata
> .xml Downloaded from codeartifact-snapshot: 
> https://.../maven/snapshots/com/.../my-project/1.72.23-SNAPSHOT/maven-
> metadata.xml
> (625 B at 1.2 kB/s)
> Uploading to codeartifact-snapshot: https:// 
> .../maven/snapshots/com/.../my-project/1.72.23-SNAPSHOT/my-project-1.7
> 2.23-20230508.201317-10.pom Uploaded to codeartifact-snapshot: 
> https://.../maven/snapshots/com/.../my-project/1.72.23-SNAPSHOT/my-pro
> ject-1.72.23-20230508.201317-10.pom
> (6.6 kB at 18 kB/s)
> Downloading from codeartifact-snapshot: https:// 
> .../maven/snapshots/com/.../my-project/maven-metadata.xml
> Downloaded from codeartifact-snapshot: 
> https://.../maven/snapshots/com/.../my-project/maven-metadata.xml
> (741 B at 3.6 kB/s)
> Uploading to codeartifact-snapshot: https:// 
> .../maven/snapshots/com/.../my-project/1.72.23-SNAPSHOT/maven-metadata
> .xml Uploaded to codeartifact-snapshot: 
> https://.../maven/snapshots/com/.../my-project/1.72.23-SNAPSHOT/maven-
> metadata.xml
> (648 B at 1.8 kB/s)
> Uploading to codeartifact-snapshot: https:// 
> .../maven/snapshots/com/.../my-project/maven-metadata.xml
> [INFO]
> ----------------------------------------------------------------------
> -- [INFO] Reactor Summary for my-project 1.72.23-SNAPSHOT:
> [INFO]
> [INFO] my-project ............... FAILURE [  1.853 s] [INFO] 
> backfill-commons ................................... SKIPPED [INFO] 
> task-consumer ...................................... SKIPPED [INFO] 
> task-producer ...................................... SKIPPED [INFO]
> ----------------------------------------------------------------------
> --
> [INFO] BUILD FAILURE
> [INFO]
> ----------------------------------------------------------------------
> --
> [INFO] Total time:  2.346 s
> [INFO] Finished at: 2023-05-08T20:13:19Z [INFO]
> ----------------------------------------------------------------------
> --
> [ERROR] Failed to execute goal
> org.apache.maven.plugins:maven-deploy-plugin:3.0.0:deploy 
> (default-deploy) on project my-project: Failed to deploy metadata: 
> Could not transfer metadata ...:my-project/maven-metadata.xml from/to 
> codeartifact-snapshot
> (https://.../maven/snapshots/): ...:443 failed to respond -> [Help 1]
> org.apache.maven.lifecycle.LifecycleExecutionException: Failed to 
> execute goal org.apache.maven.plugins:maven-deploy-plugin:3.0.0:deploy
> (default-deploy) on project my-project: Failed to deploy metadata: 
> Could not transfer metadata ...:my-project/maven-metadata.xml from/to 
> codeartifact-snapshot (https://.../maven/snapshots/): ...:443 failed 
> to respond
>     at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2
> (MojoExecutor.java:347)
>     at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute
> (MojoExecutor.java:330)
>     at org.apache.maven.lifecycle.internal.MojoExecutor.execute
> (MojoExecutor.java:213)
>     at org.apache.maven.lifecycle.internal.MojoExecutor.execute
> (MojoExecutor.java:175)
>     at org.apache.maven.lifecycle.internal.MojoExecutor.access$000
> (MojoExecutor.java:76)
>     at org.apache.maven.lifecycle.internal.MojoExecutor$1.run
> (MojoExecutor.java:163)
>     at org.apache.maven.plugin.DefaultMojosExecutionStrategy.execute
> (DefaultMojosExecutionStrategy.java:39)
>     at org.apache.maven.lifecycle.internal.MojoExecutor.execute
> (MojoExecutor.java:160)
>     at
> org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProjec
> t
> (LifecycleModuleBuilder.java:105)
>     at
> org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProjec
> t
> (LifecycleModuleBuilder.java:73)
>     at
> org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThrea
> dedBuilder.build
> (SingleThreadedBuilder.java:53)
>     at org.apache.maven.lifecycle.internal.LifecycleStarter.execute
> (LifecycleStarter.java:118)
>     at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:261)
>     at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:173)
>     at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:101)
>     at org.apache.maven.cli.MavenCli.execute (MavenCli.java:827)
>     at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:272)
>     at org.apache.maven.cli.MavenCli.main (MavenCli.java:195)
>     at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native
> Method)
>     at jdk.internal.reflect.NativeMethodAccessorImpl.invoke
> (NativeMethodAccessorImpl.java:77)
>     at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke
> (DelegatingMethodAccessorImpl.java:43)
>     at java.lang.reflect.Method.invoke (Method.java:568)
>     at 
> org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced
> (Launcher.java:282)
>     at org.codehaus.plexus.classworlds.launcher.Launcher.launch
> (Launcher.java:225)
>     at 
> org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode
> (Launcher.java:406)
>     at org.codehaus.plexus.classworlds.launcher.Launcher.main
> (Launcher.java:347)
> Caused by: org.apache.maven.plugin.MojoExecutionException: Failed to 
> deploy metadata: Could not transfer metadata 
> ...:my-project/maven-metadata.xml from/to codeartifact-snapshot 
> (https://.../maven/snapshots/):
> ...:443 failed to respond
>     at org.apache.maven.plugins.deploy.AbstractDeployMojo.deploy
> (AbstractDeployMojo.java:175)
>     at org.apache.maven.plugins.deploy.DeployMojo.execute
> (DeployMojo.java:194)
>     at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo
> (DefaultBuildPluginManager.java:126)
>     at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2
> (MojoExecutor.java:342)
>     at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute
> (MojoExecutor.java:330)
>     at org.apache.maven.lifecycle.internal.MojoExecutor.execute
> (MojoExecutor.java:213)
>     at org.apache.maven.lifecycle.internal.MojoExecutor.execute
> (MojoExecutor.java:175)
>     at org.apache.maven.lifecycle.internal.MojoExecutor.access$000
> (MojoExecutor.java:76)
>     at org.apache.maven.lifecycle.internal.MojoExecutor$1.run
> (MojoExecutor.java:163)
>     at org.apache.maven.plugin.DefaultMojosExecutionStrategy.execute
> (DefaultMojosExecutionStrategy.java:39)
>     at org.apache.maven.lifecycle.internal.MojoExecutor.execute
> (MojoExecutor.java:160)
>     at
> org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProjec
> t
> (LifecycleModuleBuilder.java:105)
>     at
> org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProjec
> t
> (LifecycleModuleBuilder.java:73)
>     at
> org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThrea
> dedBuilder.build
> (SingleThreadedBuilder.java:53)
>     at org.apache.maven.lifecycle.internal.LifecycleStarter.execute
> (LifecycleStarter.java:118)
>     at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:261)
>     at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:173)
>     at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:101)
>     at org.apache.maven.cli.MavenCli.execute (MavenCli.java:827)
>     at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:272)
>     at org.apache.maven.cli.MavenCli.main (MavenCli.java:195)
>     at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native
> Method)
>     at jdk.internal.reflect.NativeMethodAccessorImpl.invoke
> (NativeMethodAccessorImpl.java:77)
>     at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke
> (DelegatingMethodAccessorImpl.java:43)
>     at java.lang.reflect.Method.invoke (Method.java:568)
>     at 
> org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced
> (Launcher.java:282)
>     at org.codehaus.plexus.classworlds.launcher.Launcher.launch
> (Launcher.java:225)
>     at 
> org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode
> (Launcher.java:406)
>     at org.codehaus.plexus.classworlds.launcher.Launcher.main
> (Launcher.java:347)
> Caused by: org.eclipse.aether.deployment.DeploymentException: Failed 
> to deploy metadata: Could not transfer metadata 
> ...:my-project/maven-metadata.xml from/to codeartifact-snapshot 
> (https://.../maven/snapshots/):
> ...:443 failed to respond
>     at org.eclipse.aether.internal.impl.DefaultDeployer.deploy
> (DefaultDeployer.java:305)
>     at org.eclipse.aether.internal.impl.DefaultDeployer.deploy
> (DefaultDeployer.java:201)
>     at org.eclipse.aether.internal.impl.DefaultRepositorySystem.deploy
> (DefaultRepositorySystem.java:392)
>     at org.apache.maven.plugins.deploy.AbstractDeployMojo.deploy
> (AbstractDeployMojo.java:156)
>     at org.apache.maven.plugins.deploy.DeployMojo.execute
> (DeployMojo.java:194)
>     at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo
> (DefaultBuildPluginManager.java:126)
>     at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2
> (MojoExecutor.java:342)
>     at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute
> (MojoExecutor.java:330)
>     at org.apache.maven.lifecycle.internal.MojoExecutor.execute
> (MojoExecutor.java:213)
>     at org.apache.maven.lifecycle.internal.MojoExecutor.execute
> (MojoExecutor.java:175)
>     at org.apache.maven.lifecycle.internal.MojoExecutor.access$000
> (MojoExecutor.java:76)
>     at org.apache.maven.lifecycle.internal.MojoExecutor$1.run
> (MojoExecutor.java:163)
>     at org.apache.maven.plugin.DefaultMojosExecutionStrategy.execute
> (DefaultMojosExecutionStrategy.java:39)
>     at org.apache.maven.lifecycle.internal.MojoExecutor.execute
> (MojoExecutor.java:160)
>     at
> org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProjec
> t
> (LifecycleModuleBuilder.java:105)
>     at
> org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProjec
> t
> (LifecycleModuleBuilder.java:73)
>     at
> org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThrea
> dedBuilder.build
> (SingleThreadedBuilder.java:53)
>     at org.apache.maven.lifecycle.internal.LifecycleStarter.execute
> (LifecycleStarter.java:118)
>     at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:261)
>     at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:173)
>     at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:101)
>     at org.apache.maven.cli.MavenCli.execute (MavenCli.java:827)
>     at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:272)
>     at org.apache.maven.cli.MavenCli.main (MavenCli.java:195)
>     at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native
> Method)
>     at jdk.internal.reflect.NativeMethodAccessorImpl.invoke
> (NativeMethodAccessorImpl.java:77)
>     at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke
> (DelegatingMethodAccessorImpl.java:43)
>     at java.lang.reflect.Method.invoke (Method.java:568)
>     at 
> org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced
> (Launcher.java:282)
>     at org.codehaus.plexus.classworlds.launcher.Launcher.launch
> (Launcher.java:225)
>     at 
> org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode
> (Launcher.java:406)
>     at org.codehaus.plexus.classworlds.launcher.Launcher.main
> (Launcher.java:347)
> Caused by: org.eclipse.aether.transfer.MetadataTransferException: 
> Could not transfer metadata ...:my-project/maven-metadata.xml from/to 
> codeartifact-snapshot (https://.../maven/snapshots/): ...:443 failed 
> to respond
>     at
> org.eclipse.aether.connector.basic.MetadataTransportListener.transferF
> ailed
> (MetadataTransportListener.java:44)
>     at
> org.eclipse.aether.connector.basic.BasicRepositoryConnector$TaskRunner
> .run
> (BasicRepositoryConnector.java:417)
>     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:833) Caused by: 
> org.apache.http.NoHttpResponseException: ...:443 failed to respond
>     at org.apache.http.impl.conn.DefaultHttpResponseParser.parseHead
> (DefaultHttpResponseParser.java:141)
>     at org.apache.http.impl.conn.DefaultHttpResponseParser.parseHead
> (DefaultHttpResponseParser.java:56)
>     at org.apache.http.impl.io.AbstractMessageParser.parse
> (AbstractMessageParser.java:259)
>     at
> org.apache.http.impl.DefaultBHttpClientConnection.receiveResponseHeade
> r
> (DefaultBHttpClientConnection.java:163)
>     at org.apache.http.impl.conn.CPoolProxy.receiveResponseHeader
> (CPoolProxy.java:157)
>     at org.apache.http.protocol.HttpRequestExecutor.doReceiveResponse
> (HttpRequestExecutor.java:273)
>     at org.apache.http.protocol.HttpRequestExecutor.execute
> (HttpRequestExecutor.java:125)
>     at org.apache.http.impl.execchain.MainClientExec.execute
> (MainClientExec.java:272)
>     at org.apache.http.impl.execchain.ProtocolExec.execute
> (ProtocolExec.java:186)
>     at org.apache.http.impl.execchain.RetryExec.execute (RetryExec.java:89)
>     at org.apache.http.impl.execchain.RedirectExec.execute
> (RedirectExec.java:110)
>     at org.apache.http.impl.client.InternalHttpClient.doExecute
> (InternalHttpClient.java:185)
>     at org.apache.http.impl.client.CloseableHttpClient.execute
> (CloseableHttpClient.java:72)
>     at org.eclipse.aether.transport.http.HttpTransporter.execute
> (HttpTransporter.java:369)
>     at org.eclipse.aether.transport.http.HttpTransporter.implPut
> (HttpTransporter.java:353)
>     at 
> org.eclipse.aether.spi.connector.transport.AbstractTransporter.put
> (AbstractTransporter.java:106)
>     at
> org.eclipse.aether.connector.basic.BasicRepositoryConnector$PutTaskRun
> ner.runTask
> (BasicRepositoryConnector.java:564)
>     at
> org.eclipse.aether.connector.basic.BasicRepositoryConnector$TaskRunner
> .run
> (BasicRepositoryConnector.java:414)
>     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:833) [ERROR] [ERROR] Re-run 
> Maven using the -X switch to enable full debug logging.
> [ERROR]
> [ERROR] For more information about the errors and possible solutions, 
> please read the following articles:
> [ERROR] [Help 1]
> http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionExceptio
> n
> ```
>
> -----Original Message-----
> From: Tamás Cservenák <[email protected]>
> Sent: Tuesday, May 23, 2023 5:36 AM
> To: [email protected]
> Cc: [email protected]
> Subject: RE: Unreliable TCP and retries for maven publish
>
> Jacob,
>
> Could you show a stack how build fails when there is only 1 checksum 
> in play? (the -Daether.checksums.algorithms=MD5 case).
>
>
> Thanks
> T
>
> On Fri, May 19, 2023 at 11:27 PM Finkelman, Jacob 
> <[email protected]> wrote:
>
> > During a maven publish if the server closes the TCP connection after 
> > the upload of an asset sometimes the publish will fail with a failed 
> > to respond while attempting to upload the checksum. The correct 
> > behavior to wanting to send more HTTP requests on a closed TCP 
> > connection, is to open a new TCP connection. If the client and 
> > server have a low latency connection, say in the same data center, 
> > when the connection is closed a new one appears to reliably be 
> > opened. During higher latency scenarios, in our case when the client 
> > and server are on different continents, maven attempts to reuse the 
> > connection that the server has already closed receiving a failed to 
> > respond error about half the time. On even slower connections we get 
> > a Connection or
> outbound has closed error.
> >
> > Unfortunately, this connection does not get retried. It immediately 
> > fails to build no matter how many retries are configured. I believe 
> > this is the known https://issues.apache.org/jira/browse/MDEPLOY-162 
> > If these requests were retried on this error, I suspect the entire 
> > situation would not have been a problem. The lack of retries go 
> > through different code paths depending on the transport implementation.
> >
> > The wagon transport fails with
> >
> org.apache.maven.wagon.providers.http.httpclient.client.NonRepeatableRequestException:
> > Cannot retry request with a non-repeatable request entity. Fixing 
> > the wagon transport requires changes in maven-wagon and in maven-resolver.
> > In particular the WagonHttpEntity needs to use a stream supplier in 
> > order to be retryable. My colleague sketched out these changes a 
> > year ago. See 
> > https://github.com/mmarston/maven-wagon/commit/4419140ff7794a548f3f9
> > cb
> > 9e320fcd20420b5e0
> > and
> > https://github.com/mmarston/maven-resolver/commit/cf00080ac546bda588
> > bd
> > 86a44f93c037f7638145
> >
> > The native transport does not have this limitation because when 
> > uploading checksums it uses a PutTaskEntity that is retryable 
> > because the PutTask that it wraps around is essentially a stream supplier.
> > Here<
> https://github.com/apache/maven-resolver/blob/89dadad860dc802fd328f2c7
> a29e7285b599ecde/maven-resolver-transport-http/src/main/java/org/eclip
> se/aether/transport/http/HttpTransporter.java#L635
> >.
> > For the native transport my colleagues think the issue is that it 
> >only  supports retry when the client detects the closed connection 
> >before or  while sending the request. But if the client sends the 
> >request and  then detects the closed connection while trying to read 
> >the response,  then it won't retry. In particular the native 
> >transport uses  DefaultHttpRequestRetryHandler with 
> >requestSentRetryEnabled set to  false (see here<
> >
> https://github.com/apache/maven-resolver/blob/d0f8564846863c8a88f2fb1d
> a8391fc860517192/maven-resolver-transport-http/src/main/java/org/eclip
> se/aether/transport/http/HttpTransporter.java#L239
> >).
> > One way to fix the native transport is to change  
> >requestSentRetryEnabled to true when constructing  
> >DefaultHttpRequestRetryHandler. Another option is to use  
> >StandardHttpRequestRetryHandler instead because it treats PUT 
> >requests  as idempotent so will retry a PUT request even when
> requestSentRetryEnabled is false.
> >
> > Oddly, if only one checksum algorithm is selected by using
> > -Daether.checksums.algorithms=MD5 then the entire build fails on 
> > this error but if two or more algorithms are selected
> > -Daether.checksums.algorithms=MD5,SHA-1 each checksum throws a 
> > warning but the overall build succeeds. It seems odd that the 
> > behavior is inconsistent here. I would expect it either to always 
> > throw a warning if a requested checksum failed upload, or to always 
> > fail the build if any checksum failed upload. The behavior with 
> > multiple checksums requested makes it clear that this failed to 
> > respond error can be caught
> by mvn.
> >
> > Using -Daether.connector.http.reuseConnections=false makes this 
> > error go away, because maven never tries sending data over an 
> > existing TCP connection.
> >
> > I am new to the maven dev community and was not sure what the best 
> > practice was for reporting these kinds of issues. Starting a 
> > conversation on the mailing list seems like a good place to start.
> > What should happen next? Which of these issues deserve tickets? What 
> > more information should I provide and where? What PRs would be
> appreciated to help fix the issues?
> >
> > A stack trace from running "mvn deploy" with Apache Maven 3.9.2
> > (c9616018c7a021c1c39be70fb2843d6f5f9b8a1c)
> >
> > org.apache.http.NoHttpResponseException: ...:443 failed to respond
> >     at org.apache.http.impl.conn.DefaultHttpResponseParser.parseHead
> > (DefaultHttpResponseParser.java:141)
> >     at org.apache.http.impl.conn.DefaultHttpResponseParser.parseHead
> > (DefaultHttpResponseParser.java:56)
> >     at org.apache.http.impl.io.AbstractMessageParser.parse
> > (AbstractMessageParser.java:259)
> >     at
> > org.apache.http.impl.DefaultBHttpClientConnection.receiveResponseHea
> > de
> > r
> > (DefaultBHttpClientConnection.java:163)
> >     at org.apache.http.impl.conn.CPoolProxy.receiveResponseHeader
> > (CPoolProxy.java:157)
> >     at 
> > org.apache.http.protocol.HttpRequestExecutor.doReceiveResponse
> > (HttpRequestExecutor.java:273)
> >     at org.apache.http.protocol.HttpRequestExecutor.execute
> > (HttpRequestExecutor.java:125)
> >     at org.apache.http.impl.execchain.MainClientExec.execute
> > (MainClientExec.java:272)
> >     at org.apache.http.impl.execchain.ProtocolExec.execute
> > (ProtocolExec.java:186)
> >     at org.apache.http.impl.execchain.RetryExec.execute
> (RetryExec.java:89)
> >     at org.apache.http.impl.execchain.RedirectExec.execute
> > (RedirectExec.java:110)
> >     at org.apache.http.impl.client.InternalHttpClient.doExecute
> > (InternalHttpClient.java:185)
> >     at org.apache.http.impl.client.CloseableHttpClient.execute
> > (CloseableHttpClient.java:72)
> >     at org.eclipse.aether.transport.http.HttpTransporter.execute
> > (HttpTransporter.java:393)
> >     at org.eclipse.aether.transport.http.HttpTransporter.implPut
> > (HttpTransporter.java:377)
> >     at
> > org.eclipse.aether.spi.connector.transport.AbstractTransporter.put
> > (AbstractTransporter.java:107)
> >     at
> > org.eclipse.aether.connector.basic.BasicRepositoryConnector$PutTaskR
> > un
> > ner.uploadChecksum
> > (BasicRepositoryConnector.java:608)
> >     at
> >
> org.eclipse.aether.connector.basic.BasicRepositoryConnector$PutTaskRun
> ner.uploadChecksums
> > (BasicRepositoryConnector.java:591)    at
> > org.eclipse.aether.connector.basic.BasicRepositoryConnector$PutTaskR
> > un
> > ner.runTask
> > (BasicRepositoryConnector.java:565)
> >     at
> > org.eclipse.aether.connector.basic.BasicRepositoryConnector$TaskRunn
> > er
> > .run
> > (BasicRepositoryConnector.java:414)
> >     at 
> > org.eclipse.aether.connector.basic.BasicRepositoryConnector.put
> > (BasicRepositoryConnector.java:319)
> >     at org.eclipse.aether.internal.impl.DefaultDeployer.deploy
> > (DefaultDeployer.java:298)
> >     at org.eclipse.aether.internal.impl.DefaultDeployer.deploy
> > (DefaultDeployer.java:201)
> >     at 
> > org.eclipse.aether.internal.impl.DefaultRepositorySystem.deploy
> > (DefaultRepositorySystem.java:392)
> >     at org.apache.maven.plugins.deploy.AbstractDeployMojo.deploy
> > (AbstractDeployMojo.java:139)
> >     at org.apache.maven.plugins.deploy.DeployMojo.execute
> > (DeployMojo.java:191)
> >     at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo
> > (DefaultBuildPluginManager.java:126)
> >     at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2
> > (MojoExecutor.java:342)
> >     at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute
> > (MojoExecutor.java:330)
> >     at org.apache.maven.lifecycle.internal.MojoExecutor.execute
> > (MojoExecutor.java:213)
> >     at org.apache.maven.lifecycle.internal.MojoExecutor.execute
> > (MojoExecutor.java:175)
> >     at org.apache.maven.lifecycle.internal.MojoExecutor.access$000
> > (MojoExecutor.java:76)
> >     at org.apache.maven.lifecycle.internal.MojoExecutor$1.run
> > (MojoExecutor.java:163)
> >     at org.apache.maven.plugin.DefaultMojosExecutionStrategy.execute
> > (DefaultMojosExecutionStrategy.java:39)
> >     at org.apache.maven.lifecycle.internal.MojoExecutor.execute
> > (MojoExecutor.java:160)
> >     at
> > org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProj
> > ec
> > t
> > (LifecycleModuleBuilder.java:105)
> >     at
> > org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProj
> > ec
> > t
> > (LifecycleModuleBuilder.java:73)
> >     at
> > org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThr
> > ea
> > dedBuilder.build
> > (SingleThreadedBuilder.java:53)
> >     at org.apache.maven.lifecycle.internal.LifecycleStarter.execute
> > (LifecycleStarter.java:118)
> >     at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:261)
> >     at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:173)
> >     at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:101)
> >     at org.apache.maven.cli.MavenCli.execute (MavenCli.java:910)
> >     at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:283)
> >     at org.apache.maven.cli.MavenCli.main (MavenCli.java:206)
> >     at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native
> > Method)
> >     at jdk.internal.reflect.NativeMethodAccessorImpl.invoke
> > (NativeMethodAccessorImpl.java:62)
> >     at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke
> > (DelegatingMethodAccessorImpl.java:43)
> >     at java.lang.reflect.Method.invoke (Method.java:566)
> >     at
> > org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced
> > (Launcher.java:283)
> >     at org.codehaus.plexus.classworlds.launcher.Launcher.launch
> > (Launcher.java:226)
> >     at
> > org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode
> > (Launcher.java:407)
> >     at org.codehaus.plexus.classworlds.launcher.Launcher.main
> > (Launcher.java:348)
> >
> >
>

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

Reply via email to