Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Maven builds fails complaining about kr.motd.maven:os-maven-plugin:1.7.0

Mariusz Dullak January 11, 2024

I am maintaing bitbucket cloud for an external team.

 

We have a build that is completly inside docker (so bitbucket-pipelines uses docker build -t XXX -f Dockerfile

Since yesterday (Jan 10th) the builds are failing with:

Unresolveable build extension: Plugin kr.motd.maven:os-maven-plugin:1.7.0 or one of its dependencies could not be resolved: Could not transfer artifact org.apache.commons:commons-lang3:jar:3.5 from/to central (https://repo.maven.apache.org/maven2): transfer failed for https://repo.maven.apache.org/maven2/org/apache/commons/commons-lang3/3.5/commons-lang3-3.5.jar: Connect to repo.maven.apache.org:443 [repo.maven.apache.org/151.101.36.215] failed: Connection timed out -> [Help 2]

All of them which use maven. If I try to rerun commits that were passing 2-3 days ago they are failing now.

If there some change in BitBucket which is causing this?

I am using my own builders to run those pipelines and if/when I run the same docker build -t XXX -f Dockerfile it compiles successfully so it has to do something with bitbucket pipelines.

All and any help would be appriciated.

 

1 answer

1 vote
Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
January 12, 2024

Hi Mariusz,

Do these maven builds last more than 5 minutes?

We have seen this timeout issue reported by other customers in the past. Idle outbound connections from Pipelines will only be maintained by our NAT for 5 minutes. The NAT configuration is there to provide static IPs for people wanting to whitelist Pipelines outbound traffic. The NAT timeout in our AWS infrastructure is not configurable, so connections need to either send data more frequently than every 5 minutes, use TCP keepalive, or reconnect if the connection is reset.

The underlying problem seems like a bug with Maven, where it doesn't either 1) use TCP keepalive on its long-lived HTTP connections, or 2) attempt to reconnect if one of its pooled connections is reset during the build:

The issue is resolved for most users by adding the following flag to the maven command (which forces Maven to use new connections and as a result will prevent timeouts):

-Dmaven.wagon.http.pool=false

The bug report I shared indicates that the issue was fixed with version 3.2.0 of Maven Wagon, so you can also try using that.

Kind regards,
Theodora

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events