- zipkin-server踩坑记录
- 正确启动
导入依赖
org.springframework.boot spring-boot-starter-webio.zipkin.java zipkin-server2.12.3 io.zipkin.java zipkin-autoconfigure-ui2.12.3 runtime
问题1:
SLF4J: Class path contains multiple SLF4J bindings. SLF4J: Found binding in [jar:file:/home/wenfengz/.m2/repository/ch/qos/logback/logback-classic/1.2.3/logback-classic-1.2.3.jar!/org/slf4j/impl/StaticLoggerBinder.class] SLF4J: Found binding in [jar:file:/home/wenfengz/.m2/repository/org/apache/logging/log4j/log4j-slf4j-impl/2.11.2/log4j-slf4j-impl-2.11.2.jar!/org/slf4j/impl/StaticLoggerBinder.class] SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation. SLF4J: Actual binding is of type [ch.qos.logback.classic.util.ContextSelectorStaticBinder]
原因: 存在两个Log包,无法确定绑定哪个
解决方法:
io.zipkin.java zipkin-server2.12.3 org.apache.logging.log4j log4j-slf4j-impl
问题2:
org.springframework.beans.factory.UnsatisfiedDependencyException. Message: Error creating bean with name 'webMvcMetricsFilter' defined in class path resource
解决方法:
org.springframework.boot spring-boot-starter-weborg.springframework.boot spring-boot-starter-tomcat
问题3:
Caused by: java.lang.ClassNotFoundException: zipkin2.internal.Buffer$Writer
解决方式:
暂时没有,通过修改版本号解决的。
spring-boot版本: 2.1.17.RELEASE
问题4:
java.lang.IllegalArgumentException: Prometheus requires that all meters with the same name have the same set of tag keys. There is already an existing meter named 'http_server_requests_seconds' containing tag keys [method, status, uri]. The meter you are attempting to register has keys [exception, method, outcome, status, uri].
解决方法:
management: metrics: web: server: auto-time-requests: false正确启动
版本最好相同或相近,因为存在版本问题。
导入依赖
org.springframework.boot spring-boot-starter-weborg.springframework.boot spring-boot-starter-tomcatio.zipkin.java zipkin-server2.12.3 org.apache.logging.log4j log4j-slf4j-implio.zipkin.java zipkin-autoconfigure-ui2.12.3 runtime
配置文件:
server: port: 9411 compression: enabled: true #是否开启压缩 默认false spring: application: name: my-zipkin-server management: metrics: web: server: auto-time-requests: false
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)