gateway项目加入zipkin依赖starter-trace后启动报错

Blade 未结 2 1460
hnmas
hnmas 2020-09-14 10:13

一、该问题的重现步骤是什么?

1. gateway项目加入starter-trace依赖,想让gateway支持zipkin链路跟踪,但加入依赖后导致gateway启动报错; 

2. auth 模块加入starter-trace依赖后启动正常,并且zipkin服务能正常收到上报数据;

3. gateway启动报错如下:

[           main] c.netflix.config.DynamicPropertyFactory  : DynamicPropertyFactory is initialized with configuration sources: com.netflix.config.ConcurrentCompositeConfiguration@7ddeb27f

[           main] o.s.b.web.embedded.tomcat.TomcatStarter  : Error starting Tomcat context. Exception: org.springframework.beans.factory.BeanCreationException. Message: Error creating bean with name 'servletEndpointRegistrar' defined in class path resource [org/springframework/boot/actuate/autoconfigure/endpoint/web/ServletEndpointManagementContextConfiguration$WebMvcServletEndpointManagementContextConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.boot.actuate.endpoint.web.ServletEndpointRegistrar]: Factory method 'servletEndpointRegistrar' threw exception; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'gatewayLegacyControllerEndpoint' defined in class path resource [org/springframework/cloud/gateway/config/GatewayAutoConfiguration$GatewayActuatorConfiguration.class]: Unsatisfied dependency expressed through method 'gatewayLegacyControllerEndpoint' parameter 5; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'cachedCompositeRouteLocator' defined in class path resource [org/springframework/cloud/gateway/config/GatewayAutoConfiguration.class]: Unsatisfied dependency expressed through method 'cachedCompositeRouteLocator' parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'routeDefinitionRouteLocator' defined in class path resource [org/springframework/cloud/gateway/config/GatewayAutoConfiguration.class]: Unsatisfied dependency expressed through method 'routeDefinitionRouteLocator' parameter 4; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'org.springframework.core.convert.ConversionService' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@org.springframework.beans.factory.annotation.Qualifier(value=webFluxConversionService)}

[           main] o.apache.catalina.core.StandardService   : Stopping service [Tomcat]

[           main] o.a.c.loader.WebappClassLoaderBase       : The web application [ROOT] appears to have started a thread named [spring.cloud.inetutils] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:

 sun.misc.Unsafe.park(Native Method)

 java.util.concurrent.locks.LockSupport.park(LockSupport.java:175)

 java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2039)

 java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:442)

 java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1074)

 java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1134)

 java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)


二、你期待的结果是什么?实际看到的又是什么?

gateway支持zipkin


三、你正在使用的是什么产品,什么版本?在什么操作系统上?

2.6版本, win10系统。


2条回答
  •  如梦技术
    2020-09-14 14:07

    zipkin 不建议使用,包括上周我们公司正式环境的老服务就因一个 spring-cloud-sleuth-zipkin 引起的内存溢出, 推荐 skywalking 这种无侵入的方案。

提交回复