Skip to content

Can't register runner to server when using HTTP/SSL only

Hi!

I'm currently facing an issue to register a runner to my GitLab server. I'm receiving 2 different erros depending on the scenario I test.

Current Scenario:

Stack (All Docker):

  • JWilder's Nginx Reverse proxy
  • gitlab/gitlab-ce:latest image
  • gitlab/gitlab-runner:latest image

I only have port 443 enabled, so I followed the instructions contained here to make it accessible. http://www.monblocnotes.com/node/2250

It partially works. Although I ran the gitlab container using the FQDN as gitlab.example.com, updated the gitlab.rb and reconfigured everything, I can only access gitlab on https://example.com. I'd appreciate any help on that, but that is not my main concert at the moment.

Then, I ran the gitlab-runner container and tried to register my runner, which led me to two different errors:

  1. trying to register to https://example.com/:

ERROR: Registering runner... failed runner=cAbg39n- status=couldn't execute POST against https://dngdev01.example.com/api/v4/runners: Post https://dngdev01.example.com/api/v4/runners: dial tcp xx.xx.xx.xx:443: i/o timeout PANIC: Failed to register this runner. Perhaps you are having network problems

  1. trying to register to https://172.17.0.1/ OR https://172.31.1.60 (it's private IPV4 IP):

ERROR: Registering runner... failed runner=cAbg39n- status=couldn't execute POST against https://172.17.0.1/api/v4/runners: Post https://172.17.0.1/api/v4/runners: x509: cannot validate certificate for 172.17.0.1 because it doesn't contain any IP SANs PANIC: Failed to register this runner. Perhaps you are having network problems

I tried to follow the guide on the link below, but since my Gitlab Server container doesn't have the /etc/pki/tls/openssl.cnf file, I couldn't do much. http://moonlightbox.logdown.com/posts/2016/09/12/gitlab-ci-runner-register-x509-error

Have you guys ever gone through a problem like that? Any enlightenments are highly appreciated!

Best regards, Enrico Bergamo

Edited by enr1c091