Gitlab-CI (under gitlab.com) “system failure” starting container process

扶醉桌前 提交于 2020-12-06 08:20:28

问题


This is my 1st try to set up a basic CI workflow on gitlab.com. The concerned project is a basic static website, and I wanted to run some npm install and gulp build directly on gitlab.

I created a .gitlab-ci.ymlfile, which is recognized and launched. But firsts implementations failed, so I came back to the more basic CI script ever, as follows:

image: debian:jessie

stages:
  - build

build:
  stage: build
  script: echo "Building the app"

Even in this case I encounter the same error:

ERROR: Job failed (system failure): Error response from daemon: OCI runtime create failed: container_linux.go:348: starting container process caused "exec: \"gitlab-runner-build\": executable file not found in $PATH": unknown (executor_docker.go:833:0s) 

I tried with the following images: debian:jessie, node:latest & busybox.

How could I fix this issue please? Am I doing something wrong?

HINT: Please, note that this is a Gitlab.com hosted instance. Not a local one. The runner I'm using is hosted on Gitlab servers.

Full error message:

Running with gitlab-runner 12.3.0 (a8a019e0)
  on docker-auto-scale fa6cab46
Using Docker executor with image node:latest ...
Pulling docker image node:latest ...
Using docker image sha256:e498dabfee1c6735c9da947e0d438edd13593b7d721c989ba8ede14ab603b900 for node:latest ...

ERROR: Job failed (system failure): Error response from daemon: OCI runtime create failed: container_linux.go:348: starting container process caused "exec: \"gitlab-runner-build\": executable file not found in $PATH": unknown (executor_docker.go:833:0s)

回答1:


I tested exactly your model in a fresh new project on Gitlab.com

gitlab-ci.yml(debian)

image: debian:jessie

stages:
  - build

build:
  stage: build
  script: echo "Building the app"

My project is a default Node.js project on base, and I just changed the default docker gitlab-ci.yml in order to match yours.

My results are those ones:

Running with gitlab-runner 12.3.0 (a8a019e0)
  on docker-auto-scale ed2dce3a
Using Docker executor with image debian:jessie ...
Pulling docker image debian:jessie ...
Using docker image sha256:c9d6adb06e4d1092f4dae842e41ba34566481ac002ad52102389122ea6969fd4 for debian:jessie ...
Running on runner-ed2dce3a-project-14701224-concurrent-0 via runner-ed2dce3a-srm-1570489833-8fc7b7db...
Fetching changes with git depth set to 50...
Initialized empty Git repository in /builds/alejandroteixeiraconsultoria/my-awesome-response/.git/
Created fresh repository.
From https://gitlab.com/alejandroteixeiraconsultoria/my-awesome-response
 * [new branch]      master     -> origin/master
Checking out 39d7cf97 as master...

Skipping Git submodules setup
$ echo "Building the app"
Building the app
Job succeeded

As you will see, it went perfect.

The difference I see is this:

Mine:

Running with gitlab-runner 12.3.0 (a8a019e0) on docker-auto-scale ed2dce3a

Yours:

Running with gitlab-runner 12.3.0 (a8a019e0) on docker-auto-scale fa6cab46

If you go to shared runners section, just check that ed2dce3a and fa6cab46 are the references for our runners.

If you now look carefully at the tags, you will see they are different: min is only docker and gce but yours has much more tags.

shared-runners-manager-6.gitlab.com 
shared-runners-manager-3.gitlab.com 

As a second attempt, I tried to create a node:latest image with this gitlab-yml

gitlab-ci.yml (node)

image: node:latest

stages:
  - build

build:
  stage: build
  script: 
    - echo "Building the app"
    - echo "Calling npm "
    - npm update

And the results were again succesful:

Running with gitlab-runner 12.3.0 (a8a019e0)
  on docker-auto-scale fa6cab46
Using Docker executor with image node:latest ...
Pulling docker image node:latest ...
Using docker image sha256:e498dabfee1c6735c9da947e0d438edd13593b7d721c989ba8ede14ab603b900 for node:latest ...
Running on runner-fa6cab46-project-14701224-concurrent-0 via runner-fa6cab46-srm-1570491263-da01e8a0...
Fetching changes with git depth set to 50...
Initialized empty Git repository in /builds/alejandroteixeiraconsultoria/my-awesome-response/.git/
Created fresh repository.
From https://gitlab.com/alejandroteixeiraconsultoria/my-awesome-response
 * [new branch]      NodeApp    -> origin/NodeApp
Checking out e1235047 as NodeApp...

Skipping Git submodules setup
$ echo "Building the app"
Building the app
$ echo "Calling npm "
Calling npm 
**$ npm update**

> core-js@2.6.9 postinstall /builds/alejandroteixeiraconsultoria/my-awesome-response/node_modules/core-js
> node scripts/postinstall || echo "ignore"

+ http-errors@1.6.3
+ cookie-parser@1.4.4
+ express@4.16.4
+ morgan@1.9.1
+ debug@2.6.9
+ pug@2.0.0-beta11
added 165 packages from 606 contributors and audited 305 packages in 7.972s
found 1 low severity vulnerability
  run `npm audit fix` to fix them, or `npm audit` for details
Job succeeded

As you see, my projects went perfectly with a default project.

Here is my example project with two different branches created on gitlab.com.

If I were you, I would try to re-generate the runners key and to disable shared runners and enable them again in order to check if something went wrong in your project. If this does not work, just re-creating a new project from scratch. This seems to be some kind of bug in some of the versions. Maybe it just happened for some time and get back again.

I hope at least this helps you



来源:https://stackoverflow.com/questions/58238756/gitlab-ci-under-gitlab-com-system-failure-starting-container-process

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!