Update fail... Marvel from Trial to basic

today i want to update my marvel license from Trial to basic.
#curl -XPUT 'http://localhost/_license' -d @mylic.json
#{"statusCode":400,"error":"Bad Request","message":"Missing kbn-version header"

then i modify elasticsearch.yml,append the follow lines:

type: local
host: [ "http://es.test.com" ]
username: admin
password: Q1W2E3R4

when i restart Elasticsearch,i also do not update,and return:
#{"statusCode":400,"error":"Bad Request","message":"Missing kbn-version header"

could you help me ? thank you!

I forgot my username and password.


It looks like the error may be as simple as the fact that you are not specifying the port for your Elasticsearch node. It appears that port 80 is being used by Kibana on that server, so you probably want to send:

curl -XPUT 'http://localhost:9200/_license' -d @mylic.json

Note the :9200 in there. 9200 is the default HTTP port for Elasticsearch; if you changed it, as Kibana was changed, then simply fill in the appropriate number there.

Hope that helps,

Okey! thank you!
update successful!

what is the equivalent command to upgrade Trial version to basic using SENSE plugin