zoukankan      html  css  js  c++  java
  • 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_64elasticsearch-7.5.0logmy-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]",

     试下按提示修改下版本。

  • 相关阅读:
    表数据转换为insert语句
    Google Map Api 谷歌地图接口整理
    VS预生成事件命令行 和 生成后事件命令行
    C#程序开机运行
    枚举数据源化
    winform分页管理
    数据库访问驱动
    sql时间格式
    sysobjects.xtype介绍
    编码标准的多样性
  • 原文地址:https://www.cnblogs.com/ljy-1471914707/p/12310406.html
Copyright © 2011-2022 走看看