Skip to content

Gitlab -CI/CD artifacts uploads fails

Summary

While running build job in Gitlab CI/CD, artifacts uploading failed.

Steps to reproduce

It can be reproduced by running a job.

Example Project

What is the current bug behavior?

gitlab artifcats uploads fails most of the times:

image

It works sometimes:

image

What is the expected correct behavior?

gitlab artifacts uploads works normally

Relevant logs and/or screenshots

[root@srvxdocker01 gitlab-workhorse]# tail -f current| grep “error”

{“correlation_id”:“01EZSFN4ZWRMDMMPVZ9BTYVY55”,“error”:“handleFileUploads: extract files from multipart: persisting multipart file: unexpected EOF”,“level”:“error”,“method”:“POST”,“msg”:“error”,“time”:“2021-03-02T12:47:24Z”,“uri”:"/api/v4/jobs/1337/artifacts?artifact_format=zip\u0026artifact_type=archive"}
{“correlation_id”:“01EZSFN68Y4F3JA1WR62WQ14TZ”,“error”:“handleFileUploads: extract files from multipart: persisting multipart file: unexpected EOF”,“level”:“error”,“method”:“POST”,“msg”:“error”,“time”:“2021-03-02T12:47:25Z”,“uri”:"/api/v4/jobs/1337/artifacts?artifact_format=zip\u0026artifact_type=archive"}
{“correlation_id”:“01EZSFN87NGZCF4GDYKQMV2VVR”,“error”:“handleFileUploads: extract files from multipart: persisting multipart file: unexpected EOF”,“level”:“error”,“method”:“POST”,“msg”:“error”,“time”:“2021-03-02T12:47:27Z”,“uri”:"/api/v4/jobs/1337/artifacts?artifact_format=zip\u0026artifact_type=archive"}
[root@srvxdocker01 gitlab-workhorse]# cat current| grep 01EZSFN4ZWRMDMMPVZ9BTYVY55

{“correlation_id”:“01EZSFN4ZWRMDMMPVZ9BTYVY55”,“error”:“handleFileUploads: extract files from multipart: persisting multipart file: unexpected EOF”,“level”:“error”,“method”:“POST”,“msg”:“error”,“time”:“2021-03-02T12:47:24Z”,“uri”:"/api/v4/jobs/1337/artifacts?artifact_format=zip\u0026artifact_type=archive"}
{“content_type”:“text/plain; charset=utf-8”,“correlation_id”:“01EZSFN4ZWRMDMMPVZ9BTYVY55”,“duration_ms”:206,“host”:“my_host”,“level”:“info”,“method”:“POST”,“msg”:“access”,“proto”:“HTTP/1.1”,“referrer”:"",“remote_addr”:"ip",“remote_ip”:"ip",“route”:"^/api/v4/jobs/[0-9]+/artifacts\z",“status”:500,“system”:“http”,“time”:“2021-03-02T12:47:24Z”,“ttfb_ms”:205,“uri”:"/api/v4/jobs/1337/artifacts?artifact_format=zip\u0026artifact_type=archive",“user_agent”:“gitlab-runner 13.7.0 (13-7-stable; go1.13.8; linux/amd64)”,“written_bytes”:22}

Output of checks

Results of GitLab environment info

Expand for output related to GitLab environment info

(For installations with omnibus-gitlab package run and paste the output of:
`sudo gitlab-rake gitlab:env:info`)
System information
System:
Current User:   git
Using RVM:      no
Ruby Version:   2.7.2p137
Gem Version:    3.1.4
Bundler Version:2.1.4
Rake Version:   13.0.1
Redis Version:  5.0.9
Git Version:    2.29.0
Sidekiq Version:5.2.9
Go Version:     unknown

GitLab information
Version:        13.7.5
Revision:       e2635ed4cc8
Directory:      /opt/gitlab/embedded/service/gitlab-rails
DB Adapter:     PostgreSQL
DB Version:     11.9
URL:            my_url
HTTP Clone URL: my_url/some-group/some-project.git
SSH Clone URL:  my_url:some-group/some-project.git
Using LDAP:     no
Using Omniauth: yes
Omniauth Providers:

GitLab Shell
Version:        13.14.0
Repository storage paths:
- default:      /var/opt/gitlab/git-data/repositories
GitLab Shell path:              /opt/gitlab/embedded/service/gitlab-shell
Git:            /opt/gitlab/embedded/bin/git

(For installations from source run and paste the output of:
`sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production`)

Results of GitLab application Check

Expand for output related to the GitLab application check

(For installations with omnibus-gitlab package run and paste the output of: sudo gitlab-rake gitlab:check SANITIZE=true)

Checking GitLab subtasks ...

Checking GitLab Shell ...

GitLab Shell: ... GitLab Shell version >= 13.14.0 ? ... OK (13.14.0) Running /opt/gitlab/embedded/service/gitlab-shell/bin/check Internal API available: OK Redis available via internal API: OK gitlab-shell self-check successful

Checking GitLab Shell ... Finished

Checking Gitaly ...

Gitaly: ... default ... OK

Checking Gitaly ... Finished

Checking Sidekiq ...

Sidekiq: ... Running? ... yes Number of Sidekiq processes ... 1

Checking Sidekiq ... Finished

Checking Incoming Email ...

Incoming Email: ... Reply by email is disabled in config/gitlab.yml

Checking Incoming Email ... Finished

Checking LDAP ...

LDAP: ... LDAP is disabled in config/gitlab.yml

Checking LDAP ... Finished

Checking GitLab App ...

Git configured correctly? ... yes Database config exists? ... yes All migrations up? ... yes Database contains orphaned GroupMembers? ... no GitLab config exists? ... yes GitLab config up to date? ... yes Log directory writable? ... yes Tmp directory writable? ... yes Uploads directory exists? ... yes Uploads directory has correct permissions? ... yes Uploads directory tmp has correct permissions? ... yes Init script exists? ... skipped (omnibus-gitlab has no init script) Init script up-to-date? ... skipped (omnibus-gitlab has no init script) Projects have namespace: ... 2/3 ... yes 2/4 ... yes 2/5 ... yes 2/6 ... yes 2/7 ... yes 2/8 ... yes 2/9 ... yes 5/10 ... yes 2/11 ... yes 3/13 ... yes 2/14 ... yes 2/15 ... yes 2/17 ... yes 5/19 ... yes 9/20 ... yes 11/21 ... yes 11/22 ... yes 14/25 ... yes 3/26 ... yes 11/27 ... yes 7/28 ... yes 15/29 ... yes 7/30 ... yes 5/31 ... yes 7/32 ... yes 5/33 ... yes 15/34 ... yes 14/36 ... yes 2/38 ... yes 5/39 ... yes 2/40 ... yes 25/41 ... yes 23/42 ... yes 2/43 ... yes 5/44 ... yes 5/45 ... yes 14/46 ... yes 5/47 ... yes 5/48 ... yes 28/49 ... yes 28/50 ... yes 14/51 ... yes 14/52 ... yes 14/53 ... yes 14/54 ... yes Redis version >= 4.0.0? ... yes Ruby version >= 2.7.2 ? ... yes (2.7.2) Git version >= 2.29.0 ? ... yes (2.29.0) Git user has default SSH configuration? ... yes Active users: ... 17 Is authorized keys file accessible? ... yes GitLab configured to store new projects in hashed storage? ... yes All projects are in hashed storage? ... yes

Checking GitLab App ... Finished

Checking GitLab subtasks ... Finished

Possible fixes

Edited by 🤖 GitLab Bot 🤖