https请求java证书异常javax.net.ssl.SSLHandshakeException
2018-09-06 09:23
696 查看
今天java程序部署完毕,也没访问请问无内容,查看日志:
Caused by: 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 sun.security.ssl.Alerts.getSSLException(Alerts.java:192) at sun.security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1949) at sun.security.ssl.Handshaker.fatalSE(Handshaker.java:302) at sun.security.ssl.Handshaker.fatalSE(Handshaker.java:296) at sun.security.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1509) at sun.security.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:216) at sun.security.ssl.Handshaker.processLoop(Handshaker.java:979) at sun.security.ssl.Handshaker.process_record(Handshaker.java:914) at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:1062) at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1375) at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1403) at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1387) at sun.net.www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:559) at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:185) at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1513) at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1441) at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:254) at com.seedeer.common.util.HttpUtil.sendGet(HttpUtil.java:372)
1.查看当前已经加入的java信任的证书
keytool -list -keystore /usr/java/jdk1.8.0_91/jre/lib/security/cacerts
2.页面访问,导出证书
2.1.右键 - 属性 - 证书
2.2.复制证书到文件
3.在服务导入页面上保存的证书
keytool -import -alias seed -keystore /usr/java/jdk1.8.0_91/jre/lib/security/cacerts -file ./seed.cer
4.重启java服务器,问题解决
相关文章推荐
- 解决Java调用https服务证书错误javax.net.ssl.SSLHandshakeException
- android 访问https 证书问题 报错javax.net.ssl.SSLHandshakeException
- 解决Java调用Azure SDK证书错误javax.net.ssl.SSLHandshakeException
- 访问https,抛出的异常javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure
- 使用Java访问https接口javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure
- 处理Https 异常记录 javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure
- 解决 Java 调用 Azure SDK 证书错误 javax.net.ssl.SSLHandshakeException
- android ksoap2 访问https javax.net.ssl.SSLHandshakeException: java.security.cert.CertPathValidatorExce
- 用httpclient发送https协议请求以及javax.net.ssl.SSLHandshakeException解决办法
- 解决Java调用Azure SDK证书错误javax.net.ssl.SSLHandshakeException
- andorid HTTPS 不需要证书 VolleyEror: com.android.volley.NoConnectionError: javax.net.ssl.SSLHandshakeException: java.security.cert.CertPathValidatorException: Trust anchor for certification path not fou
- xUtils3 Https请求报错:javax.net.ssl.SSLPeerUnverifiedException: Hostname ***.****.**not verified,跳过证书检测
- 解决Volley的javax.net.ssl.SSLHandshakeException异常
- [Java] 绕过证书验证调 HTTPS 接口时报 “SSLHandshakeException: DHPublicKey does not comply to algorithm constraints”的解决办法
- javax.net.ssl.SSLHandshakeException:PKIX path building failed多个证书解决方法
- 微信证书 javax.net.ssl.SSLException: java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty
- 调用https接口抛出javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path
- javax.net.ssl.SSLHandshakeException(Cas导入证书)
- FireFox火狐浏览器打开证书管理器方法& javax.net.ssl.SSLHandshakeException
- https请求报错解决:javax.net.ssl.SSLException: Not trusted ...