bokabraq
bokabraq

Reputation: 115

Job ends with error "WARNING: Uploading artifacts as "archive" to coordinator... failed"

I am trying to set up a GitLab ce server running in docker, on my local Windows machine for the moment. Trying to configure GitLab CI, I am facing an issue when uploading the artifact at the end of the job:

WARNING: Uploading artifacts as "archive" to coordinator... failed id=245 responseStatus=500 Internal Server Error status=500 token=i3yfe7rf

Job failure in GitLab

Before showing more logs, this is my setup. I am using different containers

This is the config.toml file for the only registered runner. Note that this version uses a local s3 server, but the same happens with local cache.

[[runners]]
  name = "Docker Runner"
  url = "http://192.168.1.18:6180/"
  token = "JHubtvs8kFaQjJNC6r6Z"
  executor = "docker"
  clone_url = "http://192.168.1.18:6180/"
  [runners.custom_build_dir]
  [runners.cache]
    Type = "s3"
    Path = "mycustom-s3"
    Shared = true
    [runners.cache.s3]
      ServerAddress = "192.168.1.18:9115"
      AccessKey = "XXXXXX"
      SecretKey = "XXXXXX"
      BucketName = "runner"
      Insecure = true
    [runners.cache.gcs]
    [runners.cache.azure]
  [runners.docker]
    tls_verify = false
    image = "docker:19.03.1"
    privileged = true
    disable_entrypoint_overwrite = false
    oom_kill_disable = false
    disable_cache = false
    volumes = ["/cache"]
    shm_size = 0

This is my CI YAML file: I've taken this example from a youtube video. The same happens for all projects in GitLab.

image: "ruby:latest"

cache:
  paths:
    - output

before_script:
  - bundle install --path vendor  # Install dependencies into ./vendor/ruby

build:
  stage: build
  tags:
    - docker,ruby
  artifacts:
    paths:
      - output/
    expire_in: 5 days   
  script:
    - echo "In the build stage"
    - mkdir -p output
    - echo date > output/$(date +%s).txt
    - ls -l output
    - ls -l vendor

Running the job ends with the above mentioned error.

More errors can be seen in the log files:

{"severity":"ERROR","time":"2020-12-16T11:24:11.865Z","correlation_id":"ZxQ4vVdD1J1","tags.correlation_id":"ZxQ4vVdD1J1","tags.locale":"en","exception.class":"Errno::ENOENT","exception.message":"No such file or directory @ apply2files - /var/opt/gitlab/gitlab-rails/shared/artifacts/tmp/work/1608117851-2655-0006-1409/artifacts.zip"...

I've been spending my last 3 days searching the root of this, and despite having read many articles (here or on GitLab support site), I can't get this resolved.

The error suggests this is an issue with file /var/opt/gitlab/gitlab-rails/shared/artifacts/tmp/work/1608117848-2659-0005-4872/artifacts.zip. Definitely, directory /var/opt/gitlab/gitlab-rails/shared/artifacts/tmp/work/ exists. But sub-directory 1608117848-2659-0005-4872 doesn't.

Upvotes: 7

Views: 14512

Answers (1)

cguedel
cguedel

Reputation: 1112

I had the same problem this morning and finally solved it for me.

I was using bind-mounts for the data/config/log volumes in the gitlab container, which apparently cause a problem when uploading the artifacts.

I now switched to using docker volumes and now artifact upload works.

Upvotes: 6

Related Questions