Skip to content

Builds not starting / gitlab always returns 204

Summary

Somehow I can't get GitLab CI to work. Just installed gitlab runner and no builds are starting. Builds are not starting. GitLab always returns 204 on /ci/api/v1/builds/register.json.

So apparently builds don't get reported to the runner. I just can't figure out why. The runner is correctly configured in Gitlab. It doesn't matter whether I configure it to be shared or specific (enabled the project of course).

I asked for help in the forums, but no replies. I am simply at a loss on how to debug this.

Steps to reproduce

  1. Existing gitlab instance
  2. Install new/first gitlab runner and register it (shared or specific, doesn't matter)
  3. Add .gitlab-ci.yml to a repository

Actual behavior

Push/merge on a repository doesn't trigger a build

Expected behavior

A push on repository should trigger a build.

Relevant logs and/or screenshots

When running gitlab-runner --debug run, it reports:

Checking for builds... nothing                      runner=d99e4559
Feeding runners to channel                          builds=0
Checking for builds... nothing                      runner=d99e4559
Feeding runners to channel                          builds=0
Checking for builds... nothing                      runner=d99e4559

This never changes. /var/log/gitlab/nginx/gitlab_access.log contains:

XX.XX.XX.XX  - - [07/Nov/2016:19:10:48 +0000] "POST /ci/api/v1/builds/register.json HTTP/1.1" 204 0 "-" "gitlab-ci-multi-runner 1.7.1 (1-7-stable; go1.7.3; linux/amd64)"
XX.XX.XX.XX - - [07/Nov/2016:19:10:51 +0000] "POST /ci/api/v1/builds/register.json HTTP/1.1" 204 0 "-" "gitlab-ci-multi-runner 1.7.1 (1-7-stable; go1.7.3; linux/amd64)"

Environment description

Self-hosted Gitlab installation (8.13.3), gitlab runner on same machine.

/etc/gitlab-runner/config.toml:

concurrent = 2
check_interval = 0

[[runners]]
  name = "our runner name"
  url = "https://gitlab.our.domain.com/"
  token = "longstring"
  executor = "shell"
  [runners.cache]

Used GitLab Runner version

Version:      1.7.1
Git revision: f896af7
Git branch:   1-7-stable
GO version:   go1.7.3
Built:        Tue, 25 Oct 2016 16:57:56 +0000
OS/Arch:      linux/amd64