Health check error: No HOST or PORT

Hi,
I’m getting this error in job.

Starting service mariadb:10.3 ...
Pulling docker image mariadb:10.3 ...
Using docker image sha256:xxx for mariadb:10.3 ...
Waiting for services to be up and running...

*** WARNING: Service runner-a20592ff-project-11-concurrent-0-mariadb-0 probably didn't start properly.

Health check error:
exit code 1

Health check container logs:
2018-10-03T12:46:41.576526942Z No HOST or PORT

Service container logs:
2018-10-03T12:46:41.302706055Z Initializing database

*********

It’s same error for all services in all jobs.
Gitlab and runner version is 11.3.1

I have nothing special in .gitlab-ci.yml

services:
- name: mariadb:10.3
  alias: db
variables:
  MYSQL_DATABASE: nsp_test
  MYSQL_ROOT_PASSWORD: root

This was caused by network_mode option. I did remove option and it works fine. Maybe if I add docker network with same name it would also work.

1 Like

Glad you could figure it out, and thanks for coming back with an answer. The forum lives from this feedback :slight_smile:

Feel free to mark your last reply as the answer that solves the question. You can do so by ticking the checkbox that appears at the bottom of the post. More on You can now accept the posts that answer to your question and mark thread as resolved

what if I don’t have network_mode in my config.toml?

Did you figure this out? Im running a shell executor on a remote macmini and the health-check gives me ‘Fatal: No Host or Port found’ and when i try to run the pipeline it says it couldnt resolve host: ‘gitlab.com

network_mode isnt documented as an option for shell, only runner.docker so I’m not sure how to even go about this.

Any advice or tips would be appreciated.

Very late reply: I was having the same issue using GitLab on Windows with multiple projects. A few lessons learned that fixed my issue:

-with windows, there is no network_mode in the config.toml so disregard that comment above
-with windows, only use one instance of gitlab-runner.exe on a VM - otherwise you get really weird behavior and the runner won’t pick up jobs
-with windows, when you register a runner, gitlab incorrectly populates the config.toml shell=“pwsh”
------ the correct format that you have to manually fix is shell=“powershell”