Maven "transfer failed ... 503 Service Unavailable" in CI
By Kaveh Alemi·Latchkey
The repository answered with HTTP 503, meaning it is temporarily unavailable, overloaded, or rate limiting requests. The request was well formed; the server simply could not serve it at that moment.
What this error means
Resolution or deploy fails with "Could not transfer artifact ...: status code: 503, reason phrase: Service Unavailable (503)". It usually clears on a retry.
mvn output
[ERROR] Failed to execute goal on project app: Could not resolve dependencies:
Could not transfer artifact org.example:lib:jar:1.0.0 from/to central
(https://repo.maven.apache.org/maven2): status code: 503,
reason phrase: Service Unavailable (503) -> [Help 1]
Common causes
The repository is temporarily down or overloaded
A 503 is a server-side, transient state: maintenance, a load spike, or capacity limits, not a problem with your request.
Rate limiting from many parallel jobs
A burst of concurrent CI jobs hitting the same mirror can trip rate limits that return 503.
How to fix it
Retry with backoff
Enable wagon HTTP retries so a transient 503 is retried instead of failing the job.
Cache the local repository to avoid repeated remote hits.
Resolve through a reliable mirror, not the public host directly.
Enable wagon retries for transient 5xx responses.
Frequently asked questions
What causes ""status code: 503 Service Unavailable""?
A 503 is a server-side, transient state: maintenance, a load spike, or capacity limits, not a problem with your request.
How do I fix "status code: 503 Service Unavailable"?
Enable wagon HTTP retries so a transient 503 is retried instead of failing the job.
Can Latchkey fix this automatically?
Yes. Latchkey runs your GitHub Actions on managed runners that detect this failure, apply the fix, and retry the job automatically - self-healing is on by default.