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
-
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-runnerand runningsudo gitlab-runner registerfollowed bysudo 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.
- Diagnosis: Check the GitLab UI:
-
Runners are Busy:
- Diagnosis: In the
Admin Area > RunnersUI, check the "Last Contacted" and "Active" columns. If runners show recent contact but no jobs are running, they might be occupied. Look at thegitlab-runnerprocess 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.tomland increase theconcurrentvalue. For example, changeconcurrent = 1toconcurrent = 4. Then restart the runner:sudo systemctl restart gitlab-runner. - Why it works: The
concurrentsetting limits how many jobs a single runner process can execute simultaneously. Increasing it allows more jobs to be picked up.
- Diagnosis: In the
-
Runner Tags Don’t Match Job Requirements:
- Diagnosis: Examine your
.gitlab-ci.ymlfile for atagskeyword within your job definition. Then, check the tags assigned to your registered runners in theAdmin Area > RunnersUI. If the job specifiestags: [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 thetagsfield in/etc/gitlab-runner/config.tomlon 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.
- Diagnosis: Examine your
-
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 thegitlab-runnerservice status (sudo systemctl status gitlab-runner) and its logs (sudo journalctl -u gitlab-runner -f) for connection errors or timeouts. - Fix: Restart the
gitlab-runnerservice 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.
- Diagnosis: In
-
Runner Executor Configuration Issues:
- Diagnosis: Check the
executortype 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. Fordocker, ensure Docker is installed and running (docker info). Forkubernetes, checkkubectlaccess and context. - Fix: For
docker, ensure the Docker daemon is running (sudo systemctl start docker) and that theconfig.tomlhas valid[runners.docker]section (e.g.,image = "alpine:latest"). Forshell, ensure the usergitlab-runneris 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.
- Diagnosis: Check the
-
Runner is Paused or Maintenance Mode:
- Diagnosis: In the
Admin Area > RunnersUI, check if the runner has a pause icon or is listed as "paused." Project-specific runners can also be disabled in the project’sSettings > 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.
- Diagnosis: In the
-
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 > RunnersorGroup > Settings > CI/CD > RunnersorProject > Settings > CI/CD > Runnersto 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.
- 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
Once all these are resolved, you’ll likely hit a "Job Failed" error because your CI script itself has a bug.