Exception in thread "main" NoNodeAvailableException[None of the configured nodes are available


   連接elasticsearch已經成功,但是會報以下錯誤,字面意思是節點不可用這樣

Exception in thread "main" NoNodeAvailableException[None of the configured nodes are available: [{#transport#-1}{q-OhKPN_TjaYVSUpgbNQGQ}{127.0.0.1}{127.0.0.1:9300}]]
    at org.elasticsearch.client.transport.TransportClientNodesService.ensureNodesAreAvailable(TransportClientNodesService.java:347)
    at org.elasticsearch.client.transport.TransportClientNodesService.execute(TransportClientNodesService.java:245)
    at org.elasticsearch.client.transport.TransportProxyClient.execute(TransportProxyClient.java:60)
    at org.elasticsearch.client.transport.TransportClient.doExecute(TransportClient.java:371)
    at org.elasticsearch.client.support.AbstractClient.execute(AbstractClient.java:405)
    at org.elasticsearch.client.support.AbstractClient.execute(AbstractClient.java:394)
    at org.elasticsearch.client.support.AbstractClient$IndicesAdmin.execute(AbstractClient.java:1247)
    at org.elasticsearch.action.ActionRequestBuilder.execute(ActionRequestBuilder.java:46)
    at com.lin.TestClient.main(TestClient.java:47)

    除了網上提到的常見問題,例如cluster.name,port不匹配(默認訪問url端口是9200,但是連接端口是9300)之外,還要留意引進的transport的版本有沒有問題。

找到安裝目錄下的日志F:\elasticsearch-7.5.0-windows-x86_64\elasticsearch-7.5.0\log\my-application_server.json,有輸出過下面的問題:

2020-02-15T00:18:53,334+08:00", "level": "WARN", "component": "o.e.t.TcpTransport", "cluster.name": "my-application", "node.name": "DESKTOP-R3BLRIN", "message": "exception caught on transport layer [Netty4TcpChannel{localAddress=/127.0.0.1:9300, remoteAddress=/127.0.0.1:11931}], closing connection", "cluster.uuid": "HXtKTVCFSTiibfJBiea7tw", "node.id": "9juaKZHLQCWgm0G9oIe_kw" , 
"stacktrace": ["java.lang.IllegalStateException: Received message from unsupported version: [6.2.4] minimal compatible version is: [6.8.0]",

 試下按提示修改下版本。


免責聲明!

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



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