代码之家  ›  专栏  ›  技术社区  ›  Menelaos

弹性搜索健康检查失败-spring boot/cloud

  •  0
  • Menelaos  · 技术社区  · 6 年前

    我有一个连接到弹性搜索的java应用程序。 它还连接到eureka discovery并注册自己。

    我不断收到通知,它在下降和上升。

    我检查了日志,看到以下错误消息:

    2018-12-07 14:09:46.040  WARN [ab-elastic-search,,,] 23288 --- [nfoReplicator-0] o.s.b.a.e.ElasticsearchHealthIndicator   : Elasticsearch health check failed
    
    org.elasticsearch.ElasticsearchTimeoutException: java.util.concurrent.TimeoutException: Timeout waiting for task.
        at org.elasticsearch.action.support.AdapterActionFuture.actionGet(AdapterActionFuture.java:71) ~[elasticsearch-5.4.0.jar!/:5.4.0]
        at org.elasticsearch.action.support.AdapterActionFuture.actionGet(AdapterActionFuture.java:58) ~[elasticsearch-5.4.0.jar!/:5.4.0]
        at org.springframework.boot.actuate.elasticsearch.ElasticsearchHealthIndicator.doHealthCheck(ElasticsearchHealthIndicator.java:80) ~[spring-boot-actuator-2.0.3.RELEASE.jar!/:2.0.3.RELEASE]
        at org.springframework.boot.actuate.health.AbstractHealthIndicator.health(AbstractHealthIndicator.java:84) ~[spring-boot-actuator-2.0.3.RELEASE.jar!/:2.0.3.RELEASE]
        at org.springframework.boot.actuate.health.CompositeHealthIndicator.health(CompositeHealthIndicator.java:68) [spring-boot-actuator-2.0.3.RELEASE.jar!/:2.0.3.RELEASE]
        at org.springframework.cloud.netflix.eureka.EurekaHealthCheckHandler.getHealthStatus(EurekaHealthCheckHandler.java:103) [spring-cloud-netflix-eureka-client-2.0.0.RELEASE.jar!/:2.0.0.RELEASE]
        at org.springframework.cloud.netflix.eureka.EurekaHealthCheckHandler.getStatus(EurekaHealthCheckHandler.java:99) [spring-cloud-netflix-eureka-client-2.0.0.RELEASE.jar!/:2.0.0.RELEASE]
        at com.netflix.discovery.DiscoveryClient.refreshInstanceInfo(DiscoveryClient.java:1382) [eureka-client-1.9.2.jar!/:1.9.2]
        at com.netflix.discovery.InstanceInfoReplicator.run(InstanceInfoReplicator.java:117) [eureka-client-1.9.2.jar!/:1.9.2]
        at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) [na:1.8.0_161]
        at java.util.concurrent.FutureTask.run(Unknown Source) [na:1.8.0_161]
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(Unknown Source) [na:1.8.0_161]
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source) [na:1.8.0_161]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [na:1.8.0_161]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [na:1.8.0_161]
        at java.lang.Thread.run(Unknown Source) [na:1.8.0_161]
    Caused by: java.util.concurrent.TimeoutException: Timeout waiting for task.
        at org.elasticsearch.common.util.concurrent.BaseFuture$Sync.get(BaseFuture.java:232) ~[elasticsearch-5.4.0.jar!/:5.4.0]
        at org.elasticsearch.common.util.concurrent.BaseFuture.get(BaseFuture.java:67) ~[elasticsearch-5.4.0.jar!/:5.4.0]
        at org.elasticsearch.action.support.AdapterActionFuture.actionGet(AdapterActionFuture.java:69) ~[elasticsearch-5.4.0.jar!/:5.4.0]
    

    弹性搜索后端是否需要太多时间来响应?

    或者是别的什么?

    不过,简单的查询可以正常工作。

    输入以下内容后,来自Eureka和spring boot admin的通知已停止: 管理.健康.弹性搜索.enabled=false在服务中。

    0 回复  |  直到 6 年前