And restarted elasticsearch then it gives me this error:
ERROR: [1] bootstrap checks failed
[1]: Transport SSL must be enabled if security is enabled on a [basic] license. Please set [xpack.security.transport.ssl.enabled] to [true] or disable security by setting [xpack.security.enabled] to [false]
As per documentation it should start when xpack.security.enabled is true and xpack.license.self_generated.type is trial.
You are not actually running with a trial license. xpack.license.self_generated.type takes effect only if you add it in your configuration before the first time you run elasticsearch. Otherwise, it will start and self-generate a basic license, which is what happened in your case. You can still start a trial if you want to, but you have to use the start trial API
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.