ElasticSearch health check failed every time when spring boot start up

前端 未结 3 990
长发绾君心
长发绾君心 2020-12-16 15:57

I am working with Elastic Search 5.5.0 on Spring boot 1.5.8.RELEASE using the Java Transport Client library.

The Elastic Search was deployed with docker in a contai

相关标签:
3条回答
  • 2020-12-16 16:15

    You can disable the Elasticsearch health check by adding the following line to your application.xml file

    management.health.elasticsearch.enabled: false
    
    0 讨论(0)
  • 2020-12-16 16:15

    disable the health indicator auto configuration

    @SpringBootApplication(exclude = {        
        ElasticSearchRestHealthIndicatorAutoConfiguration.class
    })
    public class YourApplication
    
    0 讨论(0)
  • 2020-12-16 16:16

    When I went deep into the same issue happening in my sprint boot app too, I found that elasticsearch health check use org.elasticsearch.client.RestClient but I was using org.elasticsearch.client.RestHighLevelClient and had created Bean for the same.

    In case you want to keep the recurring elasticsearch's healthcheck,
    Create a Bean for RestClient using the right host and port.

    Or add following entry in app config yml/xml to remove healthcheck itself:

    management.health.elasticsearch.enabled: false
    
    0 讨论(0)
提交回复
热议问题