Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

GitLab-Runner "listen_address not defined" error

I'm running a Laravel api on my server, and I wanted to use Gitlab-runner for CD. The first two runs were good, but then I started to see this problem listen_address not defined, session endpoints disabled builds=0

I'm running a linux server on a web shared hosting, so I can access a terminal and get some priviliges but I can't do some sudo stuff like installing a service. That's why I've been running gitlab-runner in user-mode

Error info

Configuration loaded                                builds=0 listen_address not defined, metrics & debug endpoints disabled  builds=0 [session_server].listen_address not defined, session endpoints disabled  builds=0 

.gitlab-runner/config.toml

concurrent = 1 check_interval = 0  [session_server]   session_timeout = 1800  [[runners]]   name = "CD API REST Sistema SIGO"   url = "https://gitlab.com/"   token = "blablabla"   executor = "shell"   listen_address="my.server.ip.address:8043"   [runners.custom_build_dir]   [runners.cache]     [runners.cache.s3]     [runners.cache.gcs] 
like image 687
Arnaldo Perez Avatar asked May 15 '19 16:05

Arnaldo Perez


People also ask

Where is Gitlab runner config file?

You can find the config. toml file in: /etc/gitlab-runner/ on *nix systems when GitLab Runner is executed as root (this is also the path for service configuration)

Where is Gitlab runner build directory?

Build Directory GitLab Runner clones the repository to a path that exists under a base path better known as the Builds Directory. The default location of this base directory depends on the executor. For: Kubernetes, Docker and Docker Machine executors, it is /builds inside of the container.

How do I assign a runner in Gitlab?

For a shared runner, have an administrator go to the GitLab Admin Area and click Overview > Runners. For a group runner, go to Settings > CI/CD and expand the Runners section. For a project-specific runner, go to Settings > CI/CD and expand the Runners section.


1 Answers

I have literally wasted 2 days on this subject. I have followed the below steps to get the runners configured and execute jobs successfully.

I am using Mac OS X 10.13 and Git Lab 12. However, people with other OS also can check this out.

I have stopped the runners and uninstalled them. Now deleted all references and files to gitlab runner, including the gitlab executable also. I got to know GitLab Runner executable paths from https://docs.gitlab.com/runner/configuration/advanced-configuration.html

I have installed them again using the gitlab official documentation.

Then the runners shows online in the gitlab portal. However, the jobs are not getting executed. It shows simply stuck. It tried to get information from logs using

gitlab-runner -debug run

Then I got to know that listen_address not defined. After a long try I got to know that simply enabling Run Untagged jobs did the trick. The jobs started and completed successfully. Still the I see the listen_address not defined from debug. So that misled me. Edit Runner from Gitlab server

Though it seems that last one task has solved my problem, but doing all the tasks in a batch did the trick.

like image 153
Avinash B Avatar answered Sep 18 '22 11:09

Avinash B