gitlab-runner:Pipeling is pending infinitely
Asked Answered
W

6

14

I install a Specific Runners,and the status is actived.

my .gitlab-ci.ymi file code:

stages:
  - build

build_maven:
  stage: build
  only:
    - master
  script:
    - echo "hello CI/CD"
  tags: 
    - vue-dev-pub

when I push the master branch,the gitlab-runner is running,but it's pending infinitely。

the job page show:

This job has not started yet

This job is in pending state and is waiting to be picked by a runner

if I excute the runner manually,the job can pass.

the command of gitlab-runner verify shows:

Runtime platform                                    arch=amd64 os=linux pid=24616 revision=d0b76032 version=12.0.2
WARNING: Running in user-mode.                     
WARNING: The user-mode requires you to manually start builds processing: 
WARNING: $ gitlab-runner run                       
WARNING: Use sudo for system-mode:                 
WARNING: $ sudo gitlab-runner...                   
                                                   
Verifying runner... is alive                        runner=T4iKvsT3

I am waiting for you respond,thanks!

Whore answered 12/7, 2019 at 7:58 Comment(0)
E
13

If you run the runner manually in debug mode gitlab-runner --debug run you may see the actual error message, in my case it was:

WARNING: Failed to process runner builds=0 error=failed to update executor: missing Machine options executor=docker+machine runner=pSUsX4yR

That's because on runner creation, I selected option docker+machine rather than docker.

After amending /etc/gitlab-runner/config.toml to docker and running gitlab-runner restart followed by gitlab-runner verify, pipeline started running again.

Exchange answered 9/12, 2021 at 13:38 Comment(0)
R
5

I had a similar problem with my (shell) runners on linux. It would work fine on runners installed and registered on one of my computers but not another. (Even as tags matched correctly in runner and job)

After gitlab-runner register I would get:

New runner. Has not connected yet

After gitlab-runner verify that error would go away. But I would get

This job is in pending state and is waiting to be picked by a runner

After gitlab-runner restart

It would all work.

gitlab-runner status

gitlab-runner: Service is running!
Ree answered 9/2, 2021 at 11:19 Comment(0)
O
0

The tags section in your .gitlab-ci.yml file specifies this job has to be picked by a runner that has the same tags (reference).

tags: 
    - vue-dev-pub

So unless there is actually a runner available for your project that has the vue-dev-pub tag it will keep waiting for one to become available.

Overprize answered 12/7, 2019 at 11:19 Comment(2)
my runner is registered with a tag 'vue-dev-pub',I feel gitlab-runner is not very friendlyWhore
It would help if you could share your runners config fileOverprize
F
0

first, remove the old config in sys

rm /etc/systemd/system/gitlab-runner.servicetemd

now, you need install gitlab-runner with gitlab user:

gitlab-runner install --user=gitlab-runner --working-directory=/home/gitlab-runner

root installations fail

Favourite answered 24/4, 2022 at 19:19 Comment(0)
S
0

Sometimes it is important to check https://status.gitlab.com/ It may show that some services are malfunctioning. For example in my case there was troubles with both:

CI/CD - GitLab SaaS Shared Runners 

and

CI/CD - GitLab SaaS Private Runners

So you need to wait till those service will back in action

Sibelle answered 29/3, 2023 at 16:6 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.