当前位置: 首页 > 知识库问答 >
问题:

春云侦探错误发布跨度到齐普金

查淮晨
2023-03-14

还有人在使用Zipkin时遇到以下问题吗?

2016-11-17 12:13:59.270 DEBUG [myService,,,] 16588 --- [pool-1-thread-1] o.s.c.s.zipkin.HttpZipkinSpanReporter    : error POSTing spans to http://localhost:9411/api/v1/spans: as json {span data}

java.net.ConnectException: Connection refused (Connection refused)
    at java.net.PlainSocketImpl.socketConnect(Native Method) ~[na:1.8.0_112]
    at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350) ~[na:1.8.0_112]
    at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206) ~[na:1.8.0_112]
    at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188) ~[na:1.8.0_112]
    at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) ~[na:1.8.0_112]
    at java.net.Socket.connect(Socket.java:589) ~[na:1.8.0_112]
    at java.net.Socket.connect(Socket.java:538) ~[na:1.8.0_112]
    at sun.net.NetworkClient.doConnect(NetworkClient.java:180) ~[na:1.8.0_112]
    at sun.net.www.http.HttpClient.openServer(HttpClient.java:432) ~[na:1.8.0_112]
    at sun.net.www.http.HttpClient.openServer(HttpClient.java:527) ~[na:1.8.0_112]
    at sun.net.www.http.HttpClient.<init>(HttpClient.java:211) ~[na:1.8.0_112]
    at sun.net.www.http.HttpClient.New(HttpClient.java:308) ~[na:1.8.0_112]
    at sun.net.www.http.HttpClient.New(HttpClient.java:326) ~[na:1.8.0_112]
    at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:1202) ~[na:1.8.0_112]
    at sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConnection.java:1138) ~[na:1.8.0_112]
    at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:1032) ~[na:1.8.0_112]
    at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:966) ~[na:1.8.0_112]
    at sun.net.www.protocol.http.HttpURLConnection.getOutputStream0(HttpURLConnection.java:1316) ~[na:1.8.0_112]
    at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(HttpURLConnection.java:1291) ~[na:1.8.0_112]
    at org.springframework.cloud.sleuth.zipkin.HttpZipkinSpanReporter.postSpans(HttpZipkinSpanReporter.java:146) ~[spring-cloud-sleuth-zipkin-1.0.0.RELEASE.jar:1.0.0.RELEASE]
    at org.springframework.cloud.sleuth.zipkin.HttpZipkinSpanReporter.flush(HttpZipkinSpanReporter.java:96) ~[spring-cloud-sleuth-zipkin-1.0.0.RELEASE.jar:1.0.0.RELEASE]
    at org.springframework.cloud.sleuth.zipkin.HttpZipkinSpanReporter$Flusher.run(HttpZipkinSpanReporter.java:124) [spring-cloud-sleuth-zipkin-1.0.0.RELEASE.jar:1.0.0.RELEASE]
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [na:1.8.0_112]
    at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) [na:1.8.0_112]
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) [na:1.8.0_112]
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) [na:1.8.0_112]
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_112]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_112]
    at java.lang.Thread.run(Thread.java:745) [na:1.8.0_112]

共有1个答案

弓华茂
2023-03-14

请确保在Spring启动配置文件中正确配置您的 zipkin 服务器。就像这样:

    logging:
      level.org.springframework.cloud: DEBUG
    spring:
      application:
        name: service-tracking
      sleuth:
        enabled: false
    zipkin:
        storage:
            type: mem
    server:
        port: 9411

并在您的zipkin客户端Spring启动配置文件中添加以下配置

  sleuth:
        enabled: true
        sampler:
          percentage: 1
      zipkin:
        enabled: true
        baseUrl: http://${tracking-host:tracking}:9411
 类似资料:
  • 有必要为进入控制台日志的所有内容生成一个span id,但不幸的是,没有生成span id: 应用程序.yml logback.xml 为显式调用的日志记录方法生成span id:

  • 我的一些微服务使用log4j2作为记录器。Spring cloud Sleuth支持logback。在这个场景中,我如何使用Sleuth来获得分布式跟踪。我明白用log4j2使用sleuth,我必须实现某些类。我试过了,但没有运气。请帮忙

  • 我正在使用spring-cloud-sleuth为http请求、rabbitMQ消息和sheduled事件的日志添加相关id。添加依赖项后,应用程序的启动时间增加了50%。所有其他配置属性,如spring.sleuth.async.enabled和spring.sleuth.grpc.enabled的默认值为true。如果我想减少我的应用程序启动时间,我需要在我的应用程序属性文件中将所有这些都过期

  • Spring Cloud Sleuth跟踪头是否像这里描述的RabbitMq和Kafka那样被注入到Spring Cloud Stream Kinesis消息中?我们有一个REST控制器,它在处理POST请求之后,但在向客户机发送响应之前,向Kinesis发送一个Avro消息,该消息使用Spring Cloud Stream Kinesis总结事务。我想确保在REST控制器中启动的跟踪id被传播到

  • 作为我们的内部IDP,我们使用的是Keycloak 6.0.1,它依赖于Wildfly16。 我们的大部分组件都是spring boot thingies,其中我们使用spring cloud sleuth+一些gelf配置将日志发送到ELK堆栈。 WildFly日志语句具有SpanID和traceID。 传播包含相关信息的WildFly传入请求。 Wildfly为不包含关联信息的请求生成新的关联

  • 当我在使用log4j2进行日志记录的Spring Boot项目中添加侦探依赖项时,我得到以下错误 sleuth是否只支持logback,并且还支持log4j2?