解决 Spring Cloud 整合 zipkin 报错:org.springframework.boot.actuate.health.CompositeHealthIndicator......

article/2025/11/9 11:33:31

文章目录

      • 一、问题描述
      • 二、解决方法

一、问题描述

     我的 Spring Boot 版本是 2.3.4,Spring Cloud 版本是 Hoxton.SR1。
要整合 zipkin,先在服务端导入了以下依赖:

	<dependencies><dependency><groupId>io.zipkin.java</groupId><artifactId>zipkin-server</artifactId><version>2.9.4</version><exclusions><exclusion><groupId>org.apache.logging.log4j</groupId><artifactId>log4j-slf4j-impl</artifactId></exclusion></exclusions></dependency><dependency><groupId>io.zipkin.java</groupId><artifactId>zipkin-autoconfigure-ui</artifactId><version>2.9.4</version></dependency></dependencies>

    
提供配置文件:

server:port: 9090
spring:main:allow-bean-definition-overriding: true

    
然后提供启动类:

@SpringBootApplication
@EnableZipkinServer
public class ZipKinApplication {public static void main(String[] args) {SpringApplication.run(ZipKinApplication.class,args);}
}

接下来,运行 zipkinserver 启动类,结果报错了:
在这里插入图片描述


把整个报错信息复制下来是这样的:
Description:

An attempt was made to call a method that does not exist. The attempt was made from the following location:
zipkin.server.internal.ZipkinHealthIndicator.(ZipkinHealthIndicator.java:26)

The following method did not exist:
org.springframework.boot.actuate.health.CompositeHealthIndicator.(Lorg/springframework/boot/actuate/health/HealthAggregator;)V

The method’s class, org.springframework.boot.actuate.health.CompositeHealthIndicator, is available from the following locations:
jar:file:/D:/Maven/maven_repository/org/springframework/boot/spring-boot-actuator/2.3.4.RELEASE/spring-boot-actuator-2.3.4.RELEASE.jar!/org/springframework/boot/actuate/health/CompositeHealthIndicator.class

The class hierarchy was loaded from the following locations:
org.springframework.boot.actuate.health.CompositeHealthIndicator: file:/D:/Maven/maven_repository/org/springframework/boot/spring-boot-actuator/2.3.4.RELEASE/spring-boot-actuator-2.3.4.RELEASE.jar

Action:

Correct the classpath of your application so that it contains a single, compatible version of org.springframework.boot.actuate.health.CompositeHealthIndicator


     大意是说 试图调用不存在的方法 zipkin.server.internal.ZipkinHealthIndicator 方法,但是在启动类中 @EnableConfigServer 注解是没有爆红的,import zipkin.server.internal.EnableZipkinServer; 是导入没问题的:

在这里插入图片描述

     我照着 它说重复了的 jar 包的路径 The class hierarchy was loaded from the following locations: 把 jar 包删掉,结果连 eureka 注册中心都报错了… …
     问题在于, SpringBoot2.2.x 以后的版本 集成 zipkin 的方式改变了,原来是通过@EnablezipkinServer注解,现在这个注解不起作用了。
    

二、解决方法

     服务端应该通过下载 jar 包,然后 运行 jar 包来集成 。 在 https://dl.bintray.com/openzipkin/maven/io/zipkin/java/zipkin-server/ 可以选择版本来下载,要选择 后缀为 -exec.jar 的(我的 Spring Boot 是 2.3.4 ,选择的 zipkin 是 2.12.8,是可以用的 ),之后切换到 jar 包在的路径,然后用 java -jar 的方式启动就可以了(默认端口号是 9411 ,所以如果提供了 zipkin client,需要把它的配置文件中的端口号改成 9411,对应的配置应该是 zipkin: base-url: http://localhost:9411):
在这里插入图片描述


http://chatgpt.dhexx.cn/article/Od2IlPii.shtml

相关文章

NoClassDefFoundError: org/springframework/boot/actuate/web/trace/servlet/HttpTraceFilter

线上项目运行期间报错&#xff1a;java.lang.NoClassDefFoundError: org/springframework/boot/actuate/web/trace/servlet/HttpTraceFilter$CustomStatusResponseWrapper 提示class找不到&#xff0c;百思不得其解&#xff0c;sping的jar咋会找不到&#xff0c;最后怀疑是打包…

org/springframework/boot/actuate/metrics/cache/CacheMeterBinderProvider not found. Make sure your ow

报错信息如下 java.lang.IllegalStateException: Could not evaluate condition on org.springframework.boot.actuate.autoconfigure.EndpointWebMvcAutoConfiguration$EndpointWebMvcConfiguration due to org/springframework/boot/actuate/metrics/cache/CacheMeterBinder…

spring boot 源码解析52-actuate中MVCEndPoint解析

前言 之前的几篇文章分析了spring boot 中有关endpoint的实现,细心的朋友可以发现,在org.springframework.boot.actuate.endpoint.mvc 包下也有一系列的xxxEndpoint,这又是为什么呢? 原因是: 我们很多情况下,都是访问接口的方式获取应用的监控,之前的分析是其实现的底层,要想…

Unable to identify any set of controllers that can actuate the specified joints:

提示&#xff1a;文章写完后&#xff0c;目录可以自动生成&#xff0c;如何生成可参考右边的帮助文档 文章目录 背景一、解决办法二、总结 背景 具体的报错如下&#xff1a; [ERROR] [1649324583.023988413]: Unable to identify any set of controllers that can actuate the…

springboot整合Actuator监控

springboot整合Actuator监控。 1.简要说明&#xff1a; Actuator提供了对springboot应用程序监视和管理的能力&#xff0c;可以选择通过使用HTTP Endpoint或者使用JMX来管理和监控springboot应用程序。 Actuator 允许通过Endpoints对springboot进行监控和交互。springboot内…

项目监控之Spring Boot 监控端点 Actuator 入门

1. 概述 应用在部署在生产环境下&#xff0c;我们还需要考虑应用的管理与监控。例如说&#xff0c;应用是否健康存活、应用的 JVM 监控信息、服务器的监控信息&#xff08;CPU、内存、磁盘等等&#xff09;。 如果我们为应用的管理与监控做相应的开发&#xff0c;是需要一定的…

spring boot 源码解析23-actuate使用及EndPoint解析

前言 spring boot 中有个很诱人的组件–actuator,可以对spring boot应用做监控,只需在pom文件中加入如下配置即可: <dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-actuator</artifactId></depen…

ESXi挂载NFS共享存储

通常VMware的整体架构由三个部分组成&#xff0c;虚拟化环境&#xff08;包括ESXi与vCenter以及VM&#xff09;&#xff0c;交换机&#xff08;通常为万兆交换机或光纤交换机&#xff09;&#xff0c;存储&#xff08;netap、EMC等&#xff09;。使用光纤交换机&#xff0c;ESX…

Docker容器中挂载NFS共享目录

之前在https://blog.csdn.net/fengbingchun/article/details/110561129 介绍过使用Dockerfile构建ubuntu 16.04镜像,并在容器中编译执行Messy_Test项目.这里介绍下如何在容器中挂载NFS服务器上的共享目录. Dockerfile内容如下&#xff1a; FROM ubuntu:16.04 LABEL maintaine…

LINUX 下创建NFS共享目录

Linux下创建NFS共享目录的步骤如下 实验中服务器端IP为10.201.86.204&#xff0c;客户端IP为10.201.86.2051.在服务器端格式化需要共享的磁盘 fdisk /dev/sdb mkfs.xfs -f /dev/sdb12.安装NFS软件包 Server端和客户端都要安装 rpm -qa |grep nfs-utils rpm -qa |grep rpcb…

NFS共享存储服务介绍与案例详细配置过程

目录 1&#xff0c;什么是NFS?2&#xff0c;NFS工作原理3&#xff0c;使用NFS发布共享资源4&#xff0c;NFS 挂载原理5&#xff0c;NFS服务所需软件及主要配置文件安装NFS服务&#xff0c;需要安装两个软件&#xff0c;分别是&#xff1a; 6&#xff0c; NFS的相关文件&#x…

NFS 共享目录

今天用迅为的itop-4412的开发板 挂载nfs 把流程写一下&#xff0c;和遇到的问题。图片用的开发手册的图片 我有的没截图 1、搭建 NFS 服务器 实现 NFS&#xff0c;需要一个主机作为 NFS 服务器&#xff0c;选择虚拟机 Ubuntu 作为主机。首先需要在 在虚拟机 Ubuntu 上安装 Ub…

Linux的NFS共享目录

准备工作 1.准备两台虚拟机&#xff0c;一台作为服务器&#xff0c;一台作为客户机&#xff1a; 配置服务器ip地址&#xff1a;192.168.101.2 配置客户机ip地址&#xff1a;192.168.101.3 2.关闭两台的防火墙&#xff1a;systemctl stop firewalld.service 检查防火墙是否…

NFS共享服务搭建详细流程

标题DNF共享服务搭建详细流程 1. 概述 NFS(Network File System) 网络文件系统&#xff0c;是FreeBSD支持的文件系统中的一种&#xff0c;它允许网络中的计算机之间通过TCP/IP网络共享资源。在NFS的应用中&#xff0c;本地NFS的客户端应用可以透明地读写位于远端NFS服务器上的…

(转)企业级NFS网络文件共享服务

企业级NFS网络文件共享服务 原文&#xff1a;http://www.cnblogs.com/chensiqiqi/archive/2017/03/10/6530859.html --本教学笔记是本人学习和工作生涯中的摘记整理而成&#xff0c;此为初稿&#xff08;尚有诸多不完善之处&#xff09;&#xff0c;为原创作品&#xff0c;允许…

YUM仓库及NFS共享服务理论

文章目录 一、YUM仓库1.YUM概述2.准备安装源3.访问YUM仓库 二、FNS共享存储服务1.NFS概念2.NFS使用场景3.NFS服务 一、YUM仓库 1.YUM概述 YUM(Yellow dog Updater Modified) ●基于RPM包构建的软件更新机制 ●可以自动解决依赖关系 ●所有软件包由集中的YUM软件仓库提供 2.准…

NFS共享

nfs 简介 nfs特点 NFS&#xff08;Network File System&#xff09;网络文件系统&#xff0c;是FreeBSD支持的文件系统中的一种&#xff0c;它允许网络中的计算机之间通过TCP/IP网络共享资源在NFS的应用中的&#xff0c;本地的客户端应用可以透明的读写位于远端NFS服务器上的…

ELO排名算法

在wow lol 11平台等游戏中&#xff0c;都采用了一种排名算法&#xff0c;这种算法叫ELO&#xff0c;是一个叫ELO的人发明的&#xff0c;最开始用于国际象棋比赛计分。 Ra Ra K(Sa-Ea) 对于A来说&#xff0c;初始Rank值为Ra&#xff0c;一局结束后为 Ra。这里关键是K&#xff…

天梯匹配规则ELO

ELO Rating System 是当今对弈水平评估的公认权威规则&#xff0c;已被广泛应于国际象棋、围棋、足球和篮球等体育运动以及游戏中。例如星际争霸天梯排行&#xff0c;魔兽世界竞技场&#xff0c;Dota天梯系统&#xff0c;LOL匹配等游戏的竞技比赛系统中。ELO是一套较为完善的评…

欧拉算法的实现

代码 from matplotlib import pyplot as plt import numpy as np h 0.01 yy [] xx [] yy.append(1) xx.append(0) def y1(m,n): return m - 2*n/m for i in range(100): k1 y1(yy[i],xx[i]) y yy[i] hy1(yy[i],xx[i]) xx.append(xx[i]h) k2 y1(y,xx[i1]) yy.append(…