Google Cloud Build Maven Artifacts upload failing with 'Broken pipe'

We have a cloud build file that has uploads 4 rather large (75-100 Mb) Maven artifacts.

 

artifacts:
  mavenArtifacts:
    - repository: 'https://europe-maven.pkg.dev/our-project/releases'
      path: 'moduel/target/deploy/artifact-${_MVN_VERSION}.jar'
      artifact_id: 'artifact'
      group_id: 'io.trustbuilder'
      version: '${_MVN_VERSION}'

 

So far this has always worked well.

Since a few days we keep getting these messages

 

Uploading to remote-repository: https://europe-maven.pkg.dev/our-project/releases/io/trustbuilder/artifact/11-fff0dd1/artifact-11-fff0dd1.jar
Progress (1): 0/73 MB
Progress (1): 0.4/73 MB
                       
Uploading to remote-repository: https://europe-maven.pkg.dev/our-project//releases/io/trustbuilder/artifact/11-fff0dd1/artifact-11-fff0dd1.pom
Progress (1): 409 B
                   
Uploaded to remote-repository: https://europe-maven.pkg.dev/our-project/releases/io/trustbuilder/artifact/11-fff0dd1/artifact-11-fff0dd1.pom (409 B at 685 B/s)

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.8.2:deploy-file (default-cli) on project tb-suite: Failed to deploy artifacts: Could not transfer artifact io.trustbuilder:artifact:jar:11-fff0dd1 from/to remote-repository (https://europe-maven.pkg.dev/our-project/releases): Broken pipe -> [Help 1]

 

Previously we have gotten similar errors (Broken pipe) if the repository is in 'Release' mode and the artifact already exists, however now we even get these on an empty repository.

So far we have been tinkering with the permissions, but to no avail. How can we find out what the cause of the 'Broken pipe' error is without access to the actual Maven repository server?

0 2 734
2 REPLIES 2

Hi @brecht-y-tb,

Welcome to Google Cloud Community!

Upon checking your error message, there are several factors that result to broken pipe error:

  • Stable internet connection
  • Java/Maven versions are outdated

Here are some suggestions that could potentially fix this issue:

  • Switch to wired internet connection if you're using wireless
  • Update Java SDK/libraries to latest version
  • Verify that the full path of the image that you are pushing is correct. Run the following command to print the settings for the default repository:
gcloud artifacts print-settings mvn

 Make sure that the settings match your pom.xml file

  • Increase the timeout value on the client side.
  • Make sure the server is able to handle a large number of connections.
  • Verify that the server is not closing the connection prematurely.

You may refer to the links below as your reference:

If the above steps and references did not work, you may refer to this link on reporting issues and requesting feature requests.

Hi,

As the client is the Google Cloud Build environment, and the server is Google Artifact Registry, I'm afraid there's not much I can do.

Furthermore, it works from my machine to Google Artifact Registry, but not from the Cloud Build environment.

I have created an issue. Thanks.