gitlab runner正常连接 提示 作业挂起中,等待进入队列 解决办法

方案1

作业挂起中,等待进入队列

重启gitlab-runner

复制代码
gitlab-runner  stop
gitlab-runner  start
gitlab-runner  run

方案2

启动 gitlab-runner 服务

复制代码
gitlab-runner start

成功启动如下

复制代码
[root@docserver home]# gitlab-runner start
Runtime platform                                    arch=amd64 os=linux pid=16174 revision=3153ccc6 version=17.7.0

如提示 the service is not installed 则执行一下安装命令

复制代码
gitlab-runner install --working-directory /home/gitlab-runner --user root

查看服务运行状态systemctl status gitlab-runner

该命令和 gitlab-runner status 的区别是,可以更直观的看到运行状态,这个很重要因为systemctl命令能看到报错,建议就用systemctl查看启动状态

成功运行如下

复制代码
[root@docserver gitlab-runner]# systemctl status gitlab-runner
● gitlab-runner.service - GitLab Runner
   Loaded: loaded (/etc/systemd/system/gitlab-runner.service; enabled; vendor preset: disabled)
   Active: active (running) since Wed 2025-01-15 16:08:22 CST; 14s ago
 Main PID: 22601 (gitlab-runner)
    Tasks: 8
   Memory: 31.7M
   CGroup: /system.slice/gitlab-runner.service
           └─22601 /usr/bin/gitlab-runner run --config /etc/gitlab-runner/config.toml --working-directory /home/gitlab-...

Jan 15 16:08:22 xx systemd[1]: Started GitLab Runner.
Jan 15 16:08:22 xx gitlab-runner[22601]: Runtime platform                                    arch=am....7.0
Jan 15 16:08:22 xx gitlab-runner[22601]: Starting multi-runner from /etc/gitlab-runner/config.toml.....ds=0
Jan 15 16:08:22 xx gitlab-runner[22601]: Running in system-mode.
Jan 15 16:08:22 xx gitlab-runner[22601]:
Jan 15 16:08:22 xx gitlab-runner[22601]: Configuration loaded                                builds=...ds=1
Jan 15 16:08:22 xx gitlab-runner[22601]: listen_address not defined, metrics & debug endpoints disab...ds=1
Jan 15 16:08:22 xx gitlab-runner[22601]: [session_server].listen_address not defined, session endpoi...ds=1
Jan 15 16:08:22 xx gitlab-runner[22601]: Initializing executor providers                     builds=...ds=1
Hint: Some lines were ellipsized, use -l to show in full.

如显示下图中的错误,请检查指定的 working-directory 目录是否存在,不存在则手动创建一个

复制代码
[root@docserver home]# systemctl status gitlab-runner
● gitlab-runner.service - GitLab Runner
   Loaded: loaded (/etc/systemd/system/gitlab-runner.service; enabled; vendor preset: disabled)
   Active: activating (auto-restart) (Result: exit-code) since Wed 2025-01-15 15:26:25 CST; 1min 18s ago
  Process: 15877 ExecStart=/usr/bin/gitlab-runner run --config /etc/gitlab-runner/config.toml --working-directory /h      ome/gitlab-runner --service gitlab-runner --user gitlab-runner (code=exited, status=1/FAILURE)
 Main PID: 15877 (code=exited, status=1/FAILURE)

Jan 15 15:26:25 xx systemd[1]: gitlab-runner.service: main process exited, code=exited, status...LURE
Jan 15 15:26:25 xx  gitlab-runner[15877]: Starting multi-runner from /etc/gitlab-runner/config.t...s=0
Jan 15 15:26:25xx  gitlab-runner[15877]: Running in system-mode.
Jan 15 15:26:25 xx  gitlab-runner[15877]:
Jan 15 15:26:25 xx  gitlab-runner[15877]: FATAL: Service run failed                           er...ory
Jan 15 15:26:25 xx  systemd[1]: Unit gitlab-runner.service entered failed state.
Jan 15 15:26:25 xx  systemd[1]: gitlab-runner.service failed.
Hint: Some lines were ellipsized, use -l to show in full.
相关推荐
极小狐1 天前
极狐GitLab 项目功能和权限解读
运维·git·安全·gitlab·极狐gitlab
宁酱醇1 天前
GitLab_密钥生成(SSH-key)
运维·ssh·gitlab
极小狐1 天前
极狐GitLab 如何 cherry-pick 变更?
人工智能·git·机器学习·gitlab
云攀登者-望正茂1 天前
60个GitLab CI/CD 面试问题和答案
ci/cd·gitlab·devops
懿瑾1 天前
GitLab Auth2授权-Express + passport-gitlab2
gitlab·angular.js
zhang23839061542 天前
IDEA add gitlab account 提示
java·gitlab·intellij-idea·idea
宁酱醇2 天前
各种各样的bug合集
开发语言·笔记·python·gitlab·bug
极小狐2 天前
极狐GitLab Git LFS 速率限制如何设置?
运维·git·ssh·gitlab·github
极小狐3 天前
如何解决极狐GitLab 合并冲突?
人工智能·git·机器学习·gitlab
量子位3 天前
无需数据标注!测试时强化学习,模型数学能力暴增 | 清华 & 上海 AI Lab
人工智能·gitlab·aigc