要不要再翻翻文档呢?

es7.2连接服务器有的能连上有的不能连上问题

Elasticsearch | 作者 awsl | 发布于2019年08月15日 | 阅读数:7314



java.net.ConnectException: Connection refused: no further information
at org.elasticsearch.client.RestClient.extractAndWrapCause(RestClient.java:804)
at org.elasticsearch.client.RestClient.performRequest(RestClient.java:225)
at org.elasticsearch.client.RestClient.performRequest(RestClient.java:228)
at org.elasticsearch.client.RestClient.performRequest(RestClient.java:228)
at org.elasticsearch.client.RestClient.performRequest(RestClient.java:228)
at org.elasticsearch.client.RestClient.performRequest(RestClient.java:212)
at org.elasticsearch.client.RestHighLevelClient.internalPerformRequest(RestHighLevelClient.java:1448)
at org.elasticsearch.client.RestHighLevelClient.performRequest(RestHighLevelClient.java:1418)
at org.elasticsearch.client.RestHighLevelClient.performRequestAndParseEntity(RestHighLevelClient.java:1388)
at org.elasticsearch.client.RestHighLevelClient.search(RestHighLevelClient.java:930)
at com.asiainfo.day1.RestHighLevelClientHelper.searchIndex(RestHighLevelClientHelper.java:315)
at com.asiainfo.day1.RestHighLevelClientHelper.searchIndex(RestHighLevelClientHelper.java:207)
at com.asiainfo.day1.RestHighLevelClientHelper.main(RestHighLevelClientHelper.java:369)
Suppressed: java.net.ConnectException: Connection refused: no further information
at org.elasticsearch.client.RestClient.extractAndWrapCause(RestClient.java:804)
at org.elasticsearch.client.RestClient.performRequest(RestClient.java:225)
... 10 more
Suppressed: java.net.ConnectException: Timeout connecting to [/1xxxxxxx6.25:23000]
at org.elasticsearch.client.RestClient.extractAndWrapCause(RestClient.java:804)
at org.elasticsearch.client.RestClient.performRequest(RestClient.java:225)
... 9 more
       如图,断点显示是RestHighLevelClient.search()后报的错误,希望各位大神帮忙给点建议
 
 
1565843407.png
已邀请:

bellengao - 博客: https://www.jianshu.com/u/e0088e3e2127

赞同来自:

是否有防火墙限制导致client连接不上某些节点呢

God_lockin

赞同来自:

试一下不用client而是直接用httpclient之类的东西发送request到对应节点里试试
 
个人感觉多半是防火墙/开放端口/黑白名单的问题

sky_ - 程序猿

赞同来自:

请问解决了吗? 我现在遇到同样问题,部署服务器正常 自己本地连接es出错,连接的配置都是一样的

要回复问题请先登录注册