# Failed to put mappings on indices

**URL:** https://discuss.elastic.co/t/failed-to-put-mappings-on-indices/311224
**Category:** Elasticsearch
**Created:** [August 2, 2022, 1:28pm UTC](https://discuss.elastic.co/t/failed-to-put-mappings-on-indices/311224 "2022-08-02T13:28:40Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![davekang](https://avatars.discourse-cdn.com/v4/letter/d/ecccb3/32.png) [@davekang](https://discuss.elastic.co/u/davekang)
#### Post date: [August 2, 2022, 1:28pm UTC](https://discuss.elastic.co/t/failed-to-put-mappings-on-indices/311224/1 "2022-08-02T13:28:40Z")

</div>

hi  
I created a new index for re-indexing and tried re-indexing, but I get the following error:

```auto
[DEBUG][o.e.a.a.i.m.p.TransportPutMappingAction] [node-01] failed to put mappings on indices [[[ma_2022/mmRNrJPwRfutlNQs8Lk4sQ]]], type [inno_tech_center]
org.elasticsearch.cluster.metadata.ProcessClusterEventTimeoutException: failed to process cluster event (put-mapping) within 30s
        at org.elasticsearch.cluster.service.ClusterService$ClusterServiceTaskBatcher.lambda$null$0(ClusterService.java:255) ~[elasticsearch-5.6.3.jar:5.6.3]
        at java.util.ArrayList.forEach(ArrayList.java:1249) ~[?:1.8.0_131]
        at org.elasticsearch.cluster.service.ClusterService$ClusterServiceTaskBatcher.lambda$onTimeout$1(ClusterService.java:254) ~[elasticsearch-5.6.3.jar:5.6.3]
        at org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingRunnable.run(ThreadContext.java:569) [elasticsearch-5.6.3.jar:5.6.3]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [?:1.8.0_131]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [?:1.8.0_131]
        at java.lang.Thread.run(Thread.java:748) [?:1.8.0_131]
[2022-08-02T22:06:39,520][DEBUG][o.e.a.a.i.m.p.TransportPutMappingAction] [node-01] failed to put mappings on indices [[[ma_2022/mmRNrJPwRfutlNQs8Lk4sQ]]], type [email]
org.elasticsearch.cluster.metadata.ProcessClusterEventTimeoutException: failed to process cluster event (put-mapping) within 30s
        at org.elasticsearch.cluster.service.ClusterService$ClusterServiceTaskBatcher.lambda$null$0(ClusterService.java:255) ~[elasticsearch-5.6.3.jar:5.6.3]
        at java.util.ArrayList.forEach(ArrayList.java:1249) ~[?:1.8.0_131]
        at org.elasticsearch.cluster.service.ClusterService$ClusterServiceTaskBatcher.lambda$onTimeout$1(ClusterService.java:254) ~[elasticsearch-5.6.3.jar:5.6.3]
        at org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingRunnable.run(ThreadContext.java:569) [elasticsearch-5.6.3.jar:5.6.3]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [?:1.8.0_131]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [?:1.8.0_131]
        at java.lang.Thread.run(Thread.java:748) [?:1.8.0_131]
[2022-08-02T22:06:44,268][WARN][o.e.c.s.ClusterService] [node-01] cluster state update task [put-mapping[wreport, sharing_email]] took [35.1s] above the warn threshold of 30s

java version is 
openjdk version "1.8.0_131"
OpenJDK Runtime Environment (build 1.8.0_131-b12)
OpenJDK 64-Bit Server VM (build 25.131-b12, mixed mode)

```

and elastic version is 5.6.3

I can't upload the elasticsearch version, and I don't know what the problem is, please help !!

---

<div class="post-metadata">

### Author: ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)
#### Post date: [August 2, 2022, 1:42pm UTC](https://discuss.elastic.co/t/failed-to-put-mappings-on-indices/311224/2 "2022-08-02T13:42:39Z")

</div>

> [@davekang](#):
>
> and elastic version is 5.6.3

This is very old and have been EOL a long time. I would recommend you look into upgrading.

> [@davekang](#):
>
> ```auto
> [2022-08-02T22:06:44,268][WARN][o.e.c.s.ClusterService] [node-01] cluster state update task [put-mapping[wreport, sharing_email]] took [35.1s] above the warn threshold of 30s
> 
> ```

It seems updating and persisting state took longer than 30 seconds, which is not good. I have seen this happen either when very slow storage is used or when the cluster state gets very large from the number of shards managed in the cluster and/or the size of the mappings. It would help if you can provide the full output of the [cluster stats API](https://www.elastic.co/guide/en/elasticsearch/reference/5.6/cluster-stats.html). Note that this has been improved a lot in more recent versions.

---

<div class="post-metadata">

### Author: ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)
#### Post date: [August 4, 2022, 1:59am UTC](https://discuss.elastic.co/t/failed-to-put-mappings-on-indices/311224/3 "2022-08-04T01:59:59Z")

</div>

To echo Christian's points, 5.X is very very old and [EOL](https://www.elastic.co/support/eol).

You really need to upgrade as there are huge improvements with Elasticsearch and how it handles updates to cluster state, which Christian pointed out as well.

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [September 1, 2022, 2:00am UTC](https://discuss.elastic.co/t/failed-to-put-mappings-on-indices/311224/4 "2022-09-01T02:00:38Z")

</div>

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