1. 添加配置 elasticsearch.yml 配置
xpack.security.enabled: true xpack.license.self_generated.type: basic xpack.security.transport.ssl.enabled: true
如果报错
Unexpected response code [500] from calling GET http://172.16.0.199:9210/_security/_authenticate?pretty
It doesn't look like the X-Pack security feature is enabled on this Elasticsearch node.
Please check if you have enabled X-Pack security in your elasticsearch.yml configuration file.
ERROR: X-Pack Security is disabled by configuration.
配置:下面的启动
http.cors.enabled: true
http.cors.a