# Template PUT Failing

**URL:** https://discuss.elastic.co/t/template-put-failing/72081
**Category:** Elasticsearch
**Created:** [January 18, 2017, 8:22pm UTC](https://discuss.elastic.co/t/template-put-failing/72081 "2017-01-18T20:22:50Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![kopacko](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kopacko/32/10733_2.png) [@kopacko](https://discuss.elastic.co/u/kopacko)
#### Post date: [January 18, 2017, 8:22pm UTC](https://discuss.elastic.co/t/template-put-failing/72081/1 "2017-01-18T20:22:50Z")

</div>

I am building a new cluster and have copied out my existing template to use for importing into the new cluster:

> {  
> "template": "logstash-_",  
> "order": 0,  
> "settings": {  
> "number\_of\_shards": 4, \<-- ONLY CHANGE  
> "number\_of\_replicas": 0, \<-- ONLY CHANGE  
> "index": {  
> "refresh\_interval": "5s"  
> },  
> "mappings": {  
> "default": {  
> "dynamic\_templates": [  
> {  
> "message\_field": {  
> "mapping": {  
> "fielddata": {  
> "format": "disabled"  
> },  
> "index": "analyzed",  
> "omit\_norms": true,  
> "type": "string"  
> },  
> "match\_mapping\_type": "string",  
> "match": "message"  
> }  
> },  
> {  
> "string\_fields": {  
> "mapping": {  
> "fielddata": {  
> "format": "disabled"  
> },  
> "index": "analyzed",  
> "omit\_norms": true,  
> "type": "string",  
> "fields": {  
> "raw": {  
> "ignore\_above": 256,  
> "index": "not\_analyzed",  
> "type": "string"  
> }  
> }  
> },  
> "match\_mapping\_type": "string",  
> "match": "_"  
> }  
> }  
> ],  
> "\_all": {  
> "omit\_norms": true,  
> "enabled": true  
> },  
> "properties": {  
> "@timestamp": {  
> "type": "date"  
> },  
> "geoip": {  
> "dynamic": true,  
> "properties": {  
> "ip": {  
> "type": "ip"  
> },  
> "latitude": {  
> "type": "float"  
> },  
> "location": {  
> "type": "geo\_point"  
> },  
> "longitude": {  
> "type": "float"  
> }  
> }  
> },  
> "@version": {  
> "index": "not\_analyzed",  
> "type": "string"  
> }  
> }  
> }  
> },  
> "aliases": {}  
> }  
> }

I pulled this directly from an existing, working setup and when I attempt to PUT it, via Kibana, I get this:

> {  
> "error": {  
> "root\_cause": [  
> {  
> "type": "remote\_transport\_exception",  
> "reason": "[########][x.x.x.x:9300][indices:admin/template/put]"  
> }  
> ],  
> "type": "illegal\_argument\_exception",  
> "reason": "unknown setting [index.mappings._default_.\_all.enabled] please check that any required plugins are installed, or check the breaking changes documentation for removed settings"  
> },  
> "status": 400  
> }

Both clusters are 5.1.2.

Can anyone please tell me why on Earth this isn't working?

---

<div class="post-metadata">

### Author: ![blendonline](https://avatars.discourse-cdn.com/v4/letter/b/e480ec/32.png) [@blendonline](https://discuss.elastic.co/u/blendonline)
#### Post date: [January 30, 2017, 8:14am UTC](https://discuss.elastic.co/t/template-put-failing/72081/2 "2017-01-30T08:14:26Z")

</div>

Hi Jason,

I ran into the same error and found your post (hoping to find an answer.. 🙂 ). I've since found out that I had made a mistake which I also see in your json. The "mappings" (and I suspect also "aliases") should be moved outside the "settings" object, so that they come after "settings" instead of within.

---

<div class="post-metadata">

### Author: ![kopacko](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kopacko/32/10733_2.png) [@kopacko](https://discuss.elastic.co/u/kopacko)
#### Post date: [January 30, 2017, 3:05pm UTC](https://discuss.elastic.co/t/template-put-failing/72081/3 "2017-01-30T15:05:23Z")

</div>

Daniel,  
Thank you. I will give that a try and let you know.

I find it odd that it exports one way but cannot be imported the same way.

---

<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: [February 27, 2017, 3:05pm UTC](https://discuss.elastic.co/t/template-put-failing/72081/4 "2017-02-27T15:05:55Z")

</div>

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