Peter Butkovic
Peter Butkovic

Reputation: 12149

Maven central repo: Return code is: 503 , ReasonPhrase:backend read error

In the continuous integration system (travis-ci.org) on our project, I'm starting to get error:

[ERROR] Failed to execute goal org.codehaus.cargo:cargo-maven2-plugin:1.4.6-SNAPSHOT:start (start-container) on project p6spy-it: Failed resolving artifact: Could not transfer artifact org.jboss.jbossas:jboss-as-distribution:zip:6.1.0.Final from/to central (http://repo.maven.apache.org/maven2): Failed to transfer file: http://repo.maven.apache.org/maven2/org/jboss/jbossas/jboss-as-distribution/6.1.0.Final/jboss-as-distribution-6.1.0.Final.zip. Return code is: 503 , ReasonPhrase:backend read error.
[ERROR] org.jboss.jbossas:jboss-as-distribution:zip:6.1.0.Final
[ERROR] 
[ERROR] from the specified remote repositories:
[ERROR] codehaus-snapshots (http://nexus.codehaus.org/snapshots/, releases=false, snapshots=true),
[ERROR] cloudbees-release (http://repository-p6spy.forge.cloudbees.com/release, releases=true, snapshots=false),
[ERROR] sonatype (https://oss.sonatype.org/content/repositories/releases/, releases=true, snapshots=false),
[ERROR] sonatype-snapshots (https://oss.sonatype.org/content/repositories/snapshots/, releases=false, snapshots=true),
[ERROR] sonatype-apache (https://repository.apache.org/releases/, releases=true, snapshots=false),
[ERROR] apache-snapshots (https://repository.apache.org/snapshots/, releases=false, snapshots=true),
[ERROR] sonatype-nexus-snapshots (https://oss.sonatype.org/content/repositories/snapshots, releases=false, snapshots=true),
[ERROR] central (http://repo.maven.apache.org/maven2, releases=true, snapshots=false)

Full build output can be seen on: https://api.travis-ci.org/jobs/15104889/log.txt?deansi=true

If I access the problematic url via browser: http://repo.maven.apache.org/maven2/org/jboss/jbossas/jboss-as-distribution/6.1.0.Final/jboss-as-distribution-6.1.0.Final.zip I get the same error as well:

Error 503 backend read error

However one day back all was fine.

What should I do with that/How to fix that? Just wait for them to refresh some internal caches?

Upvotes: 1

Views: 6282

Answers (2)

Takahiko Kawasaki
Takahiko Kawasaki

Reputation: 19001

Try:

(1) Download jboss-as-distribution-6.1.0.Final.pom and jboss-as-distribution-6.1.0.Final.zip from the Maven Central Repository.

(2) Install the zip file into your local Maven repository manually.

mvn install:install-file \
    -Dfile=jboss-as-distribution-6.1.0.Final.zip \
    -DpomFile=jboss-as-distribution-6.1.0.Final.pom

It seems "Return code is: 503 , ReasonPhrase:backend read error." error occurs when the target zip file is big. I encountered the same error when downloading appengine-java-sdk-1.9.0.zip.

Upvotes: 2

Mark O'Connor
Mark O'Connor

Reputation: 77961

If downloading remote artifacts is mission critical for your build, have you considered running your own instance of Nexus?

This will protect you against transient networking and server errors, by acting as a local cache inside your network. It'll also improve the performance of your build processes.

A second lessor option is to use the alternate URLs provided by the Search service:

Maybe, just maybe you'll get redirected to a webserver that is either hosted on S3 or in a more available cluster.

Finally if you're interested in what Sonatype are doing to scale up Maven Central, their blogs have postd some interesting updates:

Upvotes: 1

Related Questions