开发者社区 问答 正文

Zipkin 报错?报错

Prometheus requires that all meters with the same name have the same set of tag keys. There is already an existing meter containing tag keys [exception, method, status, uri]. The meter you are attempting to register has keys [method, status, uri]. 

2018-07-03 13:38:01.043 ERROR 7412 --- [  XNIO-2 task-1] i.u.request                              : UT005023: Exception handling request to /error

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 containing tag keys [exception, method, status, uri]. The meter you are attempting to register has keys [method, status, uri].
	at io.micrometer.prometheus.PrometheusMeterRegistry.lambda$collectorByName$9(PrometheusMeterRegistry.java:361) ~[micrometer-registry-prometheus-1.0.3.jar:1.0.3]
	at java.util.concurrent.ConcurrentHashMap.compute(ConcurrentHashMap.java:1877) ~[?:1.8.0_121]
	at io.micrometer.prometheus.PrometheusMeterRegistry.collectorByName(PrometheusMeterRegistry.java:348) ~[micrometer-registry-prometheus-1.0.3.jar:1.0.3]
	at io.micrometer.prometheus.PrometheusMeterRegistry.newTimer(PrometheusMeterRegistry.java:160) ~[micrometer-registry-prometheus-1.0.3.jar:1.0.3]
	at io.micrometer.core.instrument.MeterRegistry.lambda$timer$2(MeterRegistry.java:255) ~[micrometer-core-1.0.3.jar:1.0.3]
	at io.micrometer.core.instrument.MeterRegistry.getOrCreateMeter(MeterRegistry.java:561) ~[micrometer-core-1.0.3.jar:1.0.3]
	at io.micrometer.core.instrument.MeterRegistry.registerMeterIfNecessary(MeterRegistry.java:537) ~[micrometer-core-1.0.3.jar:1.0.3]
	at io.micrometer.core.instrument.MeterRegistry.timer(MeterRegistry.java:253) ~[micrometer-core-1.0.3.jar:1.0.3]
	at io.micrometer.core.instrument.Timer$Builder.register(Timer.java:447) ~[micrometer-core-1.0.3.jar:1.0.3]
	at zipkin.autoconfigure.prometheus.ZipkinPrometheusMetricsAutoConfiguration$HttpRequestDurationHandler.lambda$handleRequest$0(ZipkinPrometheusMetricsAutoConfiguration.java:80) ~[zipkin-autoconfigure-metrics-prometheus-2.8.3.jar:?]
	at io.undertow.server.HttpServerExchange.invokeExchangeCompleteListeners(HttpServerExchange.java:1276) ~[undertow-core-1.4.23.Final.jar:1.4.23.Final]
	at io.undertow.server.HttpServerExchange.terminateResponse(HttpServerExchange.java:1558) ~[undertow-core-1.4.23.Final.jar:1.4.23.Final]
	at io.undertow.server.Connectors.terminateResponse(Connectors.java:143) ~[undertow-core-1.4.23.Final.jar:1.4.23.Final]
	at io.undertow.server.protocol.http.ServerFixedLengthStreamSinkConduit.channelFinished(ServerFixedLengthStreamSinkConduit.java:58) ~[undertow-core-1.4.23.Final.jar:1.4.23.Final]
	at io.undertow.conduits.AbstractFixedLengthStreamSinkConduit.exitFlush(AbstractFixedLengthStreamSinkConduit.java:316) ~[undertow-core-1.4.23.Final.jar:1.4.23.Final]
	at io.undertow.conduits.AbstractFixedLengthStreamSinkConduit.flush(AbstractFixedLengthStreamSinkConduit.java:234) ~[undertow-core-1.4.23.Final.jar:1.4.23.Final]
	at org.xnio.conduits.ConduitStreamSinkChannel.flush(ConduitStreamSinkChannel.java:162) ~[xnio-api-3.3.8.Final.jar:3.3.8.Final]
	at io.undertow.channels.DetachableStreamSinkChannel.flush(DetachableStreamSinkChannel.java:119) ~[undertow-core-1.4.23.Final.jar:1.4.23.Final]
	at org.xnio.channels.Channels.flushBlocking(Channels.java:63) ~[xnio-api-3.3.8.Final.jar:3.3.8.Final]
	at io.undertow.servlet.spec.ServletOutputStreamImpl.close(ServletOutputStreamImpl.java:615) ~[undertow-servlet-1.4.23.Final.jar:1.4.23.Final]
	at io.undertow.servlet.spec.ServletPrintWriter.close(ServletPrintWriter.java:117) ~[undertow-servlet-1.4.23.Final.jar:1.4.23.Final]
	at io.undertow.servlet.spec.ServletPrintWriterDelegate.close(ServletPrintWriterDelegate.java:81) ~[undertow-servlet-1.4.23.Final.jar:1.4.23.Final]
	at io.undertow.servlet.spec.HttpServletResponseImpl.closeStreamAndWriter(HttpServletResponseImpl.java:473) ~[undertow-servlet-1.4.23.Final.jar:1.4.23.Final]
	at io.undertow.servlet.spec.HttpServletResponseImpl.responseDone(HttpServletResponseImpl.java:568) ~[undertow-servlet-1.4.23.Final.jar:1.4.23.Final]
	at io.undertow.servlet.spec.HttpServletResponseImpl.doErrorDispatch(HttpServletResponseImpl.java:171) ~[undertow-servlet-1.4.23.Final.jar:1.4.23.Final]
	at io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:295) [undertow-servlet-1.4.23.Final.jar:1.4.23.Final]
	at io.undertow.servlet.handlers.ServletInitialHandler.access$100(ServletInitialHandler.java:81) [undertow-servlet-1.4.23.Final.jar:1.4.23.Final]
	at io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:138) [undertow-servlet-1.4.23.Final.jar:1.4.23.Final]
	at io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:135) [undertow-servlet-1.4.23.Final.jar:1.4.23.Final]
	at io.undertow.servlet.core.ServletRequestContextThreadSetupAction$1.call(ServletRequestContextThreadSetupAction.java:48) [undertow-servlet-1.4.23.Final.jar:1.4.23.Final]
	at io.undertow.servlet.core.ContextClassLoaderSetupAction$1.call(ContextClassLoaderSetupAction.java:43) [undertow-servlet-1.4.23.Final.jar:1.4.23.Final]
	at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:272) [undertow-servlet-1.4.23.Final.jar:1.4.23.Final]
	at io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:81) [undertow-servlet-1.4.23.Final.jar:1.4.23.Final]
	at io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:104) [undertow-servlet-1.4.23.Final.jar:1.4.23.Final]
	at io.undertow.server.Connectors.executeRootHandler(Connectors.java:336) [undertow-core-1.4.23.Final.jar:1.4.23.Final]
	at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:830) [undertow-core-1.4.23.Final.jar:1.4.23.Final]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [?:1.8.0_121]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [?:1.8.0_121]
	at java.lang.Thread.run(Thread.java:745) [?:1.8.0_121]
spring.application.name= zipkin-server
server.port=9411
management.endpoints.web.exposure.include=*
<dependency>
	<groupId>io.zipkin.java</groupId>
	<artifactId>zipkin-server</artifactId>
	<version>2.9.4</version>
</dependency>

<!--https://mvnrepository.com/artifact/io.zipkin.java/zipkin-autoconfigure-ui -->
<dependency>
	<groupId>io.zipkin.java</groupId>
	<artifactId>zipkin-autoconfigure-ui</artifactId>
	<version>2.9.4</version>
	<scope>runtime</scope>
</dependency>

 

展开
收起
爱吃鱼的程序员 2020-06-06 20:18:01 858 分享 版权
1 条回答
写回答
取消 提交回答
  • https://developer.aliyun.com/profile/5yerqm5bn5yqg?spm=a2c6h.12873639.0.0.6eae304abcjaIB
                        <p>add <code>management.metrics.web.server.auto-time-requests=false</code> to application.properties ,then it works well.</p>
    
                    
    
                        <p>JSYK. Custom servers are not supported since 2.7.x. <code>@EnableZipkinServer</code> is deprecated. Please use one of the supported binary release directly or use the Docker version.</p>
    

     

    2020-06-06 20:18:18
    赞同 展开评论