Which version of Elasticsearch are you using? I.e. what does curl localhost:9200 report? I tried literally the same command on my local machine and it worked fine:
Ah you've edited your original post which linked to the 7.0 documentation. The URI is different in 6.3: POST _xpack/license/start_trial?acknowledge=true.
Note that the 6.3 series is no longer maintained. If you're trying out new features, it'd be best to use the most recent version you can, either 7.0.1 (latest) or 6.7.2 (maintenance) at time of writing.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.