我正在尝试连接到开发opensearch服务器。服务器具有自签名证书。
根据我尝试连接此url的文档:
jdbc:opensearch://https://dev01.sandbox.corp:9200/?hostnameVerification=false
但这给了我这个错误:
Connection error javax.net.ssl.SSLHandshakeException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target javax.net.ssl.SSLHandshakeException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target javax.net.ssl.SSLHandshakeException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target unable to find valid certification path to requested target unable to find valid certification path to requested target
我如何使此连接正常工作?
添加 trustSelfSigned=true param成功了。
所以Url看起来像这样:
jdbc:opensearch://https://dev01.sandbox.corp:9200/?hostnameVerification=false&trustSelfSigned=true