I'm using thorntail microprofile framework to monitor a simple rest service application. The application deployment on openshift works fine but not the health monitor since receive this message:
Readiness probe failed: Get http://10.116.0.57:8080/health/live: dial tcp 10.116.0.57:8080: connect: connection refused
But can access to the health service using the service route url e.g. http://thorntail-myproject.apps-crc.testing/health/live and get the results:
{"status":"UP","checks":[{"name":"server-state","status":"UP"}]}
Both Liveness and Readiness annotations are included in the HealthCheck implementation class. Also get service response when execute curl through pod's remote container shell.
These are the dependencies I'm using in pom.xml:
<dependencies>
<dependency>
<groupId>io.thorntail</groupId>
<artifactId>jaxrs</artifactId>
</dependency>
<dependency>
<groupId>io.thorntail</groupId>
<artifactId>microprofile-health</artifactId>
</dependency>
</dependencies>
Any ideas?
The problem could be caused by many things, but here are some things you can try:
The two things above seem correct as you can access the Route URL, but we don't know your deployments and how many you have.