Reading Elasticsearch error in logs - ML

Hello All,

I am using ELK v 7.9.1.

Have seen the below error. I have been itching my head with where this has come from or where I would look to help over come this issue.

The below is the error message:

[instance-0000000039] Error creating ML annotations index or aliases java.lang.IllegalArgumentException: mapper [event] cannot be changed from type [text] to [keyword] at org.elasticsearch.index.mapper.FieldMapper.mergeSharedOptions(FieldMapper.java:322) ~[elasticsearch-7.9.1.jar:7.9.1] at org.elasticsearch.index.mapper.FieldMapper.merge(FieldMapper.java:304) ~[elasticsearch-7.9.1.jar:7.9.1] at org.elasticsearch.index.mapper.FieldMapper.merge(FieldMapper.java:50) ~[elasticsearch-7.9.1.jar:7.9.1] at org.elasticsearch.index.mapper.ObjectMapper.doMerge(ObjectMapper.java:529) ~[elasticsearch-7.9.1.jar:7.9.1] at org.elasticsearch.index.mapper.RootObjectMapper.doMerge(RootObjectMapper.java:296) ~[elasticsearch-7.9.1.jar:7.9.1] at org.elasticsearch.index.mapper.ObjectMapper.merge(ObjectMapper.java:489) ~[elasticsearch-7.9.1.jar:7.9.1] at org.elasticsearch.index.mapper.RootObjectMapper.merge(RootObjectMapper.java:291) ~[elasticsearch-7.9.1.jar:7.9.1] at org.elasticsearch.index.mapper.Mapping.merge(Mapping.java:99) ~[elasticsearch-7.9.1.jar:7.9.1] at org.elasticsearch.index.mapper.DocumentMapper.merge(DocumentMapper.java:320) ~[elasticsearch-7.9.1.jar:7.9.1] at org.elasticsearch.cluster.metadata.MetadataMappingService$PutMappingExecutor.applyRequest(MetadataMappingService.java:283) ~[elasticsearch-7.9.1.jar:7.9.1] at org.elasticsearch.cluster.metadata.MetadataMappingService$PutMappingExecutor.execute(MetadataMappingService.java:239) ~[elasticsearch-7.9.1.jar:7.9.1] at org.elasticsearch.cluster.service.MasterService.executeTasks(MasterService.java:702) ~[elasticsearch-7.9.1.jar:7.9.1] at org.elasticsearch.cluster.service.MasterService.calculateTaskOutputs(MasterService.java:324) ~[elasticsearch-7.9.1.jar:7.9.1] at org.elasticsearch.cluster.service.MasterService.runTasks(MasterService.java:219) [elasticsearch-7.9.1.jar:7.9.1] at org.elasticsearch.cluster.service.MasterService.access$000(MasterService.java:73) [elasticsearch-7.9.1.jar:7.9.1] at org.elasticsearch.cluster.service.MasterService$Batcher.run(MasterService.java:151) [elasticsearch-7.9.1.jar:7.9.1] at org.elasticsearch.cluster.service.TaskBatcher.runIfNotProcessed(TaskBatcher.java:150) [elasticsearch-7.9.1.jar:7.9.1] at org.elasticsearch.cluster.service.TaskBatcher$BatchedTask.run(TaskBatcher.java:188) [elasticsearch-7.9.1.jar:7.9.1] at org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingRunnable.run(ThreadContext.java:651) [elasticsearch-7.9.1.jar:7.9.1] at org.elasticsearch.common.util.concurrent.PrioritizedEsThreadPoolExecutor$TieBreakingPrioritizedRunnable.runAndClean(PrioritizedEsThreadPoolExecutor.java:252) [elasticsearch-7.9.1.jar:7.9.1] at org.elasticsearch.common.util.concurrent.PrioritizedEsThreadPoolExecutor$TieBreakingPrioritizedRunnable.run(PrioritizedEsThreadPoolExecutor.java:215) [elasticsearch-7.9.1.jar:7.9.1] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130) [?:?] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630) [?:?] at java.lang.Thread.run(Thread.java:832) [?:?]

With the message: Error creating ML annotations index or aliases java.lang.IllegalArgumentException: mapper [event] cannot be changed from type [text] to [keyword] Showing that an exception? Meaning that the text in question isn't able to change to keyword?

Had a looked at the code from this GitHub merge to see what the thinking of why this error is occurring. This being said, this means that there is a cross up with my index/ aliases??

Any help or any point in the correct direction would be of great help!

Thank you!

Hi, we are getting exactly the same error.

Solved it by deleting the .ml-annotations-6 Index. It was automatically recreated with an actual Mapping for 7.9.1. But be careful, you will lose all previous annotations!

1 Like

Hey @zerlett,

Thank you for the point in the right direction. I did have a hunch that this was going to be the way forward. Just seemed when trying other things it just showed the same error message when trying it again.

But yeah, ended up deleting the ".ml-annotations-6", refreshed the index management page and a new ".ml-annotations-6" index appeared. Now the ML jobs are no longer showing the previous error message.

Thank you!

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