简体   繁体   中英

GitLab Runner - ERROR: Failed to remove network for build

Here is my 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

When I try to run my pipeline I get this error:

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)

Any idea why I get this error and how can I fix it?

This issue is due to the executor="docker" you are using in gitlab runner. try to change to "shell" or "ssh"

If you want to have your runner setup with executor="docker" , you may encounter the "ERROR: Failed to remove network for build" error if you have not installed docker on your machine hosting the runner.

In Ubuntu, try:

sudo apt install docker.io

And then re-run the pipeline.

I had the same issue. I used "sudo gitlab-runner register" instead of "gitlab-runner register" and in my case the issue resolved.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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