add trust cert into JAVA_HOME

程序异常:

21:20:31,578 ERROR [com.calix.sxa.user.ws.UserWs] (http-/0.0.0.0:8443-625) Failed to create jasper user: api-user: com.calix.reports.client.JasperReportsException: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
        at com.calix.reports.impl.JasperReportsClientImpl.initSession(JasperReportsClientImpl.java:247) [jasperserver-client-2.29.0.jar:]
        at com.calix.sxa.user.ws.UserWsImpl.getJasperReportsClient(UserWsImpl.java:909) [classes:]
        at com.calix.sxa.user.ws.UserWsImpl.syncJasperUser(UserWsImpl.java:925) [classes:]

1.通过浏览器打开HTTPS网址,导出证书

 2. 通过keytool导入公钥

keytool -import -alias calix-com -keystore /opt/java/jre/lib/security/cacerts -file calix-com.crt

 default password is changeit

这边选择Yes

3.通过keytool导出公钥,查询

keytool -list -keystore cacerts -v >test.crt

猜你喜欢

转载自www.cnblogs.com/tben/p/12693358.html