Openshift 4 Readiness probe failed

2.8k Views Asked by At

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?

1

There are 1 best solutions below

2
On

The problem could be caused by many things, but here are some things you can try:

  1. Verify that the Service object for your deployment / deploymentConfig is connecting to the correct Pods and to the correct Ports.
  2. Verify that the Route/Ingress objects are connecting to the correct Service object.

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.

  1. Verify that your Liveness and Readiness probes are hitting the correct: Ports, page (might be a typo somewhere), protocol - are you using HTTP or HTTPS?
  2. If all of the above is correct, check if you have additional NetworkPolicies for your namespace.