Intermittent Maven build errors - Could not resolve dependencies / Could not transfer artifact
See original GitHub issueWe’re occasionally getting build errors that look like this:
[ERROR] Failed to execute goal on project buildtools: Could not resolve dependencies for project org.apache.pulsar:buildtools:jar:2.6.0-SNAPSHOT: Could not transfer artifact org.apache-extras.beanshell:bsh:jar:2.0b6 from/to central (https://repo.maven.apache.org/maven2): Transfer failed for https://repo.maven.apache.org/maven2/org/apache-extras/beanshell/bsh/2.0b6/bsh-2.0b6.jar 503 between bytes timeout -> [Help 1]
[ERROR] Failed to execute goal on project pulsar-presto-distribution: Could not resolve dependencies for project org.apache.pulsar:pulsar-presto-distribution:jar:2.6.0-SNAPSHOT: Could not transfer artifact org.eclipse.jetty:jetty-io:jar:9.4.11.v20180605 from/to central (https://repo.maven.apache.org/maven2): Failed to transfer file https://repo.maven.apache.org/maven2/org/eclipse/jetty/jetty-io/9.4.11.v20180605/jetty-io-9.4.11.v20180605.jar with status code 500 -> [Help 1]
Here’s a third case (with an image of where it appeared):
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:19 (17 by maintainers)
I seems that the solution introduced in #8386 doesn’t fix all “Connection reset” issues. The recommendation seems to be to disable the connection pooling completely with
-Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false
options instead of configuring the pool TTL and retry counts.Here’s a recent failure:
another similar failure.
I now found https://issues.apache.org/jira/browse/WAGON-545 which is a close match to this issue. In the last comment, it says “Azure users shall set the TTL to 240 seconds or less.”