You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Intermittent Maven build errors - Could not resolve dependencies / Could not transfer artifact #6231
We'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):
changed the title [-]Intermittent Maven build errors - Could not resolve dependencies[/-][+]Intermittent Maven build errors - Could not resolve dependencies / Could not transfer artifact[/+]on Feb 5, 2020
@aahmed-se Thanks for the information. This was also happening in Github CI though. Is there a place where the Maven version is set for building the project in the Github CI Actions?
@aahmed-se How do we fix the repo timeout? I got it again... [ERROR] Failed to execute goal net.alchim31.maven:scala-maven-plugin:4.0.1:add-source (default) on project flink: Execution default of goal net.alchim31.maven:scala-maven-plugin:4.0.1:add-source failed: Plugin net.alchim31.maven:scala-maven-plugin:4.0.1 or one of its dependencies could not be resolved: Could not transfer artifact org.apache.maven:maven-compat:jar:3.3.9 from/to central (https://repo.maven.apache.org/maven2): Failed to transfer file https://repo.maven.apache.org/maven2/org/apache/maven/maven-compat/3.3.9/maven-compat-3.3.9.jar with status code 500 -> [Help 1]
(https://github.com/apache/pulsar/pull/6202/checks?check_run_id=431040196)
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.19.1:test (default-test) on project buildtools: Execution default-test of goal org.apache.maven.plugins:maven-surefire-plugin:2.19.1:test failed: Plugin org.apache.maven.plugins:maven-surefire-plugin:2.19.1 or one of its dependencies could not be resolved: Could not transfer artifact org.apache.maven.surefire:maven-surefire-common:jar:2.19.1 from/to central (https://repo.maven.apache.org/maven2): Failed to transfer file https://repo.maven.apache.org/maven2/org/apache/maven/surefire/maven-surefire-common/2.19.1/maven-surefire-common-2.19.1.jar with status code 500 -> [Help 1]
(https://github.com/apache/pulsar/pull/6202/checks?check_run_id=432260374)
I ended up trying to use -Dmaven.wagon.httpconnectionManager.ttlSeconds=25 -Dmaven.wagon.http.retryHandler.count=3 in MAVEN_OPTS environment variable in the PR to fix this issue. Let's see if that's effective.
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.
Error: Plugin pl.project13.maven:git-commit-id-plugin:4.0.2 or one of its dependencies could not be resolved: Failed to read artifact descriptor for pl.project13.maven:git-commit-id-plugin:jar:4.0.2: Could not transfer artifact pl.project13.maven:git-commit-id-plugin:pom:4.0.2 from/to central (https://repo.maven.apache.org/maven2): Transfer failed for https://repo.maven.apache.org/maven2/pl/project13/maven/git-commit-id-plugin/4.0.2/git-commit-id-plugin-4.0.2.pom: Connection reset -> [Help 1]
Activity
[-]Intermittent Maven build errors - Could not resolve dependencies[/-][+]Intermittent Maven build errors - Could not resolve dependencies / Could not transfer artifact[/+]devinbost commentedon Feb 5, 2020
I wasn't sure if this should have been labeled as a bug or not since it's just showing up in the build tests.
aahmed-se commentedon Feb 5, 2020
@devinbost wha's your maven version ?
devinbost commentedon Feb 5, 2020
devinbost commentedon Feb 5, 2020
@aahmed-se
aahmed-se commentedon Feb 5, 2020
Try with should be using 3.6.1, believe versions after that have issues
devinbost commentedon Feb 5, 2020
@aahmed-se Thanks for the information. This was also happening in Github CI though. Is there a place where the Maven version is set for building the project in the Github CI Actions?
aahmed-se commentedon Feb 5, 2020
where is github ci do you see this ?
devinbost commentedon Feb 5, 2020
@aahmed-se Here's one example: https://github.com/apache/pulsar/pull/6202/checks?check_run_id=428218118
aahmed-se commentedon Feb 5, 2020
Here is the example for setting up maven to a specific vesion
pulsar/.github/workflows/ci-license.yaml
Line 43 in 4a2bceb
The error in your link is not related that's just a repo timeout.
devinbost commentedon Feb 7, 2020
@aahmed-se How do we fix the repo timeout? I got it again...
[ERROR] Failed to execute goal net.alchim31.maven:scala-maven-plugin:4.0.1:add-source (default) on project flink: Execution default of goal net.alchim31.maven:scala-maven-plugin:4.0.1:add-source failed: Plugin net.alchim31.maven:scala-maven-plugin:4.0.1 or one of its dependencies could not be resolved: Could not transfer artifact org.apache.maven:maven-compat:jar:3.3.9 from/to central (https://repo.maven.apache.org/maven2): Failed to transfer file https://repo.maven.apache.org/maven2/org/apache/maven/maven-compat/3.3.9/maven-compat-3.3.9.jar with status code 500 -> [Help 1](https://github.com/apache/pulsar/pull/6202/checks?check_run_id=431040196)
devinbost commentedon Feb 7, 2020
Here's another one:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.19.1:test (default-test) on project buildtools: Execution default-test of goal org.apache.maven.plugins:maven-surefire-plugin:2.19.1:test failed: Plugin org.apache.maven.plugins:maven-surefire-plugin:2.19.1 or one of its dependencies could not be resolved: Could not transfer artifact org.apache.maven.surefire:maven-surefire-common:jar:2.19.1 from/to central (https://repo.maven.apache.org/maven2): Failed to transfer file https://repo.maven.apache.org/maven2/org/apache/maven/surefire/maven-surefire-common/2.19.1/maven-surefire-common-2.19.1.jar with status code 500 -> [Help 1](https://github.com/apache/pulsar/pull/6202/checks?check_run_id=432260374)
devinbost commentedon Feb 7, 2020
I created an issue with Github Community here: https://github.community/t5/GitHub-Actions/Getting-Maven-quot-Could-not-transfer-artifact-quot-with-500/m-p/45556#M6259
woop commentedon Jul 31, 2020
@devinbost Are you still getting this problem? We seem to be running into it over at Feast. Using self-hosted runners with GitHub Actions.
smolnar82 commentedon Aug 28, 2020
The same with Apache Knox: https://github.com/apache/knox/runs/1040256760?check_suite_focus=true
This is really annoying. We also use Travis CI and it's working like a charm.
@devinbost, were you able to fix it by updating your workflow file?
devinbost commentedon Aug 28, 2020
I never actually figured out what was causing this... Sorry about that.
lhotari commentedon Oct 27, 2020
There are some suggestions in this SO Q&A: https://stackoverflow.com/questions/55899091/maven-retry-dependency-download-if-failed .
It seems that passing
-Dmaven.wagon.http.retryHandler.count=3would help reduce the issues when downloads are retried 3 times. One of the answers suggests passing-Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false, however that might have a performance impact.I'll experiment to see if
-Dmaven.wagon.http.retryHandler.count=3helps fixing the issue.Configure maven to retry downloads 3 times
Disable maven http pool and keep alive in Github flows
Limit maven http connection pool TTL in Github flows
lhotari commentedon Oct 27, 2020
I ended up trying to use
-Dmaven.wagon.httpconnectionManager.ttlSeconds=25 -Dmaven.wagon.http.retryHandler.count=3inMAVEN_OPTSenvironment variable in the PR to fix this issue. Let's see if that's effective.lhotari commentedon Oct 27, 2020
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."
Limit maven http connection pool TTL in Github flows (#8386)
Limit maven http connection pool TTL in Github flows (apache#8386)
Limit maven http connection pool TTL in Github flows (apache#8386)
lhotari commentedon Dec 10, 2020
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=falseoptions instead of configuring the pool TTL and retry counts.Here's a recent failure:
another similar failure.