Richard Rublev
Richard Rublev

Reputation: 8164

Why did my job get stuck while trying local Gitlab-runner?

I got this

enter image description here

enter image description here Runner has never contacted this instance,what does it mean?

I can confirm that I have one.

Available specific runners

enter image description here

My .gitlab-ci.yml

stages:
    - build_stage
    - deploy_stage

build:
    stage: build_stage
    script:
        - docker --version
        - docker build -t pyapp .
    tags:
        - localshell
        - localrunner

deploy:
    stage: deploy_stage
    script:
        - docker stop pyappcontainer1 || true && docker rm pyappcontainer1 || true
        - docker run -d --name pyappcontainer1 -p 8080:8080 pyapp
    tags:
        - localshell
        - localrunner

Just to add this,to confirm what sytech said Runtime platform arch=amd64

os=linux pid=4819 revision=bd40e3da version=14.9.1
Starting multi-runner from /etc/gitlab-runner/config.toml...  builds=0
Running in system-mode.                            
                                                   
Configuration loaded                                builds=0
listen_address not defined, metrics & debug endpoints disabled  builds=0
[session_server].listen_address not defined, session endpoints disabled  builds=0

How to define listen_address?

Upvotes: 1

Views: 3152

Answers (2)

shgnInc
shgnInc

Reputation: 2198

In some cases, it solved bu running gitlab-runner verify.

So, just run it...

Upvotes: 3

sytech
sytech

Reputation: 40861

Your runner is registered, but is not running and communicating with GitLab to pick up jobs. Hence, jobs depending on this runner are stuck.

You should make sure the gitlab-runner process is actively running and there are no errors in its logs.

Upvotes: 1

Related Questions