Health check properties for springboot application in PCF

2.7k views Asked by At

I have configured the below health check properties in my spring boot application(using actuator) and returning "UP" when locally tested using the below endpoint

server:
  servlet:
    context-path: /account/v1
  port: 8443
  
management:
  endpoints:
    web:
      path-mapping:
        health: /health

Check locally using "http://localhost:8443/account/v1/actuator/health and returning {"status":"UP"}"

In PCF I updated the Health check type as "http" and Endpoint as "/actuator/health". When I pushed my app I am getting the below error

2020-09-02T12:43:15.92+0530 [HEALTH/0] ERR Failed to make HTTP request to '/actuator/health' on port 8080: connection refused
   2020-09-02T12:43:15.92+0530 [CELL/0] ERR Failed after 1m0.632s: readiness health check never passed.

Please help on this.(Is my port or endpoint wrong)

1

There are 1 answers

0
Vasanth On

As per the logs, Readiness check is failed.

Readiness check: it occurs at 60 seconds by default during app start, the client (healthcheck app) connects to the app listening port and waits up to 1 second.

Looks like the server takes longer than 60 secs. Increase the timeout and check (Default is 60s, You can increase the value up to 180s)

Timeout can be added in the application manifest file. For Eg:

timeout: 180
health-check-type: http
health-check-http-endpoint: /health