要不要也来分享分享一下啊

springboot整合elasticsearch链接报错,错误如下,怎么解决?

Elasticsearch | 作者 zhoun | 发布于2017年09月25日 | 阅读数:11401

2017-09-25 11:41:28.855  INFO 8756 --- [][generic][T#1]] org.elasticsearch.client.transport       : [Ghaur] failed to get node info for {#transport#-1}{192.168.3.50}{192.168.3.50:9200}, disconnecting...

org.elasticsearch.transport.ReceiveTimeoutTransportException: [][192.168.3.50:9200][cluster:monitor/nodes/liveness] request_id [93] timed out after [5000ms]
    at org.elasticsearch.transport.TransportService$TimeoutHandler.run(TransportService.java:698) ~[elasticsearch-2.4.4.jar:2.4.4]
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_102]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_102]
    at java.lang.Thread.run(Thread.java:745) [na:1.8.0_102]

2017-09-25 11:41:38.861  INFO 8756 --- [][generic][T#1]] org.elasticsearch.client.transport       : [Ghaur] failed to get node info for {#transport#-1}{192.168.3.50}{192.168.3.50:9200}, disconnecting...

org.elasticsearch.transport.ReceiveTimeoutTransportException: [][192.168.3.50:9200][cluster:monitor/nodes/liveness] request_id [94] timed out after [5000ms]
    at org.elasticsearch.transport.TransportService$TimeoutHandler.run(TransportService.java:698) ~[elasticsearch-2.4.4.jar:2.4.4]
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_102]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_102]
    at java.lang.Thread.run(Thread.java:745) [na:1.8.0_102]

2017-09-25 11:41:48.866  INFO 8756 --- [][generic][T#1]] org.elasticsearch.client.transport       : [Ghaur] failed to get node info for {#transport#-1}{192.168.3.50}{192.168.3.50:9200}, disconnecting...

org.elasticsearch.transport.ReceiveTimeoutTransportException: [][192.168.3.50:9200][cluster:monitor/nodes/liveness] request_id [95] timed out after [5001ms]
    at org.elasticsearch.transport.TransportService$TimeoutHandler.run(TransportService.java:698) ~[elasticsearch-2.4.4.jar:2.4.4]
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_102]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_102]
    at java.lang.Thread.run(Thread.java:745) [na:1.8.0_102]

2017-09-25 11:41:58.872  INFO 8756 --- [][generic][T#1]] org.elasticsearch.client.transport       : [Ghaur] failed to get node info for {#transport#-1}{192.168.3.50}{192.168.3.50:9200}, disconnecting...

org.elasticsearch.transport.ReceiveTimeoutTransportException: [][192.168.3.50:9200][cluster:monitor/nodes/liveness] request_id [96] timed out after [5002ms]
    at org.elasticsearch.transport.TransportService$TimeoutHandler.run(TransportService.java:698) ~[elasticsearch-2.4.4.jar:2.4.4]
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_102]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_102]
    at java.lang.Thread.run(Thread.java:745) [na:1.8.0_102]

2017-09-25 11:42:08.877  INFO 8756 --- [][generic][T#1]] org.elasticsearch.client.transport       : [Ghaur] failed to get node info for {#transport#-1}{192.168.3.50}{192.168.3.50:9200}, disconnecting...

org.elasticsearch.transport.ReceiveTimeoutTransportException: [][192.168.3.50:9200][cluster:monitor/nodes/liveness] request_id [97] timed out after [5000ms]
    at org.elasticsearch.transport.TransportService$TimeoutHandler.run(TransportService.java:698) ~[elasticsearch-2.4.4.jar:2.4.4]
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_102]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_102]
    at java.lang.Thread.run(Thread.java:745) [na:1.8.0_102]

2017-09-25 11:42:18.882  INFO 8756 --- [][generic][T#1]] org.elasticsearch.client.transport       : [Ghaur] failed to get node info for {#transport#-1}{192.168.3.50}{192.168.3.50:9200}, disconnecting...

org.elasticsearch.transport.ReceiveTimeoutTransportException: [][192.168.3.50:9200][cluster:monitor/nodes/liveness] request_id [98] timed out after [5001ms]
    at org.elasticsearch.transport.TransportService$TimeoutHandler.run(TransportService.java:698) ~[elasticsearch-2.4.4.jar:2.4.4]
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_102]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_102]
    at java.lang.Thread.run(Thread.java:745) [na:1.8.0_102]

2017-09-25 11:42:28.887  INFO 8756 --- [][generic][T#1]] org.elasticsearch.client.transport       : [Ghaur] failed to get node info for {#transport#-1}{192.168.3.50}{192.168.3.50:9200}, disconnecting...

org.elasticsearch.transport.ReceiveTimeoutTransportException: [][192.168.3.50:9200][cluster:monitor/nodes/liveness] request_id [99] timed out after [5000ms]
    at org.elasticsearch.transport.TransportService$TimeoutHandler.run(TransportService.java:698) ~[elasticsearch-2.4.4.jar:2.4.4]
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_102]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_102]
    at java.lang.Thread.run(Thread.java:745) [na:1.8.0_102]

 
已邀请:

hufuman

赞同来自:

1. 能否ping通192.168.3.50
2. ES的版本是什么
3. 用的什么ES客户端,是rest的?如果是transport的话,端口9200不对,应该用9300
 

赞同来自:

看你的错误信息你应该使用的是transport客户端,transport使用的是9300端口
http rest客户端才使用的是9200.

hufuman

赞同来自:

1. 在浏览器里访问、http://192.168.3.50:9200试试,有可能是ES绑定的IP不是这个[/url]
2. 程序里9200端口改成9300试试,我怀疑你没搞清楚transport和httprest的端口区别

zhoun

赞同来自:

在大神的帮助下解决了  原因是端口配置的不对,端口配置应该对应配置文件里的transport.tcp.port: 9500


 

要回复问题请先登录注册