i've add xpack.security.enabled: true in Elasticsearch.yml.
but when i restart the Elasticsearch service, the service didn't start properly.
[2022-02-13T18:32:21,955][INFO ][o.e.n.Node ] [anser64] initialized
[2022-02-13T18:32:21,956][INFO ][o.e.n.Node ] [anser64] starting ...
[2022-02-13T18:32:21,971][INFO ][o.e.x.s.c.f.PersistentCache] [anser64] persistent cache index loaded
[2022-02-13T18:32:21,972][INFO ][o.e.x.d.l.DeprecationIndexingComponent] [anser64] deprecation component started
[2022-02-13T18:32:22,098][INFO ][o.e.t.TransportService ] [anser64] publish_address {10.50.1.64:9300}, bound_addresses {[::]:9300}
[2022-02-13T18:32:23,073][INFO ][o.e.b.BootstrapChecks ] [anser64] bound or publishing to a non-loopback address, enforcing bootstrap checks
[2022-02-13T18:32:23,119][ERROR][o.e.b.Bootstrap ] [anser64] node validation exception
[1] bootstrap checks failed. You must address the points described in the following [1] lines before starting Elasticsearch.
bootstrap check failure [1] of [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]
[2022-02-13T18:32:23,122][INFO ][o.e.n.Node ] [anser64] stopping ...
[2022-02-13T18:32:23,149][INFO ][o.e.n.Node ] [anser64] stopped
[2022-02-13T18:32:23,157][INFO ][o.e.n.Node ] [anser64] closing ...
[2022-02-13T18:32:23,189][INFO ][o.e.n.Node ] [anser64] closed
[2022-02-13T18:32:23,193][INFO ][o.e.x.m.p.NativeController] [anser64] Native controller process has stopped - no new native processes can be started