场景Elasticsearch在开启xpack认证之后, 直接通过curl访问接口会报错:
1missing authentication credentials for REST request
解决使用curl时带上认证相关参数:
-u, –user <user:password> Server user and password
在终端curl请求ES的REST API时, 可以用以下形式:
12curl -u yourusername:yourpassword -XGET ‘localhost:9200/_cat/health’1637081511 16:5...