• 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]",

     试下按提示修改下版本。

  • 相关阅读:
    **没有规则可以创建“XXX”需要的目标“XXX”问题的解决方案
    牛逼博主
    tiny4412 busybox制作根文件系统rootfs nfs 挂载 ubuntu 14.04
    解决 mounting /dev/block/mmcblk0p1 on /sdcard failed
    如何在虚拟机上配置hadoop集群
    数据结构线性表
    a伪类,关于图片
    脱离标准文档流(2)---定位
    脱离标准文档流(1)---浮动
    初窥css---盒子以及盒子扩展
  • 原文地址:https://www.cnblogs.com/ljy-1471914707/p/12310406.html
Copyright © 2020-2023  润新知