[英]GitLab Runner - ERROR: Failed to remove network for build
Here is my gitlab-ci.yml:这是我的 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.此问题是由于您在 gitlab 跑步者中使用的 executor="docker" 造成的。 try to change to "shell" or "ssh"
尝试更改为“shell”或“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.如果您想使用
executor="docker"
设置您的跑步者,如果您尚未在托管跑步者的机器上安装 docker,您可能会遇到"ERROR: Failed to remove network for build"
错误。
In Ubuntu, try:在 Ubuntu 中,尝试:
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.
我使用“sudo gitlab-runner register”而不是“gitlab-runner register”,在我的情况下问题解决了。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.