How get Health Check working

I have upgraded to rancher 0.46 and upgraded my Gitlab installation with Health Check bit it stays in this state:

The Gitlab Container is properly working and I have checked with the Devtools of Firefox that its responding with 200 to the requested Url.

@zauberertz Healthcheck works the following way: network-agents on hosts other than where Gitlbab container is deployed, perform health checks against Gitlab_1 managed network ip address within Rancher managed ipsec network. Could you please check the following:

  1. console in, or login to each network agent in the system.
  2. Execute curl http://10.42.94.79: and see if any of the requests result in non 200 response code.

If you get error code, it means that the managed network connectivity might not work cross hosts

For the case that I only request “curl http://10.42.94.79” I’ll get a redirect but if I “curl http://10.42.94.79/users/sign_in” I’ll get a html response.

Meanwhile the service turned green, so I assume its working, but my question was more in the direction how can I check that Health Checking is running / working?

Is there any log that could be checked?

@zauberertz we are planning to add more API/UI support for health checks in the future release, here is the corresponding bug:

https://github.com/rancher/rancher/issues/2128

API would present following info:

  • what hosts are performing health checks for the instance
  • instance health state reported by each host for the instance

Is there any log that could be checked?

Today you can check health check reports in “cattle” database by executing following query:

select * from service_event where instance_id=[your container id]

The query should return you health check state reported by each host (UP, DOWN, INIT)

1 Like

Hi, can you share the configuration for healthcheck in gitlab? I’m trying to setup the hc with this config:

GET /users/sign_in HTTP/1.0

but the container get stuck in initializing state and in a while the container die. I’m able to setup a tcp hc but not a http hc.

The healthcheck port needs to be the internal port the container is running on, not the published port. Have you tried making that actual request? It’s possible the container doesn’t return a successful status for http 1.0 requests or similar.