Elasticsearch整合SpringBoot

首先大家在整合的时候一定要注意版本兼容问题,此问题尤为重要

Elasticsearch简称Es

  在使用SpringBoot整合Elasticsearch运行时报NoNodeAvailableException[None of the configured nodes are available: [{#transport#-1}{192.111.222.5}{192.111.222.5:9300}]]

导致原因:

  1. 集群名称/IP/端口可能填写与Es 服务端配置不一致
  2. 整合后当前SpringBoot版本和当前Data-ealsticsearch版本是否兼容
  3. 当前Data-ealsticsearch版本是否与Es Service端版本兼容
  4. Es和Boot是否有关依赖冲突。

解决方案:

  1. 检查Es 服务端配置文件,查看集群名称,IP地址,与项目Application.yaml/配置类进行对比,从而矫正。

  2. 注意SpringBoot版本和Data-Elasticsearch,具体版本兼容可参考官方文档:官方文档

  3. 检查项目Elasticsearch版本 是否 与Es服务端版本兼容,具体版本兼容可参考官方文档:官方文档

注意:如果是连接虚拟机或者外网的话,查看虚拟机是否开放了9300端口号,可尝试关闭防火墙重新连接试试。

Centos7:

关闭防火墙:systemctl stop firewalld

start :启动防火墙

查看已经开启的端口:firewall-cmd --list-ports

firewall-cmd --zone=public --add-port=xx/tcp --permanent :开放端口

提示success即可

重启防火墙: firewall-cmd --reload

Elasticsearch+SpringBoot报NoNodeAvailableException解决方案的更多相关文章

  1. org.elasticsearch.client.transport.NoNodeAvailableException

    SpringBoot连接elasticsearch异常 2018-09-11 16:03:43.692 ERROR 8684 --- [ main] o.s.boot.SpringApplicatio ...

  2. 解决Spring Boot(2.1.3.RELEASE)整合spring-data-elasticsearch3.1.5.RELEASE报NoNodeAvailableException[None of the configured nodes are available

    Spring Boot(2.1.3.RELEASE)整合spring-data-elasticsearch3.1.5.RELEASE报NoNodeAvailableException[None of ...

  3. Spring Boot整合Elasticsearch启动报错

    如果你遇见下面的错误,很可能是你的springboot和es版本关系不对应 ERROR 14600 --- [ main] .d.e.r.s.AbstractElasticsearchReposito ...

  4. RabbitMQ>Erlang machine stopped instantly (distribution name conflict?). The service is not restarted as OnFail is set to ignore.-报错解决方案 原来是NNND。。。

    >Erlang machine stopped instantly (distribution name conflict?). The service is not restarted as ...

  5. Updates were rejected because the remote contains work that you do(git报错解决方案)

    Updates were rejected because the remote contains work that you do(git报错解决方案) 今天向GitHub远程仓库提交本地项目文件时 ...

  6. JMeter 报告监听器导入.jtl结果文件报错解决方案

    JMeter 报告监听器导入.jtl结果文件报错解决方案   by:授客 QQ:1033553122   1. 问题描述 把jmeter压测时生成的 .jtl结果文件导入监听器报告中,弹出如下错误提示 ...

  7. Python3.x:import urllib2报错解决方案

    Python:import urllib2报错解决方案 python2和3有些不一样: python2:输出为print 'hello world' python3:输出为print('hello w ...

  8. ElasticSearch reindex报错:the final mapping would have more than 1 type

    ElasticSearch reindex报错:the final mapping would have more than 1 type 学习了:https://blog.csdn.net/qq_2 ...

  9. Linux安装ElasticSearch启动报错的解决方法

    Linux安装ElasticSearch后,ElasticSearch是不能用root用户启动的,以root用户启动会报错Refer to the log for complete error det ...

随机推荐

  1. 题解 洛谷 P3726 【[AH2017/HNOI2017]抛硬币】

    可以分别枚举两人正面朝上的次数来统计答案,所求即为 \[\sum_{i=0}^{a}\sum_{j=0}^{b} \binom{a}{i} \binom{b}{j} [i>j] \] 将\(i\ ...

  2. 线上CUP负载过高排查方法

      1.top命令查看线程占据的CPU 注意:上面行的cpu是多个内核的平均CPU,不可能超过100% 下面的cpu是每个进程实际占用的cpu,可能超过100% 备注:查看多个内核cpu,只需要在输入 ...

  3. websocket推送进度条百分比给前台

    说明:后台springboot项目 前台vue+element-UI 直接放代码: //别忘了开启springboot的websocket <dependency> <groupId ...

  4. hostapd阅读(openwrt)-1

    好久没有来博客园写点东西了,这段时间主要搞了openwrt系统的移植,无线的校验等相关工作,鉴于我是一个懒惰的大龄菜鸟程序员,就先自我原谅自己了,好了废话少说,直奔主题--hostapd. 由于我主要 ...

  5. ubuntu 12.04无盘工作站

    注释:该篇博文是借鉴下列文章加上自己实践总结得来: a. http://forum.ubuntu.org.cn/viewtopic.php?f=77&t=117754 b. http://bl ...

  6. python基础--14大内置模块(上)

    python的内置模块(重点掌握以下模块) 什么是模块 常见的场景:一个模块就是一个包含了python定义和声明的文件,文件名就是模块名字加上.py的后缀. 但其实import加载的模块分为四个通用类 ...

  7. SYN 攻击原理及解决方法

    原理SYN foold攻击主要针对tcp通信三次握手期间做的手脚,所以要弄懂这个攻击的原理我们首先必须知道tcp三次握手的详细过程 由上图可知tcp三次握手顾名思义要经过三个步骤,这三个步骤分别是 客 ...

  8. 使用Faker库生成模拟数据

    一.相关文档 该库在laravel框架中默认已经存在,无需手动进行安装.使用参考文档: https://packagist.org/packages/fzaninotto/faker 二.简单示例 & ...

  9. 最长公共子序列dp入门

    #include <iostream> #include <string> #include <string.h> #include <vector> ...

  10. vue脚手架创建项目名字报错

    vue inti webpack TimeManger 报错 Sorry, name can no longer contain capital letters 原来这个capital是大写的意思,上 ...