GitLab-Runner "listen_address not defined" error

Arnaldo Perez picture Arnaldo Perez · May 15, 2019 · Viewed 13.3k times · Source

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]

Answer

Avinash B picture Avinash B · Jul 25, 2019

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.