You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

GitLab实例及跨主机Runner部署问题:调度器无法分配作业求助

Troubleshooting GitLab Runner Scheduler Failure

Hey there, let's work through this scheduler issue you're hitting with your GitLab Runners. I’ve dealt with similar headaches before, so here’s a step-by-step breakdown to get your jobs running:

  • Verify Runner status & connectivity
    First, confirm your runners are actually online and able to talk to your GitLab instance. Head to your GitLab instance's Admin Area > Runners page to check if both your shell and docker runners show as "Active". On the runner hosts themselves, run gitlab-runner status to make sure the service is up, and gitlab-runner verify to test the connection to GitLab. If a runner is offline, double-check network rules (firewalls, proxies) and that the registration token you used is still valid.

  • Check tag matching & runner locks
    Even if you specified tags in your YAML, make sure they’re an exact case-sensitive match with the tags assigned to your runners. For example, docker-runner vs Docker-Runner won’t work. Also, check if the runner is marked as Locked—locked runners can only execute jobs for specific projects, so if your project isn’t linked to it, the scheduler can’t assign jobs. You can toggle this setting in the runner’s details page in GitLab.

  • Inspect runner resource limits & configuration
    For the shell runner: Check if the host has enough CPU/memory to handle the job, and that the gitlab-runner user has proper permissions to clone repos and execute your pipeline scripts.
    For the docker runner: Ensure the Docker daemon is running (systemctl status docker) and that there’s enough disk space/container resources. Also, check your config.toml (usually at /etc/gitlab-runner/config.toml)—the concurrent setting dictates how many jobs the runner can handle at once; if it’s set to 0 or a number lower than your pending jobs, new tasks will get stuck.

  • Dig into logs for specific errors
    Logs are your best friend here:

    • On your GitLab server, check /var/log/gitlab/gitlab-rails/production.log for scheduler-related errors (like permission issues or invalid runner registration data).
    • On each runner host, look at /var/log/gitlab-runner/gitlab-runner.log—this will show if the runner is receiving job requests, or if there’s a failure when trying to pick up a job (e.g., Docker image pull errors, shell execution permissions).
  • Re-register the runner (as a last resort)
    If all else fails, sometimes runner configurations get corrupted. Unregister the problematic runner with gitlab-runner unregister --name <runner-name>, then re-register it using gitlab-runner register, making sure to input the correct GitLab instance URL, registration token, tags, and executor type (shell/docker).

Start with the first two checks—most of the time, the issue is a simple misconfiguration like a mismatched tag or an offline runner. Let me know if you spot something specific in the logs!

内容的提问来源于stack exchange,提问作者Isabel Román

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.09 18:27:56