This error means your GitLab CI jobs can’t find any machines to run on because all available runners are either busy, not configured correctly, or don’t match the job’s requirements.

Common Causes and Fixes

  1. No Runners Registered or Active:

    • Diagnosis: Check the GitLab UI: Admin Area > Runners. Look for runners with a green circle next to them. If there are none, or they’re all grey, no runners are active and available for your project.
    • Fix: Register a new runner or ensure an existing one is running. For a shared runner on a Linux server, this might involve installing gitlab-runner and running sudo gitlab-runner register followed by sudo systemctl start gitlab-runner.
    • Why it works: A runner needs to be registered with your GitLab instance and actively listening for jobs to be available.
  2. Runners are Busy:

    • Diagnosis: In the Admin Area > Runners UI, check the "Last Contacted" and "Active" columns. If runners show recent contact but no jobs are running, they might be occupied. Look at the gitlab-runner process status on the runner machine: sudo systemctl status gitlab-runner. If it’s active, check its logs: sudo journalctl -u gitlab-runner -f.
    • Fix: Increase the number of concurrent jobs a runner can handle, or add more runner machines. On the runner machine, edit /etc/gitlab-runner/config.toml and increase the concurrent value. For example, change concurrent = 1 to concurrent = 4. Then restart the runner: sudo systemctl restart gitlab-runner.
    • Why it works: The concurrent setting limits how many jobs a single runner process can execute simultaneously. Increasing it allows more jobs to be picked up.
  3. Runner Tags Don’t Match Job Requirements:

    • Diagnosis: Examine your .gitlab-ci.yml file for a tags keyword within your job definition. Then, check the tags assigned to your registered runners in the Admin Area > Runners UI. If the job specifies tags: [docker, production] and no active runner has both of those tags, the job won’t be picked up.
    • Fix: Ensure at least one active runner has all the tags specified in the job. You can add or change tags when registering a runner (sudo gitlab-runner register --registration-token <token> --url <gitlab_url> --description "My Docker Runner" --tag-list "docker,production") or by editing the tags field in /etc/gitlab-runner/config.toml on the runner machine and restarting the service.
    • Why it works: Tags act as selectors. GitLab uses them to ensure a job runs on a runner with the specific capabilities or environment required.
  4. Runner is Not Connected or Heartbeating:

    • Diagnosis: In Admin Area > Runners, look for runners that haven’t been contacted recently (e.g., "Last Contacted" is hours or days ago). On the runner machine, check the gitlab-runner service status (sudo systemctl status gitlab-runner) and its logs (sudo journalctl -u gitlab-runner -f) for connection errors or timeouts.
    • Fix: Restart the gitlab-runner service on the machine: sudo systemctl restart gitlab-runner. If it fails to start, investigate network connectivity issues between the runner machine and your GitLab instance, or check for incorrect GitLab URL/token in /etc/gitlab-runner/config.toml.
    • Why it works: Runners periodically "heartbeat" to GitLab to signal they are alive and ready for jobs. If this connection is broken, GitLab assumes the runner is unavailable.
  5. Runner Executor Configuration Issues:

    • Diagnosis: Check the executor type configured for your runner in /etc/gitlab-runner/config.toml (e.g., docker, kubernetes, shell). Verify that the underlying environment for that executor is set up correctly. For docker, ensure Docker is installed and running (docker info). For kubernetes, check kubectl access and context.
    • Fix: For docker, ensure the Docker daemon is running (sudo systemctl start docker) and that the config.toml has valid [runners.docker] section (e.g., image = "alpine:latest"). For shell, ensure the user gitlab-runner is executing commands correctly. Re-registering the runner with correct executor options can also resolve this.
    • Why it works: The executor is how the runner provisions and runs jobs. If the executor itself is misconfigured or its environment is broken, jobs cannot be started.
  6. Runner is Paused or Maintenance Mode:

    • Diagnosis: In the Admin Area > Runners UI, check if the runner has a pause icon or is listed as "paused." Project-specific runners can also be disabled in the project’s Settings > CI/CD > Runners.
    • Fix: Click the resume/enable button for the runner in the UI. For project runners, ensure they are toggled on in the project settings.
    • Why it works: Runners can be intentionally paused or disabled by administrators or project maintainers to stop them from picking up jobs.
  7. Runner is Not Assigned to the Correct Project/Group:

    • Diagnosis: Shared runners are available to all projects. Group runners are available to all projects within a group. Specific runners are tied to a single project. Check the Admin Area > Runners or Group > Settings > CI/CD > Runners or Project > Settings > CI/CD > Runners to see which projects/groups a runner is associated with. Your job’s project must be in the list of accessible projects for the runner.
    • Fix: Edit the runner’s configuration in the UI to include the relevant project or group, or register a new runner that is scoped correctly.
    • Why it works: Runners have access scopes. A runner must be explicitly linked to a project or its parent group to be considered for that project’s jobs.

Once all these are resolved, you’ll likely hit a "Job Failed" error because your CI script itself has a bug.

Want structured learning?

Take the full Gitlab-ci course →