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

mapper [version] cannot be changed from type [long] to [int] #5648

Closed
dadoonet opened this issue Dec 11, 2015 · 11 comments
Closed

mapper [version] cannot be changed from type [long] to [int] #5648

dadoonet opened this issue Dec 11, 2015 · 11 comments
Labels
bug Fixes for quality problems that affect the customer experience

Comments

@dadoonet
Copy link
Member

Was playing today with a new and clean elasticsearch 2.1.0 instance and Kibana 4.3.0 fresh and clean as well.
Was creating visualizations, dashboards...

I clicked on the status button at some point: http://0.0.0.0:5601/status

And things started to get bad. It was impossible to access again discover or dashboard tabs.

And I started to get in elasticsearch logs:

[2015-12-11 17:13:36,115][INFO ][rest.suppressed          ] /.kibana/_mapping/search Params: {index=.kibana, type=search}
java.lang.IllegalArgumentException: Mapper for [version] conflicts with existing mapping in other types:
[mapper [version] cannot be changed from type [long] to [int]]
    at org.elasticsearch.index.mapper.FieldTypeLookup.checkCompatibility(FieldTypeLookup.java:117)
    at org.elasticsearch.index.mapper.MapperService.checkNewMappersCompatibility(MapperService.java:364)
    at org.elasticsearch.index.mapper.MapperService.merge(MapperService.java:315)
    at org.elasticsearch.index.mapper.MapperService.merge(MapperService.java:261)
    at org.elasticsearch.cluster.metadata.MetaDataMappingService$2.execute(MetaDataMappingService.java:444)
    at org.elasticsearch.cluster.service.InternalClusterService$UpdateTask.run(InternalClusterService.java:388)
    at org.elasticsearch.common.util.concurrent.PrioritizedEsThreadPoolExecutor$TieBreakingPrioritizedRunnable.runAndClean(PrioritizedEsThreadPoolExecutor.java:231)
    at org.elasticsearch.common.util.concurrent.PrioritizedEsThreadPoolExecutor$TieBreakingPrioritizedRunnable.run(PrioritizedEsThreadPoolExecutor.java:194)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)

The current mapping I get with curl localhost:9200/.kibana/_mapping?pretty is:

{
  ".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"
          }
        }
      }
    }
  }
}

The only workaround I can see for now is to remove .kibana index.

@dadoonet dadoonet added the bug Fixes for quality problems that affect the customer experience label Dec 11, 2015
@OzWookiee
Copy link

Had this issue when upgrading from previous Kibana and I had to delete the index as well. Good thing I exported all of my Dashboards, Searches and Vis's before upgrading!

@nateuni
Copy link

nateuni commented Apr 18, 2016

This happened to me also, but there were no upgrades done it just happened out of the blue.

@reecebradley
Copy link

Happened to me after refreshing an index pattern.

@Akshaykapoor
Copy link

Happened to me as well after adding some dashboards and visualizations. Is there any solution to this ?

@zhujinhe
Copy link

@Akshaykapoor
Reindex the .kibana mapping works for me. change mapper [version] to int manually.

@daliborfilus
Copy link

daliborfilus commented Dec 13, 2016

It does this to me everytime, after clean install. I don't know what I'm doing wrong. Just:

  • create new Debian 7 VPS
  • install and configure elastic (so, completely fresh)
  • install and configure logstash
  • install and configure kibana
  • launch kibana
  • confirm default "logstash-*" index pattern
  • click on Dashboard menu item, nothing happens (note that I didn't have the opportunity to create any dashboard yet)
  • check the browser console, voila, here it is, boom. In all it's glory.

commons.bundle.js?v=10154:40184 Error: [illegal_argument_exception] mapper [version] cannot be changed from type [long] to [int]

If I delete the .kibana index manually, it might work for a two seconds, then it does this again...

Is there any workaround/solution for this? Or is it fixed in more recent version?

Kibana version 4.6.3
Elasticsearch version 2.4.3

@daliborfilus
Copy link

Looks like it does this IF you launch kibana before any of the logstash-* indexes is even created. If you delete that .kibana index, you might already have something in logstash indices, so it works from that point of time.

@dadoonet
Copy link
Member Author

I believe that this issue won't be fixed as 5.x behaves correctly and this can be closed now?

@jarifr
Copy link

jarifr commented Oct 9, 2017

Well, I have

| Elasticsearch plugin is red
plugin:kibana@5.6.1 | Ready
plugin:elasticsearch@5.6.1 | [illegal_argument_exception] mapper [hits] cannot be changed from type [long] to [integer]
plugin:console@5.6.1 | Ready
plugin:metrics@5.6.1 | Ready
plugin:timelion@5.6.1 | Ready

@mpellegrin
Copy link

@jarifr : I had the same problem, and it seems related to #9888 ; the comment #9888 (comment) should be fine for you.

If you want to create your new index with the same mapping than your current one, you can export your current mapping with curl localhost:9200/.kibana/_mapping?pretty

@tylersmalley
Copy link
Contributor

I am closing this issue as we have resolved these issues in recent versions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fixes for quality problems that affect the customer experience
Projects
None yet
Development

No branches or pull requests

10 participants