gitlab-runner run-single always fails with 'forbidden' with docker executor
Summary
When using the same arguments but given to gitlab-runner register and then running with gitlab-runner run the runner runs fine, however attempting the exact same configuration for gitlab-runner run-single fails with "ERROR: Checking for jobs... forbidden"
Steps to reproduce
Simply execute a gitlab-runner with run-single, here's my exact command-line used (with sensitive info removed)
gitlab-runner run-single --url "{GITLAB_URI}" --token "
{GITLAB_TOKEN}" --description "My Runner" --executor docker --docker-image 'docker:latest' --docker-volumes '/var/run/docker.sock:/var/run/docker.sock' --limit 1 --request-concurrency 1
Actual behavior
Runtime platform arch=amd64 os=linux pid=22 revision=577f813d version=12.5.0 Starting runner for XXXXX with token ZZZZZ ... ERROR: Checking for jobs... forbidden runner=ZZZZZ Runner is not healthy!
Expected behavior
It should not fail, this is the output from executing via register then run, with the same arguments:
Runtime platform arch=amd64 os=linux pid=48 revision=577f813d version=12.5.0 Running in system-mode.
Registering runner... succeeded runner=ZZZZZ Runner registered successfully. Feel free to start it, but if it's running already the config should be automatically reloaded! Runtime platform arch=amd64 os=linux pid=56 revision=577f813d version=12.5.0 Starting multi-runner from /etc/gitlab-runner/config.toml ... builds=0 Running in system-mode.
Configuration loaded builds=0 Locking configuration file builds=0 file=/etc/gitlab-runner/config.toml pid=56
Environment description
Self-Managed / Starter
Empty config.toml, runner executed in clean container.
config.toml contents
Used GitLab Runner version
Version: 12.5.0
Git revision: 577f813d
Git branch: 12-5-stable
GO version: go1.10.8
Built: 2019-11-20T09:14:54+0000
OS/Arch: linux/amd64