I’m trying to register runner with own image on local server behind corporate proxy with this command:
gitlab-ci-multi-runner register \
--url http://192.168.100.12/ \
--registration-token "rxgxfv6y7ukkNs8LzrVd" \
--description "some description" \
--executor "docker" \
--docker-image "my_image" \
And the next error occured:
ERROR: Registering runner... failed runner=rxgxfv6y status=couldn't execute POST against http://192.168.100.12/api/v4/runners: Post http://192.168.100.12/api/v4/runners: proxyconnect tcp: dial tcp: lookup 192.168.100.l on 192.168.100.2:53: no such host
PANIC: Failed to register this runner. Perhaps you are having network problems
Why it lookin up to 192.168.100. l ? What is l ?
how did you configure the proxy settings? This sounds like a typo in config.toml, e.g. with setting the HTTP_PROXY variables described here.
Also please share the
/etc/gitlab-runner/config.toml (or wherever this is located, I have never heard of gitlab-ci-multi-runner).
Hi and thanks for replying!
As I can’t create any runners, my config.toml have no runners and environment variables with proxy:
concurrent = 1
check_interval = 0
session_timeout = 1800
As I understand, gitlab-ci-multi-runner is just a link to gitlab-runner.
Also I used another machine in local network: downloaded gitlab-runner and created several runners. And it works without any problem.
really weird, inside the runner’s source code I cannot see any occurrences which could modify that in a certain way.
What happens if you use the GitLab-FQDN instead of the IP address?
Another thing I’d try - use a different IP address just to see whether all
192.168.100.* patterns match this behaviour.
Also, the version of the gitlab-runner would be interesting
Well. Thanks for helping, and sorry for my silly mistake.
It’s not the problem of gitlab-runner. Ping and apt-get working normally and so I thought, that the system has no problem. But when I try wget smth, I get error with address 192.168.100.l . So, the system proxy misconfigured. When I export correct settings it begin to work.
And now my problem is to find where
export http_proxy ... or smth like that is calling.
for the shell environment, these proxy settings are typically stored in .bash_profile, or even in /etc/profiles.d/… For daemon environments, you can set this inside the sysconfig file (RHEL:
/etc/default/<servicename>) or even systemd too.
For the gitlab-runner, I recommend to add the environment directly to the config.toml file underneath the
That’s also described here.
environment = ["HTTP_PROXY=url", "HTTPS_PROXY=url"]
We use that in a similar fashion e.g. for our Icinga build infrastructure with auto-scaling OpenStack instances and passing environment variables for the GitLab runners to the docker-machine hypervisor.
name = "docker-machine on OpenStack"
limit = 12
output_limit = 20480
url = "https://git.icinga.com/"
token = "xxx"
executor = "docker+machine"
environment = ["OS_PROJECT_NAME=1234-openstack-abc","OS_IDENTITY_API_VERSION=3","OS_USER_DOMAIN_NAME=Default"]