繁体   English   中英

GitLab Runner - 错误:无法删除网络以进行构建

[英]GitLab Runner - ERROR: Failed to remove network for build

这是我的 gitlab-ci.yml:

image: vibraniumcore/gcc-cmake-boost-mysqlcon
#image: gitlab/dind

stages:
  - test
  - build

Run Tests:
  stage: test
  tags:
    - c++
  script:
    - mkdir build
    - cd build
    - cmake ..
    - cmake --build . --target VibraniumCoreTests
    - cd ./Tests
    - ./VibraniumCoreTests

Build VibraniumCore:
  stage: build
  tags:
    - c++
  script:
    - mkdir build
    - cd build
    - cmake ..
    - cmake --build .

Build AuthServer:
  stage: build
  tags:
  - c++
  script:
    - cd Scripts
    - ./build_authserver.sh

Build WorldServer:
  stage: build
  tags:
  - c++
  script:
    - cd Scripts
    - ./build_worldserver.sh

当我尝试运行我的管道时,出现此错误:

Running with gitlab-runner 13.1.1 (6fbc7474)
  on GCC-CMAKE HdBd6UX6
Preparing the "docker" executor
00:35
ERROR: Failed to remove network for build
ERROR: Preparation failed: error during connect: Get http://%2Fvar%2Frun%2Fdocker.sock/v1.25/info: read unix @->/var/run/docker.sock: read: connection reset by peer (docker.go:894:4s)
Will be retried in 3s ...
ERROR: Failed to remove network for build
ERROR: Preparation failed: error during connect: Get http://%2Fvar%2Frun%2Fdocker.sock/v1.25/info: read unix @->/var/run/docker.sock: read: connection reset by peer (docker.go:894:10s)
Will be retried in 3s ...
ERROR: Failed to remove network for build
ERROR: Preparation failed: error during connect: Get http://%2Fvar%2Frun%2Fdocker.sock/v1.25/info: read unix @->/var/run/docker.sock: read: connection reset by peer (docker.go:894:10s)
Will be retried in 3s ...
ERROR: Job failed (system failure): error during connect: Get http://%2Fvar%2Frun%2Fdocker.sock/v1.25/info: read unix @->/var/run/docker.sock: read: connection reset by peer (docker.go:894:10s)

知道为什么会出现此错误以及如何解决吗?

此问题是由于您在 gitlab 跑步者中使用的 executor="docker" 造成的。 尝试更改为“shell”或“ssh”

如果您想使用executor="docker"设置您的跑步者,如果您尚未在托管跑步者的机器上安装 docker,您可能会遇到"ERROR: Failed to remove network for build"错误。

在 Ubuntu 中,尝试:

sudo apt install docker.io

然后重新运行管道。

我遇到过同样的问题。 我使用“sudo gitlab-runner register”而不是“gitlab-runner register”,在我的情况下问题解决了。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM