连接elasticsearch已经成功,但是会报以下错误,字面意思是节点不可用这样

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

除了网上提到的常见问题,例如cluster.name,port不匹配(默认访问url端口是9200,但是连接端口是9300)之外,还要留意引进的transport的版本有没有问题。

找到安装目录下的日志F:\elasticsearch-7.5.0-windows-x86_64\elasticsearch-7.5.0\log\my-application_server.json,有输出过下面的问题:

--15T00::,+:", "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:, remoteAddress=/127.0.0.1:}], 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的更多相关文章

  1. Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory

    学习架构探险,从零开始写Java Web框架时,在学习到springAOP时遇到一个异常: "C:\Program Files\Java\jdk1.7.0_40\bin\java" ...

  2. Exception in thread "main" java.lang.NoSuchMethodError: org.objectweb.asm.ClassWriter.<init>(I)V

    在学习CGlib动态代理时,遇到如下错误: Exception in thread "main" java.lang.NoSuchMethodError: org.objectwe ...

  3. GUI学习中错误Exception in thread "main" java.lang.NullPointerException

    运行时出现错误:Exception in thread "main" java.lang.NullPointerException 该问题多半是由于用到的某个对象只进行了声明,而没 ...

  4. 执行打的maven jar包时出现“Exception in thread "main" java.lang.SecurityException: Invalid signature file digest for Manifest main attributes”

    Exception in thread "main" java.lang.SecurityException: Invalid signature file digest for ...

  5. 在运行Hibernate Hello World程序的时候,抛如下错误: view plain Exception in thread "main" org.hibernate.exception.LockAcquisitionException 解决方法

    在运行Hibernate Hello World程序的时候,抛如下错误: Exception in thread "main" org.hibernate.exception.Lo ...

  6. Exception in thread "main" java.lang.ExceptionInInitializerError

    Exception in thread "main" java.lang.ExceptionInInitializerErrorCaused by: java.util.Missi ...

  7. 编译运行java程序出现Exception in thread "main" java.lang.UnsupportedClassVersionError: M : Unsupported major.minor version 51.0

    用javac编译了一个M.java文件, 然后用java M执行,可是出现了下面这个错误. Exception in thread "main" java.lang.Unsuppo ...

  8. dom4j使用xpath报异常 Exception in thread "main" java.lang.NoClassDefFoundError: org/jaxen/NamespaceContext

    Exception in thread "main" java.lang.NoClassDefFoundError: org/jaxen/NamespaceContext      ...

  9. Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 1

    场景:eclipse中编写java中用到数组 问题: 程序不报错但是运行过程中 终止,显示字样 “ Exception in thread "main" java.lang.Arr ...

随机推荐

  1. Java实现 蓝桥杯VIP 算法训练 数组查找及替换问题

    描述 给定某整数数组和某一整数b.要求删除数组中可以被b整除的所有元素,同时将该数组各元素按从小到大排序.如果数组元素数值在A到Z的ASCII之间,替换为对应字母.元素个数不超过100,b在1至100 ...

  2. java实现数组转置

    ** 数组转置** 编写程序将2行3列的数组行列置换复制给3行2列的数组(即数组的转置).已经写了如下代码,请完善之: class y{ public static void main(String[ ...

  3. PAT甲级 Reversible Primes

    描述 A reversible prime in any number system is a prime whose "reverse" in that number syste ...

  4. Python基础语法之“print()”函数

    print()函数是Python入门的第一个必学知识点,它经常被用来调试已写的代码,检验效果,今天小老鼠就带你盘点一下print()函数在Python中如何使用. print()函数的工作流程是这样的 ...

  5. 不可不知的JSON处理库(cJSON)

    ANSI C中的超轻量级JSON解析器 JSON(JavaScript对象表示法)是一种轻量级的数据交换格式.人类易于阅读和书写.机器很容易解析和生成.它基于JavaScript编程语言标准ECMA- ...

  6. ZooKeeper 基础入门

    什么是ZooKeeper Apache ZooKeeper 是一个开源的实现高可用的分布式协调服务器.ZooKeeper是一种集中式服务,用于维护配置信息,域名服务,提供分布式同步和集群管理.所有这些 ...

  7. 1.Redis Lock

    使用场景 同步锁,让业务方法在锁设定的时间内是同步执行的 redisService.setIfAbsent redisService.expire @PostMapping("/update ...

  8. Photoshop 使用过程中遇到的问题

    1.关于图片像素 根据不同用途设置不同的分辨率: 印洗照片300像素及以上, 高清写真海报96-200像素, 网络图片网页界面72像素, 大型喷绘25到50像素

  9. 658.找到K个最接近的元素

    2020-03-10 找到 K 个最接近的元素 给定一个排序好的数组,两个整数 k 和 x,从数组中找到最靠近 x(两数之 差最小)的 k 个数.返回的结果必须要是按升序排好的.如果有两个数与 x 的 ...

  10. flex弹性模型

    flex模型是w3c最新提出的一种盒子模型,很好的解决了普通模型的一些弊端. 一.比较两种盒子模型: demo: 给div添加边框,观察他们的区别 <body> <div class ...