# Applying license illegal\_argument\_exception unknown setting \[index.license.expiry\_date\_in\_millis\]

**URL:** <https://discuss.elastic.co/t/applying-license-illegal-argument-exception-unknown-setting-index-license-expiry-date-in-millis/111912>\
**Category:** Elasticsearch\
**Created:** [December 15, 2017, 7:00am UTC](https://discuss.elastic.co/t/applying-license-illegal-argument-exception-unknown-setting-index-license-expiry-date-in-millis/111912 "2017-12-15T07:00:56Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![undelete](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/undelete/32/24186_2.png) [@undelete](https://discuss.elastic.co/u/undelete)\
**Post date:** [December 15, 2017, 7:00am UTC](https://discuss.elastic.co/t/applying-license-illegal-argument-exception-unknown-setting-index-license-expiry-date-in-millis/111912/1 "2017-12-15T07:00:57Z")

</div>

Hi,

I am trying to apply basic license to my elastic. I just downloaded the license as a license for version 5.x/6.x.

Running this command: `curl -XPUT -u elastic 'http://localhost:9200/_xpack_license' -H "Content-Type: application/json" -d @/tmp/license.json`

Error message: `{"error":{"root_cause":[{"type":"illegal_argument_exception","reason":"unknown setting [index.license.expiry_date_in_millis] please check that any required plugins are installed, or check the breaking changes documentation for removed settings"}],"type":"illegal_argument_exception","reason":"unknown setting [index.license.expiry_date_in_millis] please check that any required plugins are installed, or check the breaking changes documentation for remov`

If I run: curl -XGET "[http://localhost:9200](http://localhost:9200)" -u elastic  
Output is: `{ "name" : "server", "cluster_name" : "elastic-um", "cluster_uuid" : "AibV0Lf6T9Ssj3LPexfIFQ", "version" : { "number" : "6.0.0", "build_hash" : "8f0685b", "build_date" : "2017-11-10T18:41:22.859Z", "build_snapshot" : false, "lucene_version" : "7.0.1", "minimum_wire_compatibility_version" : "5.6.0", "minimum_index_compatibility_version" : "5.0.0" }, "tagline" : "You Know, for Search" }`

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [December 15, 2017, 8:45am UTC](https://discuss.elastic.co/t/applying-license-illegal-argument-exception-unknown-setting-index-license-expiry-date-in-millis/111912/2 "2017-12-15T08:45:40Z")

</div>

I did not check the docs but I’m pretty sure this is wrong

```
_xpack_license

```

Should be probably

```
_xpack/_license
```

---

<div class="post-metadata">

**Author:** ![undelete](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/undelete/32/24186_2.png) [@undelete](https://discuss.elastic.co/u/undelete)\
**Post date:** [December 15, 2017, 9:03am UTC](https://discuss.elastic.co/t/applying-license-illegal-argument-exception-unknown-setting-index-license-expiry-date-in-millis/111912/3 "2017-12-15T09:03:21Z")

</div>

Indeed, that helped but now I got this error message instead:

```auto
{"error":"Incorrect HTTP method for uri [/_xpack/_license] and method [PUT], allowed: [POST]","status":405}

```

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [December 15, 2017, 10:02am UTC](https://discuss.elastic.co/t/applying-license-illegal-argument-exception-unknown-setting-index-license-expiry-date-in-millis/111912/4 "2017-12-15T10:02:32Z")

</div>

The right syntax is documented there: [https://www.elastic.co/guide/en/x-pack/current/installing-license.html](https://www.elastic.co/guide/en/x-pack/current/installing-license.html)

`http://<host>:<port>/_xpack/license`

---

<div class="post-metadata">

**Author:** ![undelete](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/undelete/32/24186_2.png) [@undelete](https://discuss.elastic.co/u/undelete)\
**Post date:** [December 15, 2017, 10:04am UTC](https://discuss.elastic.co/t/applying-license-illegal-argument-exception-unknown-setting-index-license-expiry-date-in-millis/111912/5 "2017-12-15T10:04:42Z")

</div>

Thanks! That helped!

---

<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:** [January 12, 2018, 10:04am UTC](https://discuss.elastic.co/t/applying-license-illegal-argument-exception-unknown-setting-index-license-expiry-date-in-millis/111912/6 "2018-01-12T10:04:48Z")

</div>

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