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( ~[elasticsearch-7.9.1.jar:7.9.1] at org.elasticsearch.index.mapper.FieldMapper.merge( ~[elasticsearch-7.9.1.jar:7.9.1] at org.elasticsearch.index.mapper.FieldMapper.merge( ~[elasticsearch-7.9.1.jar:7.9.1] at org.elasticsearch.index.mapper.ObjectMapper.doMerge( ~[elasticsearch-7.9.1.jar:7.9.1] at org.elasticsearch.index.mapper.RootObjectMapper.doMerge( ~[elasticsearch-7.9.1.jar:7.9.1] at org.elasticsearch.index.mapper.ObjectMapper.merge( ~[elasticsearch-7.9.1.jar:7.9.1] at org.elasticsearch.index.mapper.RootObjectMapper.merge( ~[elasticsearch-7.9.1.jar:7.9.1] at org.elasticsearch.index.mapper.Mapping.merge( ~[elasticsearch-7.9.1.jar:7.9.1] at org.elasticsearch.index.mapper.DocumentMapper.merge( ~[elasticsearch-7.9.1.jar:7.9.1] at org.elasticsearch.cluster.metadata.MetadataMappingService$PutMappingExecutor.applyRequest( ~[elasticsearch-7.9.1.jar:7.9.1] at org.elasticsearch.cluster.metadata.MetadataMappingService$PutMappingExecutor.execute( ~[elasticsearch-7.9.1.jar:7.9.1] at org.elasticsearch.cluster.service.MasterService.executeTasks( ~[elasticsearch-7.9.1.jar:7.9.1] at org.elasticsearch.cluster.service.MasterService.calculateTaskOutputs( ~[elasticsearch-7.9.1.jar:7.9.1] at org.elasticsearch.cluster.service.MasterService.runTasks( [elasticsearch-7.9.1.jar:7.9.1] at org.elasticsearch.cluster.service.MasterService.access$000( [elasticsearch-7.9.1.jar:7.9.1] at org.elasticsearch.cluster.service.MasterService$ [elasticsearch-7.9.1.jar:7.9.1] at org.elasticsearch.cluster.service.TaskBatcher.runIfNotProcessed( [elasticsearch-7.9.1.jar:7.9.1] at org.elasticsearch.cluster.service.TaskBatcher$ [elasticsearch-7.9.1.jar:7.9.1] at org.elasticsearch.common.util.concurrent.ThreadContext$ [elasticsearch-7.9.1.jar:7.9.1] at org.elasticsearch.common.util.concurrent.PrioritizedEsThreadPoolExecutor$TieBreakingPrioritizedRunnable.runAndClean( [elasticsearch-7.9.1.jar:7.9.1] at org.elasticsearch.common.util.concurrent.PrioritizedEsThreadPoolExecutor$ [elasticsearch-7.9.1.jar:7.9.1] at java.util.concurrent.ThreadPoolExecutor.runWorker( [?:?] at java.util.concurrent.ThreadPoolExecutor$ [?:?] at [?:?]

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.