JS errors preventing Discover tab from displaying

We're evaluating an elastic.co hosted instance of elasticsearch/kibana.

Today, the Discover tab either doesn't load, or when it does, it is all white. (not white due to no results based on the time filter though)

When I inspect the page, I am seeing the following javascript errors:

Failed to load resource: the server responded with a status of 400 (Bad Request)
commons.bundle.js?v=14723:38 Error: [illegal_argument_exception] mapper [hits] cannot be changed from type [long] to [integer]
    at respond (kibana.bundle.js?v=14723:14)
    at checkRespForFailure (kibana.bundle.js?v=14723:14)
    at kibana.bundle.js?v=14723:1
    at processQueue (commons.bundle.js?v=14723:38)
    at commons.bundle.js?v=14723:38
    at Scope.$eval (commons.bundle.js?v=14723:39)
    at Scope.$digest (commons.bundle.js?v=14723:39)
    at Scope.$apply (commons.bundle.js?v=14723:39)
    at done (commons.bundle.js?v=14723:37)
    at completeRequest (commons.bundle.js?v=14723:37)

The resource it is failing to load is: /es_admin/.kibana/_mapping/search

I get the same results on Chrome & Firefox. Clearing cache also does not seem to help.

Any suggestions would be appreciated.

This can happen when old dashboards, visualizations, saved searches, etc. are manually imported into a new elasticsearch cluster before Kibana gets a chance to run. Elasticsearch dynamically defines field hits as a long, then when Kibana runs it tries to creating the mapping as type integer and there's a conflict. The easiest solution, if viable, is to delete your .kibana, then import any old saved objects via Kibana's import mechanism.

Open github issue here for more info https://github.com/elastic/kibana/issues/9888

1 Like

Thanks Matt, removing .kibana resolved the issue!

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.