1

I have a java application that is connecting to elastic search. It also connecting to eureka discovery and registering itself.

I keep on getting notifications that it is going down and up.

I checked the logs, and I see the following error message:

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]

Any ideas what is happening here?

Is the elastic search back-end taking too much time to respond?

Or could it be something else?

Simple queries work fine however.

The notifications from Eureka and spring-boot-admin have stopped after entering: management.health.elasticsearch.enabled=false in the service.

Menelaos
  • 23,508
  • 18
  • 90
  • 155
  • can es be connected? – Addo Zhang Dec 10 '18 at 09:56
  • Possible duplicate of [ElasticSearch health check failed every time when spring boot start up](https://stackoverflow.com/questions/48553706/elasticsearch-health-check-failed-every-time-when-spring-boot-start-up) – Ortomala Lokni Feb 26 '19 at 17:37
  • 1
    I ran into the same problem.You can check my answer in this link.[enter link description here](https://stackoverflow.com/a/63481277/14096450) – Zcyl Aug 20 '20 at 04:31

0 Answers0