Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Could not load jaeger tracer configuration #480

Closed
voslartomas opened this issue Apr 15, 2019 · 12 comments · Fixed by #496
Closed

Could not load jaeger tracer configuration #480

voslartomas opened this issue Apr 15, 2019 · 12 comments · Fixed by #496

Comments

@voslartomas
Copy link

Describe the bug
Installed loki-stack, everything seems fine, but if we install jaeger afterwards and restart loki pod, it will say: cannot parse env var JAEGER_AGENT_PORT=udp://100.67.30.30:5775

To Reproduce
Steps to reproduce the behavior:

  1. Install loki-stack via helm chart
  2. Install jaeger via helm chart
  3. Delete loki pod (it will be in crash)

Expected behavior
I would expect to be able to run loki and jaeger alongside each other.

Environment:

  • Infrastructure: Kubernetes
  • Deployment tool: Helm

Screenshots, promtail config, or terminal output

Could not load jaeger tracer configuration: cannot obtain reporter config from env: 
cannot parse env var JAEGER_AGENT_PORT=udp://100.67.30.30:5775: 
strconv.ParseInt: parsing "udp://100.67.30.30:5775": invalid syntax
@voslartomas
Copy link
Author

Possibly it is, but I don't get why it is happening only on loki pods.

@cyriltovena
Copy link
Contributor

I don't see any env vars in the helm chart did you add this one yourself ?

JAEGER_AGENT_PORT=udp://100.67.30.30:5775

Reading Loki main.go you need JAEGER_AGENT_HOST to activate tracing.

@voslartomas
Copy link
Author

voslartomas commented Apr 16, 2019

Nope, this is my settings for loki.

loki:
  persistence:
    enabled: true
    storageClassName:
    # existingClaim: loki
  resources:
    limits:
      cpu: 400m
      memory: 2048Mi
    requests:
      cpu: 200m
      memory: 1024Mi

Where did you find that main.go file, please?

@cyriltovena
Copy link
Contributor

@daixiang0
Copy link
Contributor

@voslartomas hi, please try refer to this PR setting, wait for your feedback.

@voslartomas
Copy link
Author

@daixiang0 Hello, thanks for PR. Not sure how to test it out while using terraform, because grafana has this chart URL https://grafana.github.io/loki/charts, any way to use your branch in this way?

@steven-sheehy
Copy link
Contributor

@voslartomas You can checkout @daixiang0's branch and run make helm to build the chart locally.

@acim
Copy link

acim commented May 3, 2019

This is not a problem of this chart, it is actually dependency https://github.com/jaegertracing/jaeger-client-go that fails:

https://github.com/jaegertracing/jaeger-client-go/blob/c58709fe19d793cdd40ad8bfa6e645a40a2eccf8/config/config_env.go#L186

If you install jaeger chart with name jaeger, environment variable JAEGER_AGENT_PORT will be automatically created by Kubernetes (as string) and jaeger-client-go expects integer (just the port number, not url) under the same name so it is going to fail. The easiest way to fix the problem would be to install jaeger under some different name, for example:

helm install incubator/jaeger --name jaeger-tracing

@weeco
Copy link

weeco commented Jun 11, 2019

@acim I did not use the jaeger helm chart but I face the same problem:

Could not load jaeger tracer configuration: cannot obtain reporter config from env: cannot parse env var JAEGER_AGENT_PORT=udp://10.3.241.148:5775: strconv.ParseInt: parsing "udp://10.3.241.148:5775": invalid syntax

I do not specify the environment variable JAEGER_AGENT_PORT and describing the pod which throws this error has no such environment variable set either. I only specify these JAEGER_ variables:

      JAEGER_AGENT_HOST:                (v1:status.hostIP)
      JAEGER_SAMPLER_TYPE:             ratelimiting
      JAEGER_SAMPLER_PARAM:            7

Can you explain why Kubernetes would automatically set the JAEGER_AGENT_PORT?

@acim
Copy link

acim commented Jun 11, 2019

Try to change the name of the service from jaeger to something else, let's say jaeger-tracing. You should probably change deployment name as well. And here is about Kubernetes variables:

https://kubernetes.io/docs/concepts/containers/container-environment-variables/

You may also want to check this:

kubernetes/kubernetes#60099

@weeco
Copy link

weeco commented Jun 11, 2019

@acim Wow I did not know this. In my case I had a service called jaeger-agent and apparently this implicitly sets the environment variables JAEGER_AGENT_PORT

A list of all services that were running when a Container was created is available to that Container as environment variables. Those environment variables match the syntax of Docker links.

Thanks a lot.

@dpkirchner
Copy link

This is a somewhat poor workaround -- is there a way to simply tell Loki's prometheus not to look at JAEGER_AGENT_PORT ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants