码迷,mamicode.com
首页 > 其他好文 > 详细

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

时间:2020-02-15 09:43:06      阅读:67      评论:0      收藏:0      [点我收藏+]

标签:ensure   不可   tno   col   cfs   str   config   thread   name   

   连接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]",

 试下按提示修改下版本。

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

标签:ensure   不可   tno   col   cfs   str   config   thread   name   

原文地址:https://www.cnblogs.com/ljy-1471914707/p/12310406.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!