question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ElasticSearch query fails on ES 6

See original GitHub issue

Issue Summary

Using the public docker images which seem to be based on Redash 4 (beta?) trying to setup a query for an ES 6 backend results in

Error running query: Failed to execute query. Return Code: 500 Reason: {"error":{"root_cause":[{"type":"illegal_state_exception","reason":"source and source_content_type parameters are required"}],"type":"illegal_state_exception","reason":"source and source_content_type parameters are required"},"status":500}

Steps to Reproduce

  1. Deploy redash using the redash docker compose file
  2. Deploy ES 6 backend
  3. Setup ElasticSearch datasource in Redash
  4. Try a simple query

Technical details:

  • Redash Version: 4.0.0 (not sure about the exact built number - can’t determine it from the docker image)
  • Browser/OS: Redash in docker on Ubuntu 17.10
  • How did you install Redash: redash docker compose file from github pulling in redash:latest from docker hub

Looks like redash uses the source query parameter but as per https://www.elastic.co/guide/en/elasticsearch/reference/current/common-options.html this also requires to provide a source_content_type parameter.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

4reactions
alexdranscommented, Jan 25, 2018

@RichardLitt Is this really a support issue?

If I go to the relevant line and add the appropriate content type for my query, i.e. change it to;

params = {"source": json.dumps(query_dict), "source_content_type": "application/json"}

then my queries execute as expected.

@chriswue Did you get around this?

1reaction
chriswuecommented, Jan 18, 2018
Read more comments on GitHub >

github_iconTop Results From Across the Web

Fix common cluster issues | Elasticsearch Guide [8.5] | Elastic
When Elasticsearch rejects a request, it stops the operation and returns an error with a 429 response code. Task queue backlog: A backlogged...
Read more >
Fix common cluster issues | Elasticsearch Guide [7.17] | Elastic
Shards often become unassigned when a data node leaves the cluster. This can occur for several reasons, ranging from connectivity issues to hardware...
Read more >
Query DSL | Elasticsearch Guide [8.5] | Elastic
Elasticsearch provides a full Query DSL (Domain Specific Language) based on JSON to define queries. Think of the Query DSL as an AST...
Read more >
Advanced tuning: finding and fixing slow Elasticsearch queries
Problem. Queries are targeting too many shards, exceeding the number of cores in the cluster. This creates queued tasks in the search thread ......
Read more >
Search API | Elasticsearch Guide [8.5] | Elastic
This behavior applies even if the request targets other open indices. For example, a request targeting foo*,bar* returns an error if an index...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found