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

Unable to find traces with Elasticsearch deployed behind Google Cloud load balancer #3191

Closed
NatMarchand opened this issue Aug 6, 2021 · 3 comments · Fixed by #3193
Closed

Comments

@NatMarchand
Copy link
Contributor

Describe the bug
When using a Google Cloud HTTP load balancer in front of our Elastic Search cluster, Jaeger Query component is unable to search for traces.

To Reproduce
Steps to reproduce the behavior:

  1. Deploy an elasticsearch cluster in Google Cloud
  2. Deploy a load balancer in front of the cluster with an HTTPS route
  3. Configure jaeger-query to use the elasticsearch cluster
  4. Search for traces

Expected behavior
I should be able to search for traces

Screenshots
After intercepting HTTP traffic between jaeger-query and elasticsearch, this is the query blocked by the load balancer with a 400 error:

GET https://elasticsearch.xxxx/_msearch?rest_total_hits_as_int=true HTTP/1.1
Host: elasticsearch.xxxx
User-Agent: elastic/6.2.37 (windows-amd64)
Accept: application/json
Content-Type: application/json
Accept-Encoding: gzip

{"ignore_unavailable":true,"index":"jaeger-jaeger-span-2021-08-06"}
{"query":{"bool":{"must":{"term":{"traceID":"ca1eb6d7b60a624a97acd85c4ccf9ad1"}}}},"search_after":[1628247456972000],"size":10000,"sort":[{"startTime":{"order":"asc"}}],"terminate_after":10000}
{"ignore_unavailable":true,"index":"jaeger-jaeger-span-2021-08-06"}

Version:

  • Tested on Linux and Windows
  • Jaeger version: 1.25
  • Kubernetes, Docker and .exe

Additional context
Google Cloud Load balancer does not support body in HTTP GET queries and blocks it. The ElasticSearch client should be able to make queries with POST instead of GET (maybe if a flag is activated). Meanwhile, we're using TCP load balancer but it's not a best practice.
https://cloud.google.com/load-balancing/docs/https#illegal_request_and_response_handling

@NatMarchand NatMarchand added the bug label Aug 6, 2021
@pavolloffay
Copy link
Member

@NatMarchand would you like to submit a fix for this?

Jaeger uses this ES client https://github.com/olivere/elastic

@NatMarchand
Copy link
Contributor Author

Yeah ! Currently working on a PR, just having trouble to setup my go environment on Windows :)
There's a SendGetBodyAs on the es client, I was thinking adding a cli flag such as --es.send-get-body-as="POST"

@NatMarchand
Copy link
Contributor Author

PR is opened, don't hesitate to comment even if it's still a draft

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.

2 participants