Actuator Elasticsearch healthcheck error
1. 相关环境
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-elasticsearch</artifactId>
<version>2.1.4.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
<version>2.1.4.RELEASE</version>
</dependency>
2. 问题
当引入了spring-boot-start-actuator对项目中elasticsearch进行健康检查时报错:java.lang.NoClassDefFoundError: org/elasticsearch/client/Request

问题排查:
到这个包org.elasticsearch.client中去找,发现确实没有Request类

这个包是在引入spring-boot-starter-data-elasticsearch的时候一起引入进来的

试图改变包的版本,发现只有最新版本2.2.0中包含了org.elasticsearch.client.Request类
但是当我们把版本改到2.2.0的时候又会有新的错误,直接报: java.net.ConnectException: Connection refused,
elasticsearch连不上了。
改变actuator的版本同样不能解决问题。
3. 解决办法
方法一
spring.data.elasticsearch.cluster-name=docker-cluster-50
spring.data.elasticsearch.cluster-nodes=ip:9300
spring.elasticsearch.rest.uris=["http://ip:9200"]
方法二
management.health.elasticsearch.enabled=false
Actuator Elasticsearch healthcheck error的更多相关文章
- es报错org.frameworkset.elasticsearch.ElasticSearchException: {"error":{"root_cause":[{"type":"cluster_block_exception","reason":"blocked by: [FORBIDDEN/12/index read-only / allow delete (api)];"}],
今天es在保存数据的时候报错 org.frameworkset.elasticsearch.ElasticSearchException: {"error":{"root ...
- elasticsearch httpclient认证机制
最近公司单位搬迁,所有的服务都停止了,我负责的elasticsearch不知道怎么回事,一直不能运行呢,因此,我一直在负责调试工作.经过两天的调试工作,我发现新的服务器增加了httpclient认证机 ...
- (转)搭建Elasticsearch和kibana环境
搭建Elasticsearch和kibana环境 作者:IT云清 原文:https://blog.csdn.net/weixin_39800144/article/details/81162002 1 ...
- elk安装(这个是初级的可以把这个套件安上)
http://udn.yyuap.com/doc/logstash-best-practice-cn/index.html ELK其实并不是一款软件,而是一整套解决方案,是三个开源软件Elastics ...
- 日志分析工具ELK配置详解
日志分析工具ELK配置详解 一.ELK介绍 1.1 elasticsearch 1.1.1 elasticsearch介绍 ElasticSearch是一个基于Lucene的搜索服务器.它提供了一个分 ...
- python案例-用户登录
要求: •输入用户名密码 •认证成功后显示欢迎信息 •输错三次后锁定 1 #!/usr/bin/env python 2 # -*- coding:utf-8 -*- 3 4 "" ...
- 笔记:Spring Boot 监控与管理
在微服务架构中,我们将原本庞大的单体系统拆分为多个提供不同服务的应用,虽然,各个应用的内部逻辑因分解而简化,但由于部署的应用数量成倍增长,使得系统的维护复杂度大大提升,为了让运维系统能够获取各个为服务 ...
- ELK基础架构解说-运维笔记
一.ELK日志分析工具介绍1) Elasticsearch1.1) Elasticsearch介绍ElasticSearch是一个基于Lucene的搜索服务器.它提供了一个分布式多用户能力的全文搜索 ...
- Spring Boot 监控与管理
在微服务架构中,我们将原本庞大的单体系统拆分为多个提供不同服务的应用,虽然,各个应用的内部逻辑因分解而简化,但由于部署的应用数量成倍增长,使得系统的维护复杂度大大提升,为了让运维系统能够获取各个为服务 ...
随机推荐
- Jupyter安装和环境配置
配置: 1. 命令行启动 jupyter notebook 2. 也可以Anaconda直接启动 3. 设置token,如下图所示,命令行中输入 jupyter notebook list C:\Us ...
- 菜单项(Menu)的初步认识 以及 多级菜单(SubMenu)的初步认识
MainActivity.class public class MainActivity extends AppCompatActivity { private TextView textView; ...
- 01_Hive简介及其工作机制
1.Hive简介 Hive是一个基于Hadoop的一个数据仓库工具,可以将结构化的数据文件映射为一个表.并提供类SQL查询功能, 可以将sql语句转换为MapReduce任务运行.其优点是学习成本低, ...
- D. Connected Components Croc Champ 2013 - Round 1 (并查集+技巧)
292D - Connected Components D. Connected Components time limit per test 2 seconds memory limit per t ...
- TestNG-Annotations
@BeforeSuite The annotated method will be run before all tests in this suite have run. @AfterSuite ...
- 低级键盘钩子,在WIN7以上版本的问题
最近在项目用到低级键盘钩子.发现一个很奇怪的事情,在开发环境和测试环境下都正常运行的键盘钩子, 到了现场环境,总是偶发性出现 键盘钩子不能用了,而且退出时产生1404 错误. 后经过阅读MSDN 的R ...
- glRenderbufferStorageMultisample
https://www.khronos.org/registry/OpenGL-Refpages/es3.0/html/glRenderbufferStorage.xhtml https://www. ...
- Java中的集合Collection、Iterator和Foreach用法(一)
1.Java集合概述 在编程中,常常需要集中存放多个数据.当然我们可以使用数组来保存多个对象.但数组长度不可变化,一旦在初始化时指定了数组长度,则这个数组长度是不可变的,如果需要保存个数变化的数据,数 ...
- [Sping Boot] Build a REST CRUD API with Hibernate
pom.xml: <dependencies> <dependency> <groupId>org.springframework.boot</groupId ...
- AfxMessageBox与MessageBox用法与区别
https://blog.csdn.net/holybin/article/details/28403109 MessageBox()是标准的Win32 API函数,可以直接使用: AfxMessag ...