Ayman Patel
Ayman Patel

Reputation: 644

Discovery Client not initialized for Spring Health Actuator

I am trying to run a Spring boot application which is OpenAPI Generated. I have set the following configurations in my application.yml

# Actuator Configuration

management:
  endpoints:
    web:
      exposure:
        include: "*"
  endpoint:
    health:
      enabled: true
  health:
    defaults:
      enabled: false
    refresh:
      enabled: false
    db:
      enabled: false
    diskspace:
      enabled: false
    vault:
      enabled: false      
health:
  config:
    enabled: false

But when I run the endpoint /actuator/health, I am getting the following response:

{
"description": "Discovery Client not initialized",
"status": "UNKNOWN"
}

NOTE:

Spring Boot Version: 2.2.1.RELEASE

Upvotes: 0

Views: 2950

Answers (1)

va1m
va1m

Reputation: 31

Remove management.health.defaults.enabled=false or make it equal true.

Upvotes: 0

Related Questions