首页 > 技术文章 > elasitcsearch 开启认证后,报DecoderException: javax.net.ssl.SSLHandshakeException: No available authentic异常

zkwarrior 2022-02-23 11:17 原文

elasitcsearch 开启认证后,报DecoderException: javax.net.ssl.SSLHandshakeException: No available authentic异常

(75条消息) elasitcsearch 开启认证后,报DecoderException: javax.net.ssl.SSLHandshakeException: No available authentic异常_donlian的专栏-CSDN博客

解决方法主要参考了

https://www.elastic.co/guide/en/elasticsearch/reference/6.3/configuring-tls.html#node-certificates。

总体意思是TCP通信,使用ssl加密通信。

第一步:在ES的根目录生成CA证书

bin/elasticsearch-certutil ca
中间需要设置密码,直接回车可以不设置(慎重考虑)。

第二步:使用第一步生成的证书,产生p12密钥

bin/elasticsearch-certutil cert --ca elastic-stack-ca.p12
此时文件大概如下:

 

第三步:在config目录创建certs目录

第四步:拷贝p12文件至certs目录

 

第五步:修改设置

修改后的配置如下:

xpack.security.enabled: true
xpack.license.self_generated.type: basic
xpack.security.transport.ssl.enabled: true
xpack.security.transport.ssl.verification_mode: certificate
xpack.security.transport.ssl.keystore.path: certs/elastic-certificates.p12
xpack.security.transport.ssl.truststore.path: certs/elastic-certificates.p12
第六步:重启ES,错误消失
————————————————
版权声明:本文为CSDN博主「猿界汪汪队」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/donlian/article/details/108416999

推荐阅读