1

I have spring application running with Build Ops (opentelemetry-javaagent) generating otel scans.

And working on to export traces into Jaeger/Zipkin and Splunk Collector.

my docker-compose file:

version: "3.3"
services:

  zipkin:
    image: openzipkin/zipkin
    container_name: zipkin
    ports:
      - 127.0.0.1:9411:9411

  jaeger-allinone:
    image : jaegertracing/all-in-one:1.25
    dns_search: .
    ports:
      - 6831:6831/udp
      - 6832:6832/udp
      - 16686:16686
      - 14269:14269

  otel-collector-contib:
    image: otel/opentelemetry-collector-contrib:latest
    command: [ "--config=otel-collector-config.yaml"]
    volumes:
      - ./otel-collector-config.yaml:/otel-collector-config.yaml
    ports:
      - 4317-4318:4317-4318
      - 55680:55680
    depends_on:
      - jaeger
      - zipkin

And OTel collector config:

receivers:
  zipkin:
    endpoint: 0.0.0.0:9411
  otlp:
    protocols:
      http:
        endpoint: 0.0.0.0:4318

exporters:
  # Logs
  jaeger:
    endpoint: jaeger-allinone:14250
  zipkin:
    endpoint: "http://localhost:9411/api/v2/spans"
    format: proto
    default_service_name: test_name
  splunk_hec:
    token: "XXXXXXX-a03a-408b-b562-XXXXXXXXX"
    endpoint: "http://localhost:8088/services/collector"
    max_connections: 20
    disable_compression: false
    timeout: 10s

service:
  pipelines:
    traces:
      receivers: [otlp]
      exporters: [jaeger,zipkin,splunk_hec]

I am getting traces from spring application but it's failing with following exception exporting it.

ZIPKIN: {"kind": "exporter", "name": "zipkin", "error": "failed to push trace data via Zipkin exporter: Post \"http://localhost:9411/api/v2/spans\": dial tcp 127.0.0.1:9411: connect: connection refused", "interval": "9.491850181s"}

SPLUNK: {"kind": "exporter", "name": "splunk_hec", "error": "Post \"http://localhost:8088/services/collector\": dial tcp 127.0.0.1:8088: connect: connection refused", "interval": "16.142139456s"}

What could be reason for these failures? Is there anything missing with configuration?

psfinaki
  • 1,814
  • 15
  • 29
naveen
  • 11
  • 4
  • It's hard to read the information without formatting but one thing I suspect is that `127.0.0.1` and `localhost` is not configured correctly because the containers have different IPs. The hostnames are the docker names like `jaeger-allinone:8088` or `http://zipkin:9411/api/v2/spans`. – Daniel W. Mar 11 '22 at 11:45
  • You need to format your code properly – Nick Vu Mar 11 '22 at 13:13
  • Make sure Splunk is listening on port 8088 and no firewall is blocking connections. – RichG Mar 11 '22 at 14:10
  • @DanielW. Thanks for pointer. I am see spans in Zipkin now. – naveen Mar 12 '22 at 16:33
  • @DanielW. - I am getting x509: certificate signed by unknown authority exception on Docker Windows.... How can we fix this on windows ? Thanks – naveen Mar 14 '22 at 17:41
  • Install a valid certificate, not one that is self signed or root cert not in your cert stash – Daniel W. Mar 15 '22 at 09:08

0 Answers0