Troubleshooting pipeline Maven build failing with "Connection reset -> [Help 1]"

 

Platform Notice: Cloud - This article applies to Atlassian products on the cloud platform.

   

Summary

This error occurs during the pipeline build when communicating with Maven dependencies through an open connection in the HTTP pool. The specific error message encountered is as follows:

Plugin org.apache.maven.plugins:<PluginName> or one of its dependencies could not be resolved: Failed to collect dependencies at org.apache.maven.plugins:<PluginName> -> <PluginName> Failed to read artifact descriptor for <PluginName> Could not transfer artifact <PluginName> from/to central (https://repo.maven.apache.org/maven2): transfer failed for https://repo.maven.apache.org/maven2/org/<PluginName> Connection reset -> [Help 1]

Cause

This issue arises because connection tracking procedures implemented in proxies or firewalls terminate the connection to Maven dependencies. These network devices keep track of all connections passing through them but limit the number of connections they can retain in memory. They prioritize keeping the newest connections and discarding older and inactive connections first, sometimes terminating your connection abruptly.

Solution

To prevent the connection from being terminated, you can resolve this issue by turning off the HTTP pool options in the Maven steps. For example, you can use the following YAML parameter:

pipelines:
  default:
    - step:
        script:
          - echo "Hello, World!"
          - mvn <rest of line> -Dmaven.wagon.http.pool=false

If you are encountering issues following this documentation - please raise a support ticket or a community support ticket for further assistance.

DescriptionTroubleshooting pipeline Maven build failing with "Connection reset -> [Help 1]"
ProductBitbucket Cloud
Last modified on Jan 19, 2024

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.