# Failed to put mappings on indices

**URL:** https://discuss.elastic.co/t/failed-to-put-mappings-on-indices/82871
**Category:** Elasticsearch
**Created:** [April 19, 2017, 11:10am UTC](https://discuss.elastic.co/t/failed-to-put-mappings-on-indices/82871 "2017-04-19T11:10:02Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![mathias](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mathias/32/23176_2.png) [@mathias](https://discuss.elastic.co/u/mathias)
#### Post date: [April 19, 2017, 11:10am UTC](https://discuss.elastic.co/t/failed-to-put-mappings-on-indices/82871/1 "2017-04-19T11:10:02Z")

</div>

Hi have installed ELK 5.2.2 in a docker container (openjdk:8-jre) running on an Ubuntu host.  
It runs nice without errors in logs.

I save the container images and load them on Alpine host with no internet connection.

When I check elasticsearch log I see the following:

> [2017-04-19T07:21:05,087][INFO][o.e.c.s.ClusterService] [cxy38B4] new\_master {cxy38B4}{cxy38B4wQjWh7Lt4nLVJnA}{bT5KHa84QH-Sny7knWvKSA}{10.20.190.102}{10.20.190.102:9300}, reason: zen-disco-elected-as-master ([0] nodes joined)  
> [2017-04-19T07:21:05,131][INFO][o.e.h.HttpServer] [cxy38B4] publish\_address {10.20.190.102:9200}, bound\_addresses {10.20.190.102:9200}  
> [2017-04-19T07:21:05,131][INFO][o.e.n.Node] [cxy38B4] started  
> [2017-04-19T07:21:05,140][INFO][o.e.g.GatewayService] [cxy38B4] recovered [0] indices into cluster\_state  
> [2017-04-19T07:21:17,510][INFO][o.e.c.m.MetaDataCreateIndexService] [cxy38B4] [.kibana] creating index, cause [auto(index api)], templates , shards [5]/[1], mappings   
> [2017-04-19T07:21:18,152][INFO][o.e.c.m.MetaDataMappingService] [cxy38B4] [.kibana/o94FSnvSSLuXiP\_U3vt-OA] create\_mapping [index-pattern]  
> [2017-04-19T07:21:18,465][INFO][o.e.c.m.MetaDataMappingService] [cxy38B4] [.kibana/o94FSnvSSLuXiP\_U3vt-OA] create\_mapping [config]  
> [2017-04-19T07:21:18,782][INFO][o.e.c.m.MetaDataMappingService] [cxy38B4] [.kibana/o94FSnvSSLuXiP\_U3vt-OA] create\_mapping [visualization]  
> [2017-04-19T07:21:19,509][INFO][o.e.c.m.MetaDataMappingService] [cxy38B4] [.kibana/o94FSnvSSLuXiP\_U3vt-OA] create\_mapping [dashboard]  
> [2017-04-19T07:22:27,358][DEBUG][o.e.a.a.i.m.p.TransportPutMappingAction] [cxy38B4] failed to put mappings on indices [[[.kibana/o94FSnvSSLuXiP\_U3vt-OA]]], type [search]  
> java.lang.IllegalArgumentException: mapper [hits] cannot be changed from type [long] to [integer]  
> at org.elasticsearch.index.mapper.MappedFieldType.checkTypeName(MappedFieldType.java:147) ~[elasticsearch-5.2.2.jar:5.2.2]  
> at org.elasticsearch.index.mapper.MappedFieldType.checkCompatibility(MappedFieldType.java:159) ~[elasticsearch-5.2.2.jar:5.2.2]  
> at org.elasticsearch.index.mapper.FieldTypeLookup.checkCompatibility(FieldTypeLookup.java:128) ~[elasticsearch-5.2.2.jar:5.2.2]  
> at org.elasticsearch.index.mapper.FieldTypeLookup.copyAndAddAll(FieldTypeLookup.java:94) ~[elasticsearch-5.2.2.jar:5.2.2]  
> at org.elasticsearch.index.mapper.MapperService.internalMerge(MapperService.java:390) ~[elasticsearch-5.2.2.jar:5.2.2]  
> at org.elasticsearch.index.mapper.MapperService.internalMerge(MapperService.java:327) ~[elasticsearch-5.2.2.jar:5.2.2]  
> at org.elasticsearch.index.mapper.MapperService.merge(MapperService.java:260) ~[elasticsearch-5.2.2.jar:5.2.2]  
> at org.elasticsearch.cluster.metadata.MetaDataMappingService$PutMappingExecutor.applyRequest(MetaDataMappingService.java:311) ~[elasticsearch-5.2.2.jar:5.2.2]  
> at org.elasticsearch.cluster.metadata.MetaDataMappingService$PutMappingExecutor.execute(MetaDataMappingService.java:230) ~[elasticsearch-5.2.2.jar:5.2.2]  
> at org.elasticsearch.cluster.service.ClusterService.executeTasks(ClusterService.java:674) ~[elasticsearch-5.2.2.jar:5.2.2]  
> at org.elasticsearch.cluster.service.ClusterService.calculateTaskOutputs(ClusterService.java:653) ~[elasticsearch-5.2.2.jar:5.2.2]  
> at org.elasticsearch.cluster.service.ClusterService.runTasks(ClusterService.java:612) [elasticsearch-5.2.2.jar:5.2.2]  
> at org.elasticsearch.cluster.service.ClusterService$UpdateTask.run(ClusterService.java:1112) [elasticsearch-5.2.2.jar:5.2.2]  
> at org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingRunnable.run(ThreadContext.java:527) [elasticsearch-5.2.2.jar:5.2.2]  
> at org.elasticsearch.common.util.concurrent.PrioritizedEsThreadPoolExecutor$TieBreakingPrioritizedRunnable.runAndClean(PrioritizedEsThreadPoolExecutor.java:238) [elasticsearch-5.2.2.jar:5.2.2]  
> at org.elasticsearch.common.util.concurrent.PrioritizedEsThreadPoolExecutor$TieBreakingPrioritizedRunnable.run(PrioritizedEsThreadPoolExecutor.java:201) [elasticsearch-5.2.2.jar:5.2.2]  
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [?:1.8.0\_121]  
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [?:1.8.0\_121]  
> at java.lang.Thread.run(Thread.java:745) [?:1.8.0\_121]  
> [2017-04-19T07:22:28,034][INFO][o.e.c.m.MetaDataCreateIndexService] [cxy38B4] [metricbeat-2017.04.19] creating index, cause [auto(bulk api)], templates [metricbeat], shards [5]/[1], mappings [_default_]

What does this mean?

The elasticsearch process is still running and there are data coming in to elasticsearch but Kibana cannot display them.

On my docker running on ubunto host I do not see any response code 200.  
But the docker running on my Alpine machine I get code 400.

{"type":"response","@timestamp":"2017-04-19T11:17:13Z","tags":,"pid":56,"method":"put","statusCode":400,"req":{"url":"/es\_admin/.kibana/\_mapping/search","method":"put","headers":{"host":"10.20.190.101:5601","accept":"application/json, text/plain, _/_","referer":"[http://10.20.190.101:5601/app/kibana","origin":"http://10.20.190.101:5601","kbn-version":"5.2.2","user-agent":"Mozilla/5.0](http://10.20.190.101:5601/app/kibana%22,%22origin%22:%22http://10.20.190.101:5601%22,%22kbn-version%22:%225.2.2%22,%22user-agent%22:%22Mozilla/5.0) (X11; Linux) AppleWebKit/538.15 (KHTML, like Gecko) Chrome/46.0.2490.86 Safari/538.15 Midori/0.5","content-type":"application/json","accept-encoding":"gzip, deflate","accept-language":"en-us;q=0.750","connection":"Keep-Alive","content-length":"271"},"remoteAddress":"10.20.190.78","userAgent":"10.20.190.78","referer":"[http://10.20.190.101:5601/app/kibana"},"res":{"statusCode":400,"responseTime":17,"contentLength":9},"message":"PUT](http://10.20.190.101:5601/app/kibana%22%7D,%22res%22:%7B%22statusCode%22:400,%22responseTime%22:17,%22contentLength%22:9%7D,%22message%22:%22PUT) /es\_admin/.kibana/\_mapping/search 400 17ms - 9.0B"}

Alpine:

> curl -s -XGET 'elasticsearch:9200/.kibana/\_mapping/search' | jq .  
> {}

Ubuntu:

> curl -s -XGET 'elasticsearch:9200/.kibana/\_mapping/search' | jq .  
> {  
> ".kibana": {  
> "mappings": {  
> "search": {  
> "properties": {  
> "columns": {  
> "type": "text",  
> "fields": {  
> "keyword": {  
> "type": "keyword",  
> "ignore\_above": 256  
> .  
> .

Is it installation of Kibana that has failed?

Br Mathias

---

<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: [April 20, 2017, 4:56am UTC](https://discuss.elastic.co/t/failed-to-put-mappings-on-indices/82871/2 "2017-04-20T04:56:38Z")

</div>

> [@mathias](#):
>
> mapper [hits] cannot be changed from type [long] to [integer]

Looks lie a conflict.

Do you have dashboards in KB you need?

---

<div class="post-metadata">

### Author: ![mathias](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mathias/32/23176_2.png) [@mathias](https://discuss.elastic.co/u/mathias)
#### Post date: [April 20, 2017, 11:00am UTC](https://discuss.elastic.co/t/failed-to-put-mappings-on-indices/82871/3 "2017-04-20T11:00:24Z")

</div>

Hi,

I found out that the error were generated when I started metricbeat.  
Metricbeat had problems to download the dashboards due to no internet connection.

This also caused Kibana to fail.

After loading dashboards from local file errors disappeared and kibana works as expected.

Br Mathias

---

<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: [May 18, 2017, 11:06am UTC](https://discuss.elastic.co/t/failed-to-put-mappings-on-indices/82871/4 "2017-05-18T11:06:57Z")

</div>

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