報錯信息
master 報錯日志信息 :elastic ssl.SSLHandshakeException: no cipher suites in common
node 節點報錯日志信息 :[2020-08-28T03:51:07,537][WARN ][o.e.t.OutboundHandler ] [elasticsearch-data-0] send message failed [channel: Netty4TcpChannel{localAddress=0.0.0.0/0.0.0.0:40314, remoteAddress=elasticsearch-discovery/10.107.243.185:9300}]
javax.net.ssl.SSLException: Received fatal alert: handshake_failure
報的是ssl 錯誤,原因沒有證書,es 使用x-pack啟用了 ssl需生成證書, 制作證書參考下面網址
https://www.elastic.co/guide/en/elasticsearch/reference/6.3/configuring-tls.html#node-certificates
制作證書
bin/elasticsearch-certutil ca
bin/elasticsearch-certutil cert --ca elastic-stack-ca.p12
將以下配置添加到配置文件
http.cors.enabled: true
http.cors.allow-origin: "*"
http.cors.allow-headers: Authorization,X-Requested-With,Content-Length,Content-Type
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: elastic-certificates.p12
xpack.security.transport.ssl.truststore.path: elastic-certificates.p12
配置證書到配置文件重啟就ok 了!