浏览器访问ES断开报错:http client did not trust this server's certificate.

启动ElasticSearch服务后,浏览器访问https://localhost:9200报错,无返回结果

原因分析:自从8开始,默认开启 SSL 加密通信。但是服务器用的自签名证书,导致错误。
如果是本地测试用的环境,建议把启用xpack的安全功能的开关关闭,通过http://localhost:9200访问。

1
2
3
4
5
6
7
8
9
10
vi elasticsearch.yml
xpack.security.enabled: false
...
xpack.security.enrollment.enabled: false
...
xpack.security.http.ssl:
enabled: false
...
xpack.security.transport.ssl:
enabled: false