Gitlab-runner service fails Checking for Jobs

upgrade
runner

#1

I have a gitlab-runner installed on an EC2 instance. Gitlab itself is installed on another instance. Using run, everything works fine (jobs will run if something is available):

> sudo gitlab-runner run
...
Checking for jobs... nothing                        runner=95942e00

However it fails when starting the service

> sudo gitlab-runner --debug start
Runtime platform                                    arch=amd64 os=linux revision=35e8515d version=11.2.0
> sudo gitlab-runner status
gitlab-runner: Service is running!
> journalctl -f -u gitlab-runner
Aug 28 02:11:05 ip-XXX-XXX-XXX-XXX.ec2.internal gitlab-runner[16716]: time="2018-08-28T02:11:05Z" level=warning msg="Checking for jobs... failed" runner=95942e00 status="couldn't execute POST against https://XXX>com/api/v4/jobs/request: Post https://XXX.com/api/v4/jobs/request: dial tcp XX.XX.XX.XX:443: connect: permission denied"

Any ideas where I can start looking?


#2

Update: My Gitlab can now run CI jobs with just the service running, although I don’t know what changed to fix that. There are two possibilities, that I should try to narrow down:

  • I opened up all incoming ports from my gitlab server to my gitlab-runner server.
  • There’s some anecdotal evidence that using gitlab-runner run once “fixes” things so that the service starts working after that.

However, I still get the error “Checking for jobs …failed” in the logs even those jobs run fine when they are submitted, which is weird.


#3

Hi, I had hit the same problem and it took me half a day to realize that the latest (v1.11.x) gitlab-runner is not compatible with gitlab v10.8.x on our gitlab server. Downgrading gitlab-runner to 10.8.x fixed it instantly.


#4

Interesting. It’s possible that was my original problem. Although I just recently updated gitlab to v11 and it didn’t change anything for me (The runner prints lots of error messages in the log, but seems to work ok).