Fix Gilab runner error: listen_address not defined, metrics & debug endpoints disabled builds=0
The error is:
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
In gitlab runners allor “Run untagged jobs: Indicates whether this runner can pick jobs without tags”, set the checkbox correspondingly.
To fix it you should set the checkbox "Run untagged jobs" in Gitlab CI/CD settings.
But after executing the pipeline I have got the error:
ERROR: Job failed (system failure): prepare environment: failed to start process: exec: "pwsh": executable file not found in %PATH%. Check https://docs.gitlab.com/runner/shells/index.html#shell-profile-loading for more information
The problem is connected with Windows & Powershell.
To register gitlab-runner with PowerShell you use the command like this:
./gitlab-runner.exe register --url https://gitlab.url.com/ --registration-token $REGISTRATION_TOKEN
After that config.toml is created.
If you choose "shell", the strings are:
executor = "shell"
shell = "pwsh"
'pwsh' is a name for the new version of PowerShell, a lot of users with Windows 10 have previous version . So did I. You should modify strings in config.toml to:
executor = "shell"
shell = "powershell"
After that gitlab-runner started to work.