# Error multiple index templates may not match during index creation

**URL:** <https://discuss.elastic.co/t/error-multiple-index-templates-may-not-match-during-index-creation/299666>\
**Category:** Elasticsearch\
**Created:** [March 14, 2022, 8:34pm UTC](https://discuss.elastic.co/t/error-multiple-index-templates-may-not-match-during-index-creation/299666 "2022-03-14T20:34:15Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Guif](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/guif/32/103032_2.png) [@Guif](https://discuss.elastic.co/u/Guif)\
**Post date:** [March 14, 2022, 8:34pm UTC](https://discuss.elastic.co/t/error-multiple-index-templates-may-not-match-during-index-creation/299666/1 "2022-03-14T20:34:15Z")

</div>

Hi,

I got the following error message in kibana.log

`{"type":"log","@timestamp":"2022-03-14T21:31:34+01:00","tags":["error","plugins","security","session","index"],"pid":14270,"message":"Failed to create session index template: illegal_argument_exception: [illegal_argument_exception] Reason: index template [.kibana_security_session_index_template_1] has index patterns [.kibana_security_session_1] matching patterns from existing templates [defaults] with patterns (defaults => [*]) that have the same priority [0], multiple index templates may not match during index creation, please use a different priority"}`

Only executed after install Kibana this:

```auto
cat > template.json << EOF
{
  "index_patterns": ["*"],
  "template": {
    "settings": {
      "index": {
        "number_of_shards": 1,
        "number_of_replicas": 0
      }
    }
  }
}
EOF

curl -u "elastic:password" -XPUT -H'Content-type: application/json' http://localhost:9200/_index_template/defaults -d @template.json

```

What exaclty mean? How can I remove this?

---

<div class="post-metadata">

**Author:** ![casterQ](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/casterq/32/93257_2.png) [@casterQ](https://discuss.elastic.co/u/casterQ)\
**Post date:** [March 15, 2022, 7:28am UTC](https://discuss.elastic.co/t/error-multiple-index-templates-may-not-match-during-index-creation/299666/2 "2022-03-15T07:28:23Z")

</div>

Set `priority` parameters different from other templates

> **[Create or update index template API | Elasticsearch Guide \[8.1\] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/8.1/indices-put-template.html)**

---

<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:** [April 12, 2022, 7:28am UTC](https://discuss.elastic.co/t/error-multiple-index-templates-may-not-match-during-index-creation/299666/3 "2022-04-12T07:28:40Z")

</div>

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