# Update Marvel license failed

**URL:** <https://discuss.elastic.co/t/update-marvel-license-failed/38495>\
**Category:** Elasticsearch\
**Created:** [January 6, 2016, 11:03am UTC](https://discuss.elastic.co/t/update-marvel-license-failed/38495 "2016-01-06T11:03:03Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![OlivierD](https://avatars.discourse-cdn.com/v4/letter/o/ac8455/32.png) [@OlivierD](https://discuss.elastic.co/u/OlivierD)\
**Post date:** [January 6, 2016, 11:03am UTC](https://discuss.elastic.co/t/update-marvel-license-failed/38495/1 "2016-01-06T11:03:03Z")

</div>

I have installed a "trial" license for Marvel and the status is now "expired".  
I downloaded a "Basic License" and I try to install it (ElasticSearch is in v2.1.0).

curl -XPUT -u admin '[http://192.168.0.4:9200/\_license](http://192.168.0.4:9200/_license)' -d @license.json

I got this error :

{"error":{"root\_cause":[{"type":"parse\_exception","reason":"Failed to derive xcontent"}],"type":"parse\_exception","reason":"Failed to derive xcontent"},"status":400}

My host is a Windows 2012 Server ; I tried to replace ' by " but the result is the same.

---

<div class="post-metadata">

**Author:** ![OlivierD](https://avatars.discourse-cdn.com/v4/letter/o/ac8455/32.png) [@OlivierD](https://discuss.elastic.co/u/OlivierD)\
**Post date:** [January 6, 2016, 12:44pm UTC](https://discuss.elastic.co/t/update-marvel-license-failed/38495/2 "2016-01-06T12:44:33Z")

</div>

I just see that there is an issue on that problem : [https://github.com/elastic/elasticsearch/issues/15677](https://github.com/elastic/elasticsearch/issues/15677)

---

<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:** [January 6, 2016, 9:45pm UTC](https://discuss.elastic.co/t/update-marvel-license-failed/38495/3 "2016-01-06T21:45:16Z")

</div>

I've also raised this against our internal Marvel issue tracker, I can't provide a link though sorry.

---

<div class="post-metadata">

**Author:** ![skearns](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/skearns/32/125945_2.png) [@skearns](https://discuss.elastic.co/u/skearns)\
**Post date:** [January 7, 2016, 3:41am UTC](https://discuss.elastic.co/t/update-marvel-license-failed/38495/4 "2016-01-07T03:41:27Z")

</div>

Oliver, this error occurs when there is no body sent in the curl request to the license API. Can you confirm that you are referencing the Basic license json file you downloaded instead of `license.json`

For me, a successful command looks sort of like this (actual path and filename changed)

```auto
 curl -XPUT -u admin 'http://192.168.0.4:9200/_license' -d @/path/to/my/license/steve-kearns-guid.json

```

---

<div class="post-metadata">

**Author:** ![OlivierD](https://avatars.discourse-cdn.com/v4/letter/o/ac8455/32.png) [@OlivierD](https://discuss.elastic.co/u/OlivierD)\
**Post date:** [January 11, 2016, 11:01am UTC](https://discuss.elastic.co/t/update-marvel-license-failed/38495/5 "2016-01-11T11:01:39Z")

</div>

Hi Steve, I confirm that I have referenced the Basic license json file I downloaded.

---

<div class="post-metadata">

**Author:** ![skearns](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/skearns/32/125945_2.png) [@skearns](https://discuss.elastic.co/u/skearns)\
**Post date:** [January 12, 2016, 7:06am UTC](https://discuss.elastic.co/t/update-marvel-license-failed/38495/6 "2016-01-12T07:06:20Z")

</div>

Hm. Can you verify that the license file itself is not empty? The error message still makes me think that no content from the license file is making it to Elasticsearch.

In your original post, you mentioned that you are running Windows. How are you running curl? Are you using powershell, cygwin, or cmd.exe as your terminal?

---

<div class="post-metadata">

**Author:** ![OlivierD](https://avatars.discourse-cdn.com/v4/letter/o/ac8455/32.png) [@OlivierD](https://discuss.elastic.co/u/OlivierD)\
**Post date:** [January 15, 2016, 1:42pm UTC](https://discuss.elastic.co/t/update-marvel-license-failed/38495/7 "2016-01-15T13:42:51Z")

</div>

I test the command line both with cmd.exe and conEmu ([http://conemu.github.io/](http://conemu.github.io/)).  
I use curl 7.44.0 (i686-pc-msys).

The JSON file is not empty and it is well formated and filled.

---

<div class="post-metadata">

**Author:** ![skearns](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/skearns/32/125945_2.png) [@skearns](https://discuss.elastic.co/u/skearns)\
**Post date:** [January 16, 2016, 12:43am UTC](https://discuss.elastic.co/t/update-marvel-license-failed/38495/8 "2016-01-16T00:43:36Z")

</div>

Did you try using the full path to the file, instead of a relative path?

---

<div class="post-metadata">

**Author:** ![misomij](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/misomij/32/10700_2.png) [@misomij](https://discuss.elastic.co/u/misomij)\
**Post date:** [November 30, 2016, 11:59am UTC](https://discuss.elastic.co/t/update-marvel-license-failed/38495/9 "2016-11-30T11:59:10Z")

</div>

Any update on this?  
I am getting the same error on 2.4.1 😕

---

<div class="post-metadata">

**Author:** ![Ray-Eldath](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ray-eldath/32/14466_2.png) [@Ray-Eldath](https://discuss.elastic.co/u/Ray-Eldath)\
**Post date:** [January 11, 2017, 12:50pm UTC](https://discuss.elastic.co/t/update-marvel-license-failed/38495/10 "2017-01-11T12:50:52Z")

</div>

Any progress?  
I am getting the same error too, on 5.1.1:sob:

---

<div class="post-metadata">

**Author:** ![harpax](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/harpax/32/11652_2.png) [@harpax](https://discuss.elastic.co/u/harpax)\
**Post date:** [January 14, 2017, 3:09pm UTC](https://discuss.elastic.co/t/update-marvel-license-failed/38495/11 "2017-01-14T15:09:08Z")

</div>

I had the same error, but then made sure, that the json file contains the correct content, which it didn't.

I had a typo in the curl call and used a large `D` as flag which writes the response to the file.

Maybe that can be of use to someone 😉

---

<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:** [July 5, 2017, 10:04pm UTC](https://discuss.elastic.co/t/update-marvel-license-failed/38495/12 "2017-07-05T22:04:11Z")

</div>


