(轉)Elasticsearch NoNodeAvailableException None of the configured nodes are available


問題背景:
將es部署到內網中兩台服務器,其Ip地址分別為:192.111.222.5,192.111.222.1(部署方式完全一樣,是將192.111.222.1服務器上es整個部署包,拷貝到了192.111.222.5,包括索引文件)。
在開發本機(IP:192.111.222.36)通過idea編譯直接運行代碼,從而連接對應es的服務器,連接192.111.222.1就沒有任何問題,但連接192.111.222.5,就會報出異常,具體異常信息如下:

 
1
2
3
4
5
6
7
8
9
10
NoNodeAvailableException[None of the configured nodes are available: [{#transport#- 1 }{ 192.111 . 222.5 }{ 192.111 . 222.5 : 9300 }]]
at org.elasticsearch.client.transport.TransportClientNodesService.ensureNodesAreAvailable(TransportClientNodesService.java: 290 )
     at org.elasticsearch.client.transport.TransportClientNodesService.execute(TransportClientNodesService.java: 207 )
     at org.elasticsearch.client.transport.support.TransportProxyClient.execute(TransportProxyClient.java: 55 )
     at org.elasticsearch.client.transport.TransportClient.doExecute(TransportClient.java: 286 )
     at org.elasticsearch.client.support.AbstractClient.execute(AbstractClient.java: 351 )
     at org.elasticsearch.client.support.AbstractClient$IndicesAdmin.execute(AbstractClient.java: 1187 )
     at org.elasticsearch.action.ActionRequestBuilder.execute(ActionRequestBuilder.java: 85 )
     at org.elasticsearch.action.ActionRequestBuilder.execute(ActionRequestBuilder.java: 59 )
     at org.elasticsearch.action.ActionRequestBuilder.get(ActionRequestBuilder.java: 67 )

解決辦法:將192.111.222.5服務器上配置文件elasticsearch.yml,具體位置如下
這里寫圖片描述
修改配置文件中的network.host項,將network.host: 0.0.0.0修改為本機ipnetwork.host: 192.111.222.5,搞定。
具體如下:
這里寫圖片描述

但有個問題就是192.111.222.1配置文件中的network.host項一直為network.host: 0.0.0.0,但可以正常訪問啊,為什么192.111.222.5就需要修改為本機ip了?暫時沒有搞清楚,希望有知道的朋友,留個言,幫我解一下惑。

轉自:https://www.2cto.com/kf/201611/571168.html


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM