Environment:
- JDK 1.8.0_301
- Grails 5.0.2
- Spring Boot 2.5.7
- Groovy 3.0.7
- Elasticsearch 7.10.2 (also tried 7.12.1)
Situation:
Hi dear colleagues, could you please clarify the error while sniffing nodes.
Task:
Running successfully Gateway service which is using management health check internally designed by Spring
Actions:
Found here asked before but seems log wasn't provided fully.
Result
Facing the following error:
2021-12-08 06:29:17.245 ERROR 7688 --- [nt_sniffer[T#1]] org.elasticsearch.client.sniff.Sniffer : error while sniffing nodes
java.net.ConnectException: Timeout connecting to [localhost/127.0.0.1:9200]
at org.elasticsearch.client.RestClient.extractAndWrapCause(RestClient.java:880) ~[elasticsearch-rest-client-7.12.1.jar:7.12.1]
at org.elasticsearch.client.RestClient.performRequest(RestClient.java:283) ~[elasticsearch-rest-client-7.12.1.jar:7.12.1]
at org.elasticsearch.client.RestClient.performRequest(RestClient.java:270) ~[elasticsearch-rest-client-7.12.1.jar:7.12.1]
at org.elasticsearch.client.sniff.ElasticsearchNodesSniffer.sniff(ElasticsearchNodesSniffer.java:105) ~[elasticsearch-rest-client-sniffer-7.12.1.jar:7.12.1]
at org.elasticsearch.client.sniff.Sniffer.sniff(Sniffer.java:208) ~[elasticsearch-rest-client-sniffer-7.12.1.jar:7.12.1]
at org.elasticsearch.client.sniff.Sniffer$Task.run(Sniffer.java:138) ~[elasticsearch-rest-client-sniffer-7.12.1.jar:7.12.1]
at org.elasticsearch.client.sniff.Sniffer$1.run(Sniffer.java:81) [elasticsearch-rest-client-sniffer-7.12.1.jar:7.12.1]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [na:1.8.0_301]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) [na:1.8.0_301]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180) [na:1.8.0_301]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) [na:1.8.0_301]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [na:1.8.0_301]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [na:1.8.0_301]
at java.lang.Thread.run(Thread.java:748) [na:1.8.0_301]
Caused by: java.net.ConnectException: Timeout connecting to [localhost/127.0.0.1:9200]
at org.apache.http.nio.pool.RouteSpecificPool.timeout(RouteSpecificPool.java:169) ~[httpcore-nio-4.4.14.jar:4.4.14]
at org.apache.http.nio.pool.AbstractNIOConnPool.requestTimeout(AbstractNIOConnPool.java:632) ~[httpcore-nio-4.4.14.jar:4.4.14]
at org.apache.http.nio.pool.AbstractNIOConnPool$InternalSessionRequestCallback.timeout(AbstractNIOConnPool.java:898) ~[httpcore-nio-4.4.14.jar:4.4.14]
at org.apache.http.impl.nio.reactor.SessionRequestImpl.timeout(SessionRequestImpl.java:198) ~[httpcore-nio-4.4.14.jar:4.4.14]
at org.apache.http.impl.nio.reactor.DefaultConnectingIOReactor.processTimeouts(DefaultConnectingIOReactor.java:213) ~[httpcore-nio-4.4.14.jar:4.4.14]
at org.apache.http.impl.nio.reactor.DefaultConnectingIOReactor.processEvents(DefaultConnectingIOReactor.java:158) ~[httpcore-nio-4.4.14.jar:4.4.14]
at org.apache.http.impl.nio.reactor.AbstractMultiworkerIOReactor.execute(AbstractMultiworkerIOReactor.java:351) ~[httpcore-nio-4.4.14.jar:4.4.14]
at org.apache.http.impl.nio.conn.PoolingNHttpClientConnectionManager.execute(PoolingNHttpClientConnectionManager.java:221) ~[httpasyncclient-4.1.4.jar:4.1.4]
at org.apache.http.impl.nio.client.CloseableHttpAsyncClientBase$1.run(CloseableHttpAsyncClientBase.java:64) ~[httpasyncclient-4.1.4.jar:4.1.4]
... 1 common frames omitted
Thanks in advance