Hello,
Approaching the second time I'm attempting a major update across my elasticsearch, logstash & kibana stacks.
Previously I did this around version 1.7x of elasticsearch & logstash 1.5 -- I had to jettison all previous data (not sure the running version, but earlier) to get elasticsearch to start.
While this wasn't a huge deal as data was backed up and I had states to redeploy the older elk stack, I am again attempting to move to latest versions with elasticsearch 2.x & logstash 2.x and kibana 4.30. When testing on dev with the older data, elasticsearch refuses to start.
Starting elasticsearch: Exception in thread "main" java.lang.IllegalStateException: unable to upgrade the mappings for the index [logstash-2015.11.29], reason: [Mapper for [timestamp] conflicts with existing mapping in other types:
[mapper [timestamp] cannot be changed from type [date] to [string]]]
Likely root cause: java.lang.IllegalArgumentException: Mapper for [timestamp] conflicts with existing mapping in other types:
[mapper [timestamp] cannot be changed from type [date] to [string]]
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.MetaDataIndexUpgradeService.checkMappingsCompatibility(MetaDataIndexUpgradeService.java:329)
at org.elasticsearch.cluster.metadata.MetaDataIndexUpgradeService.upgradeIndexMetaData(MetaDataIndexUpgradeService.java:112)
at org.elasticsearch.gateway.GatewayMetaState.pre20Upgrade(GatewayMetaState.java:228)
at org.elasticsearch.gateway.GatewayMetaState.(GatewayMetaState.java:87)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:422)
at <<>>
at org.elasticsearch.node.Node.(Node.java:202)
at org.elasticsearch.node.Node.(Node.java:129)
at org.elasticsearch.node.NodeBuilder.build(NodeBuilder.java:145)
at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:178)
at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:285)
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:35)
[FAILED]
Obviously some mapping issue, but I'm not sure how to resolve this. I'm assuming this is a logstash issue, the way its mapping data? Just wondering a) what causes this exactly & is there a way to resolve that and keep my old data? and b) if not, why and is it the fault of logstash or elasticsearch?