open-telemetry / opentelemetry-rust

The Rust OpenTelemetry implementation
https://opentelemetry.io
Apache License 2.0
1.84k stars 431 forks source link

OpenTelemetry trace error occurred. Exporter jaeger encountered the following error(s): thrift agent failed with not open #796

Closed Abhicodes-crypto closed 7 months ago

Abhicodes-crypto commented 2 years ago

When I send requests to server between the logs i keep getting this

OpenTelemetry trace error occurred. Exporter jaeger encountered the following error(s): thrift agent failed with not open

Can someone please help me resolve this.

TommyCpp commented 2 years ago

Could you provide more details? For example, what's your setup. Did you test your agent running alongside the application?

deeprobin commented 2 years ago

I have the same error (using docker):

version: "3.9"
services:
  host:
    build:
      context: .
      dockerfile: ./docker/host.Dockerfile
    environment:
      - JAEGER_SERVICE_NAME=trade-host
      - JAEGER_AGENT_HOST=jaeger
      - JAEGER_AGENT_PORT=6831
      - JAEGER_SAMPLER_MANAGER_HOST_PORT=jaeger:5778
    ports:
      - "4001:4001"
    depends_on:
      - jaeger
    networks:
      - deeptrading
  node:
    build:
      context: .
      dockerfile: ./docker/node.Dockerfile
    environment:
      - HOST_HOST=host
      - PORT_PORT=4001
    deploy:
      replicas: 2
    networks:
      - deeptrading
  jaeger:
    image: jaegertracing/all-in-one:latest
    ports:
      - "5775:5775/udp"
      - "6831:6831/udp"
      - "6832:6832/udp"
      - "5778:5778"
      - "16686:16686"
      - "14268:14268"
      - "9411:9411"
    networks:
      - deeptrading

networks:
  deeptrading:

For tracing I use the tokio-tracing library within this tracer:

    let tracer = opentelemetry_jaeger::new_pipeline()
        .with_service_name("trade-host")
        .install_simple()
        .expect("Failed to initialize OpenTelemetry-Jaeger pipeline");
thedodd commented 2 years ago

Yea, I'm actually getting the same thing. I was previously using an agent sidecar, and that was working well enough, but now I am getting the same issue. I am manually specifying the .with_collector_endpoint(..) and it is actually the same endpoint that a few of our Golang services are using.

TommyCpp commented 2 years ago

Based on the docker-compose files provided. It seems your env vars don't work. As opentelemetry-jaeger doesn't support

      - JAEGER_SERVICE_NAME=trade-host
      - JAEGER_AGENT_HOST=jaeger
      - JAEGER_AGENT_PORT=6831
      - JAEGER_SAMPLER_MANAGER_HOST_PORT=jaeger:5778

Instead, you can use

OTEL_EXPORTER_JAEGER_AGENT_HOST
OTEL_EXPORTER_JAEGER_AGENT_PORT
ceng-p commented 1 year ago

I'm getting the same error with a similar setup

let tracer = opentelemetry_jaeger::new_agent_pipeline() .with_endpoint("127.0.0.1:6831") .install_batch(Tokio);

And running the jeager all in one image using

docker run -d --name jaeger \ -e COLLECTOR_ZIPKIN_HTTP_PORT=9411 \ -p 5775:5775/udp \ -p 6831:6831/udp \ -p 6832:6832/udp \ -p 5778:5778 \ -p 16686:16686 \ -p 14268:14268 \ -p 9411:9411 \ jaegertracing/all-in-one:1.6

Did some of you guys figure out the solution?

cijothomas commented 7 months ago

Closing jaeger related issues, given its imminent removal. See https://github.com/open-telemetry/opentelemetry-rust/issues/995