Discover tab won't load anymore


#1

Kibana was working fine and all of a sudden the Discover tab stopped working. In my chrome dev tools console I get:

PUT http://mfs-tcmetrics:5601/elasticsearch/.kibana/_mapping/search 400 (Bad Request)

and:

Error: [illegal_argument_exception] Mapper for [hits] conflicts with existing mapping in other types:
[mapper [hits] cannot be changed from type [long] to [int]]
at respond (kibana.bundle.js:76820)
at checkRespForFailure (kibana.bundle.js:76783)
at kibana.bundle.js:75401
at processQueue (commons.bundle.js:42358)
at commons.bundle.js:42374
at Scope.$eval (commons.bundle.js:43602)
at Scope.$digest (commons.bundle.js:43413)
at Scope.$apply (commons.bundle.js:43710)
at done (commons.bundle.js:38159)
at completeRequest (commons.bundle.js:38357)

Dashboards and visualizations seem to work though.

How do I fix this?

Kibana 4.3.1, Elasticsearch 2.1.1


Dashboard and Discover tabs show blank page
(Mark Walkom) #2

You should check into https://www.elastic.co/guide/en/elasticsearch/reference/2.1/breaking_20_mapping_changes.html


#3

I don't think that helps at all. This is the .kibana index. I have no control over it.


(Mike Simos) #4

Can you post GET .kibana/_mapping. From what I can tell looking at 4.1.x and 4.3.1, both have hits as an integer.


#5

{".kibana":{"mappings":{"config":{"properties":{"buildNum":{"type":"string","index":"not_analyzed"},"defaultIndex":{"type":"string"}}},"index-pattern":{"properties":{"fieldFormatMap":{"type":"string"},"fields":{"type":"string"},"timeFieldName":{"type":"string"},"title":{"type":"string"}}},"visualization":{"properties":{"description":{"type":"string"},"kibanaSavedObjectMeta":{"properties":{"searchSourceJSON":{"type":"string"}}},"title":{"type":"string"},"uiStateJSON":{"type":"string"},"version":{"type":"long"},"visState":{"type":"string"}}},"dashboard":{"properties":{"description":{"type":"string"},"hits":{"type":"long"},"kibanaSavedObjectMeta":{"properties":{"searchSourceJSON":{"type":"string"}}},"optionsJSON":{"type":"string"},"panelsJSON":{"type":"string"},"timeRestore":{"type":"boolean"},"title":{"type":"string"},"uiStateJSON":{"type":"string"},"version":{"type":"long"}}}}}}


#6

As you can see, it's a long here. Whether that could've changed, I have no idea. I wasn't having this problem before and then I suddenly started getting the error. Or at least the Discover tab was loading just fine before (I guess it's conceivable that it was loading even though an error was being thrown).

I could delete my elasticsearch data and start over from scratch if that will solve it, but I'd like to know why this happened so I can be sure it won't happen again. I certainly don't want to have to start over from scratch multiple times in the future.

I appreciate the help.


(Mike Simos) #7

Hi,

Seems related to this:


Did you upgrade from an older version of Kibana or is this a new install? I'm curious when .kibana was created.


#8

I upgraded from 4.1 I think (but definitely not 3.x). However, I have also done a curl -XDELETE "http://localhost:9200/_all" since then, and I assume that also wipes out the .kibana index. That said, I have done the following: 1) export dashboard. 2) delete all (like above). 3) repopulate my index. 4) import dashboard.

I'm still not sure why this problem would suddenly appear a day later after successfully using the kibana UI including the dashboard tab. Seems weird, particularly if the thinking is that it's related to an upgrade.


#9

Also, even though I imported a dashboard, the issue you linked exhibits the problem when going to the Dashboard tab. In my case the Dashboard tab loads fine (using the imported dashboard). It's the Discover tab, which makes me think it's probably not related to imported objects.


(Mike Simos) #10

Can you stop Kibana, delete .kibana index, start Kibana. Do you still get this same error? Then re-import your dashboard, do you get this same error now?


#11

Deleting the index just consists of deleting the .kibana directory in elasticsearch? If so, I'll give it a try.


(Mark Walkom) #12

Nooooo.
Use the APIs, curl -XDELETE $HOST:9200/.kibana.


#13

Thanks. That seems to have worked for now, but my concern is why did this occur seemingly without anything done on my part and how do I avoid this in the future? Only time will tell how long this fix will last.


#14

The problem is happening again.


#15

I too am having this problem. I haven't tried doing curl -XDELETE $HOST:9200/.kibana yet but like TheShanMan, I deleted my indexes at one point via curl -XDELETE "http://localhost:9200/_all" and now when I click the dashboard nothing happens. The dev console shows the same error message. When I do http://localhost:9200/_cat/indices it shows the indexes I believe should be there. All status are green. I'm going to try deleting .kibana now


(Court Ewing) #16

I think it's possible that a fix for a bug that went into 4.1 never made it into subsequent releases. I'm looking into it now and will keep this ticket updated.


(Fernando Battistella) #17

I'm also experiencing the same issue.
Yesterday everything was fine, today, when I had to do a demo with it of course :D, discover tab isnt loading.


(Fernando Battistella) #18

Firefox console

Error: [illegal_argument_exception] Mapper for [hits] conflicts with existing mapping in other types: [mapper [hits] cannot be changed from type [long] to [int]]

Kibana mapping

curl -XGET http://localhost:9200/.kibana/_mapping
{".kibana":{"mappings":{"config":{"properties":{"buildNum":{"type":"string","index":"not_analyzed"},"defaultIndex":{"type":"string"}}},"visualization":{"properties":{"description":{"type":"string"},"kibanaSavedObjectMeta":{"properties":{"searchSourceJSON":{"type":"string"}}},"title":{"type":"string"},"uiStateJSON":{"type":"string"},"version":{"type":"long"},"visState":{"type":"string"}}},"index-pattern":{"properties":{"fields":{"type":"string"},"timeFieldName":{"type":"string"},"title":{"type":"string"}}},"dashboard":{"properties":{"description":{"type":"string"},"hits":{"type":"long"},"kibanaSavedObjectMeta":{"properties":{"searchSourceJSON":{"type":"string"}}},"optionsJSON":{"type":"string"},"panelsJSON":{"type":"string"},"timeRestore":{"type":"boolean"},"title":{"type":"string"},"uiStateJSON":{"type":"string"},"version":{"type":"long"}}}}}}


(David McClain) #19

Is there a followup on this? I'm running Kibana 4.3 and started getting 'Bad Request' messages. Found this thread, but it doesn't seem to have a resolution.

Was something found in 4.3 that was fixed in 4.4 for this?

Wanted to check here before opening a new thread.
Thanks


(Rezwu) #20

FYI: 4.4 also has the same issue.