【es】ERROR: Failed to establish SSL connection to elasticsearch at https
1.es初始化失败。
·
1.es初始化失败。
----ES 设置密码总是失败。
SSL connection to https://127.0.0.1:9200/_security/_authenticate?pretty failed: No subject alternative names present
Please check the elasticsearch SSL settings under xpack.security.http.ssl.
ERROR: Failed to establish SSL connection to elasticsearch at https://127.0.0.1:9200/_security/_authenticate?pretty.
--解决方法。
1).设置认证证书
./elasticsearch-certutil ca
./elasticsearch-certutil cert --ca elastic-stack-ca.p12
2).https模式启动ES(初始化);
vim elasticsearch.yml
xpack.security.enabled: true
xpack.security.transport.ssl.enabled: true
xpack.security.transport.ssl.verification_mode: certificate
xpack.security.transport.ssl.client_authentication: required
xpack.security.transport.ssl.keystore.path: elastic-certificates.p12
xpack.security.transport.ssl.truststore.path: elastic-certificates.p12
xpack.security.audit.enabled: true
xpack.security.http.ssl.enabled: true
xpack.security.http.ssl.keystore.path: elastic-certificates.p12
xpack.security.http.ssl.truststore.path: elastic-certificates.p12
3).注释如下三个参数并重启ES
vim elasticsearch.yml
#xpack.security.http.ssl.enabled: true
#xpack.security.http.ssl.keystore.path: elastic-certificates.p12
#xpack.security.http.ssl.truststore.path: elastic-certificates.p12
重启:
kill $(ps -ef | grep elasticsearch | grep java |grep -v yace | awk '{print $2}')
elasticsearch -d
4).设置密码
elasticsearch-setup-passwords interactive
5).取消注释如下三个参数并重启。
vim elasticsearch.yml
xpack.security.http.ssl.enabled: true
xpack.security.http.ssl.keystore.path: elastic-certificates.p12
xpack.security.http.ssl.truststore.path: elastic-certificates.p12
重启:
kill $(ps -ef | grep elasticsearch | grep java |grep -v yace | awk '{print $2}')
elasticsearch -d
火山引擎开发者社区是火山引擎打造的AI技术生态平台,聚焦Agent与大模型开发,提供豆包系列模型(图像/视频/视觉)、智能分析与会话工具,并配套评测集、动手实验室及行业案例库。社区通过技术沙龙、挑战赛等活动促进开发者成长,新用户可领50万Tokens权益,助力构建智能应用。
更多推荐
所有评论(0)