Issue when saving an artifact on self-hosted runner.

Still need help?

The Atlassian Community is here for you.

Ask the community

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

Summary

While using a self-hosted runner, the user faces an issue while trying to save an artifact. The runner log error message says:

[2023-06-09 07:01:22,877] An error occurred whilst creating an artifact from upload.com.atlassian.pipelines.stargate.client.core.exceptions.
StargateConflictException: Response Summary: HttpResponseSummary{httpStatusCode=409, httpStatusMessage=Conflict, 
bodyAsString={"error":{"message":"Conflict","detail":"Artifact in pipeline {pipeline-uuid} already exists.",
"data":{"key":"file-service.artifact.already-exists","arguments":{}}}}} 

Environment

Bitbucket pipelines with self-hosted runners.

Cause

The most likely scenario is that the user might be accidentally running two instances of the same runner UUID/OAuth ID.

Reproduction steps:

  1. Create two different directories for the runner downloaded from UI.
  2. Create one runner in UI and copy the `./start.sh` command.
  3. Run the same ./start.sh command with the same OAuth client ID and secret in both runner directories.
  4. Both runner instances are able to come online at the same time.
  5. Run a job against the runner label, and both runner instances will pick up the step. Because these two instances are competing with each other, multiple requests for artifact upload get delivered at the end, causing a conflict.

Solution

To solve it, check whether multiple instances of the same runner UUID are running concurrently. If yes, please shut down one runner instance and this should solve the issue.

Last modified on Jul 12, 2023

Was this helpful?

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