elastic中的访问控制-rest请求缺少身份验证凭据

8ulbf1ek  于 2021-06-14  发布在  ElasticSearch
关注(0)|答案(0)|浏览(397)

我使用的是elastic 7.9.2版本,希望使用安全性。所以我跑了:

bin/elasticsearch-certutil cert -out config/elastic-certificates.p12 -pass ""

然后加上

xpack.security.enabled: true
xpack.security.transport.ssl.enabled: true
xpack.security.transport.ssl.verification_mode: certificate
xpack.security.transport.ssl.keystore.path: elastic-certificates.p12
xpack.security.transport.ssl.truststore.path: elastic-certificates.p1

config/elasticsearch.yaml 现在当我运行es时

bin/elasticsearch

获取以下错误:

"error":{"root_cause":[{"type":"security_exception","reason":"missing authentication credentials
 for REST request [/]","header":{"WWW-Authenticate":"Basic realm=\"security\" charset=\"UTF-
8\""}}],"type":"security_exception","reason":"missing authentication credentials for REST 
request [/]","header":{"WWW-Authenticate":"Basic realm=\"security\" charset=\"UTF-
8\""}},"status":401}root@ip-localhost:/var/log/elasticsearch

谁能帮帮我!

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题