Getting Maven "Could not transfer artifact" with 500 error when using Github Actions


In our open source project, we are intermittently getting errors like these after moving from Jenkins to Github CI Actions:

More examples are documented in our Github Issues here:

This issue almost seems related to this issue:

and this issue (about proxy settings):

Our Github workflow files are located here:

This one, for example, has caused the issue:

How do we resolve this issue?

I tested on the forked repository of your repository, but did not reproduce the problem, it always can work without errors.

Maybe you can try to enabling debug logging on your repository, and share the detailed debug logs with us if the error occurs again next time.

I am getting similar errors intermittently on a private Jenkins instance; same maven repository, different packages. Maybe the problem is with Apache’s server?

The issue is intermittent and unpredictable.

@devinbost & @liori ,

Sorry for the late response.

Whether the problem occurs again recently?

If it occurs again, I will help you report this to the appropriate engineering team, and if possible, please share you repositories with us so that we can check more deatils of the workflows in your repositories to analyze the root cause.

I’ve stopped getting errors some time ago.

It seems that passing -Dmaven.wagon.httpconnectionManager.ttlSeconds=25 to maven will fix the issue.

This is used in apache/pulsar repository:

  MAVEN_OPTS: -Dmaven.wagon.httpconnectionManager.ttlSeconds=25 -Dmaven.wagon.http.retryHandler.count=3

In the last comment of WAGON-545, it says “Azure users shall set the TTL to 240 seconds or less.”