jaegertracing / jaeger

CNCF Jaeger, a Distributed Tracing Platform
https://www.jaegertracing.io/
Apache License 2.0
20.33k stars 2.43k forks source link

Updating sampler failed An error occurred while sending the request. #914

Open saikiranchalla1 opened 6 years ago

saikiranchalla1 commented 6 years ago

Requirement - what kind of business use case are you trying to solve?

I'm trying to deploy Jaeger as a DaemonSet by following the Production setup instructions (https://github.com/jaegertracing/jaeger-kubernetes#production-setup) with Cassandra as the backend.

In the application, I have the following: ` var tracer = Configuration.FromEnv(sp.GetRequiredService()) .GetTracer();

                return tracer; '

This works totally fine in local with a Docker image. I can see traces on test runs. I'm passing the service name using the environment variable JAEGER_SERVICE_NAME.

Problem - what in Jaeger blocks you from solving the requirement?

This doesn't seem to be working on Kubernetes (running on Azure). Logs show the following error (Warn) but is not totally useful: Updating sampler failed An error occurred while sending the request.

Could you please help debug this?

black-adder commented 6 years ago

It looks like the client can't reach the agent. How are you starting up the agent and what are the configurations you are passing into your tracer? You might have to update some host:ports so that the client knows where the agent is.

saikiranchalla1 commented 6 years ago

The agent is running as a DemonSet in Kube cluster. For the client, I'm passing in JAEGER_SERVICE_NAME and JAEGER_AGENT_HOST (which is the Cluster IP). I bashed into the POD that is running the client and made sure that these values were being set as ENVIRONMENT variables and that I was able to reach the agent host. For the ports, the client is assuming defaults. You can check the ports in the Jaeger Kubernetes project https://github.com/jaegertracing/jaeger-kubernetes/blob/master/jaeger-production-template.yml

and

https://github.com/jaegertracing/jaeger-kubernetes/tree/master/production

Here's some more informative log from the pod running the client app.

Connecting to OpenTracing server 2018/07/06 18:19:46.088|DEBUG|Using the UDP Sender to send spans to the agent. |Jaeger.Configuration| 2018/07/06 18:19:46.215|INFO|Initialized Tracer(ServiceName=latest-event-view-writer, Version=CSharp-0.1.1.0, Reporter=RemoteReporter(Sender=UdpSender(UdpTransport=ThriftUdpClientTransport(Client=HOST_IP:6831))), Sampler=RemoteControlledSampler(Sampler=ProbabilisticSampler(PositiveSamplingBoundary=9223372036854776, NegativeSamplingBoundary=-9223372036854776, SamplingRate=0.001)), IPv4=183501111, Tags=[jaeger.version, CSharp-0.1.1.0], [hostname, cosmos-db-log-collector-dev-84fb7b7864-7fdwj], [ip, 10.240.1.55], ZipkinSharedRpcSpan=False, ExpandExceptionLogs=False) |Jaeger.Configuration|tracer=Tracer(ServiceName=latest-event-view-writer, Version=CSharp-0.1.1.0, Reporter=RemoteReporter(Sender=UdpSender(UdpTransport=ThriftUdpClientTransport(Client=HOST_IP:6831))), Sampler=RemoteControlledSampler(Sampler=ProbabilisticSampler(PositiveSamplingBoundary=9223372036854776, NegativeSamplingBoundary=-9223372036854776, SamplingRate=0.001)), IPv4=183501111, Tags=[jaeger.version, CSharp-0.1.1.0], [hostname, cosmos-db-log-collector-dev-84fb7b7864-7fdwj], [ip, POD_IP], ZipkinSharedRpcSpan=False, ExpandExceptionLogs=False) 2018/07/06 18:19:46.235|WARN|Updating sampler failed An error occurred while sending the request.|Jaeger.Samplers.RemoteControlledSampler|

saikiranchalla1 commented 6 years ago

Setting the ENVIRONMENT variable JAEGER_SAMPLER_MANAGER_HOST_PORT fixed the problem. But I'm still not able to see the service in the UI.