gitlab-错误404大伪像的人工制品上传

发布于 2025-02-08 13:47:57 字数 2246 浏览 2 评论 0原文

我是在Gentoo上使用此覆盖的私人Gitlab 15.0.2的自我托管: https:// gitlab 。

​现在,我还为我的一个项目(通过Hugo生成的主页)配置了GitLab Runner(基于Docker)和CI管道。该管道可以正常工作的位置,该点应该上传当前大小约11GB的工件。

最初,这给了我一个“ 413请求实体”错误,因此我提高了gitlab中的人工尺寸限制,并增加了nginx中的client_max_body_size。现在我看到了这个错误:

Uploading artifacts for successful job
Using docker image sha256:c20c992e5d83348903a6f8d18b4005ed1db893c4f97a61e1cd7a8a06c2989c40 for registry.gitlab.com/gitlab-org/gitlab-runner/gitlab-runner-helper:x86_64-latest with digest registry.gitlab.com/gitlab-org/gitlab-runner/gitlab-runner-helper@sha256:edc1bf6ab9e1c7048d054b270f79919eabcbb9cf052b3e5d6f29c886c842bfed ...
Uploading artifacts...
public: found 907 matching files and directories   
WARNING: Uploading artifacts as "archive" to coordinator... 404 Not Found  id=112 responseStatus=404 Not Found status=404 token=X8QjapaV
WARNING: Retrying...                                context=artifacts-uploader error=invalid argument
WARNING: Uploading artifacts as "archive" to coordinator... 404 Not Found  id=112 responseStatus=404 Not Found status=404 token=X8QjapaV
WARNING: Retrying...                                context=artifacts-uploader error=invalid argument
WARNING: Uploading artifacts as "archive" to coordinator... 404 Not Found  id=112 responseStatus=404 Not Found status=404 token=X8QjapaV
FATAL: invalid argument                            
ERROR: Job failed: exit code 1

它尝试了3次,然后最终放弃。每次尝试都需要几分钟。

我没有在Gitlab的Production.log中看到与此有关的任何消息,这使我有些困惑。在这种情况下,404错误代码似乎没有多大意义。我已经通过分支和删除大量内容来创建较小的人工制品来测试构建管道。第一次尝试中的上传在该分支中起作用,因此上传URL必须很好。

我还需要了解其他配置设置吗?也许上传时间?

编辑: 这是我目前的.gitlab-ci.yaml,可以让您更好地了解我在做什么。每次运行管道时都安装了那些nodejs依赖关系,这很丑陋,但这不是问题。

image: cibuilds/hugo

variables:
  GIT_SUBMODULE_STRATEGY: recursive

build:
  stage: build
  script:
  - curl -sL https://deb.nodesource.com/setup_16.x -o /tmp/nodesource_setup.sh
  - sudo bash /tmp/nodesource_setup.sh
  - sudo apt update
  - sudo apt install nodejs
  - npm install autoprefixer postcss-cli
  - hugo
  artifacts:
    paths:
    - public

我打算在使用SSH上使用Rsync的Pipeline添加另一个步骤。

I am self-hosting a private Gitlab 15.0.2 on Gentoo using this overlay: https://gitlab.awesome-it.de/overlays/gitlab

It's basically an installation from source (no Omnibus). Now I have also configured a gitlab runner (docker based) and a CI pipeline in one of my projects (a homepage being generated through hugo). The pipeline works fine up the the point where it is supposed to upload the artifact which is currently about 11GB in size.

Initially this gave me an "413 Request Entity Too Large" error, so I raised the artifact size limits in Gitlab and increased the client_max_body_size in Nginx. Now I am seeing this error instead:

Uploading artifacts for successful job
Using docker image sha256:c20c992e5d83348903a6f8d18b4005ed1db893c4f97a61e1cd7a8a06c2989c40 for registry.gitlab.com/gitlab-org/gitlab-runner/gitlab-runner-helper:x86_64-latest with digest registry.gitlab.com/gitlab-org/gitlab-runner/gitlab-runner-helper@sha256:edc1bf6ab9e1c7048d054b270f79919eabcbb9cf052b3e5d6f29c886c842bfed ...
Uploading artifacts...
public: found 907 matching files and directories   
WARNING: Uploading artifacts as "archive" to coordinator... 404 Not Found  id=112 responseStatus=404 Not Found status=404 token=X8QjapaV
WARNING: Retrying...                                context=artifacts-uploader error=invalid argument
WARNING: Uploading artifacts as "archive" to coordinator... 404 Not Found  id=112 responseStatus=404 Not Found status=404 token=X8QjapaV
WARNING: Retrying...                                context=artifacts-uploader error=invalid argument
WARNING: Uploading artifacts as "archive" to coordinator... 404 Not Found  id=112 responseStatus=404 Not Found status=404 token=X8QjapaV
FATAL: invalid argument                            
ERROR: Job failed: exit code 1

It tries 3 times before eventually giving up. Each attempt takes a few minutes.

I am not seeing any messages related to this in Gitlab's production.log which leaves me a bit stumped. The 404 error code does not seem to make much sense in this context. I have tested the build pipeline by branching and removing lots of content to create a much smaller artifact. The upload works in that branch on first try, so the upload URL must be fine.

Are there any other configuration settings that I need to be aware of? Perhaps some timeout for the upload?

EDIT:
Here's my current .gitlab-ci.yaml to give you better idea of what I am doing. It's rather ugly with those NodeJS dependencies being installed every time the pipeline is run, but that's currently not the issue.

image: cibuilds/hugo

variables:
  GIT_SUBMODULE_STRATEGY: recursive

build:
  stage: build
  script:
  - curl -sL https://deb.nodesource.com/setup_16.x -o /tmp/nodesource_setup.sh
  - sudo bash /tmp/nodesource_setup.sh
  - sudo apt update
  - sudo apt install nodejs
  - npm install autoprefixer postcss-cli
  - hugo
  artifacts:
    paths:
    - public

I am planning to add another step to the pipeline for the deployment using rsync over ssh.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文