javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException

复制代码
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 org.apache.http.conn.ssl.SSLConnectionSocketFactory.createLayeredSocket(SSLConnectionSocketFactory.java:394)
	at org.apache.http.conn.ssl.SSLConnectionSocketFactory.connectSocket(SSLConnectionSocketFactory.java:353)
	at org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:141)
	at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.connect(PoolingHttpClientConnectionManager.java:353)
	at org.apache.http.impl.execchain.MainClientExec.establishRoute(MainClientExec.java:380)
	at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:236)
	at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:184)
	at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:88)
	at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:110)
	at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:184)
	at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:82)
	at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:107)
	at com.bosideng.bsdyun.pos.util.UlucClient.doGet(UlucClient.java:100)
	at com.bosideng.bsdyun.pos.util.UluchttpUtil.getUlucStoresResponse(UluchttpUtil.java:34)
	at com.bosideng.bsdyun.pos.dts.ulucu.GetUlucuCustomerMemberNumToBiJob.download(GetUlucuCustomerMemberNumToBiJob.java:44)
	at com.bosideng.bsdyun.pos.dts.ulucu.GetUlucuMemberNumToBi.process(GetUlucuMemberNumToBi.java:43)
	at com.alibaba.dts.client.executor.simple.processor.SimpleTaskProcessor.executeTask(SimpleTaskProcessor.java:163)
	at com.alibaba.dts.client.executor.simple.processor.SimpleTaskProcessor.run(SimpleTaskProcessor.java:101)
Caused by: 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.validator.PKIXValidator.doBuild(PKIXValidator.java:387)
	at sun.security.validator.PKIXValidator.engineValidate(PKIXValidator.java:292)
	at sun.security.validator.Validator.validate(Validator.java:260)
	at sun.security.ssl.X509TrustManagerImpl.validate(X509TrustManagerImpl.java:324)
	at sun.security.ssl.X509TrustManagerImpl.checkTrusted(X509TrustManagerImpl.java:229)
	at sun.security.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:124)
	at sun.security.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1491)
	... 25 more
Caused by: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
	at sun.security.provider.certpath.SunCertPathBuilder.build(SunCertPathBuilder.java:146)
	at sun.security.provider.certpath.SunCertPathBuilder.engineBuild(SunCertPathBuilder.java:131)
	at java.security.cert.CertPathBuilder.build(CertPathBuilder.java:280)
	at sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:382)
	... 31 more

调用API接口,返回以上错误。

排查结果:SSL证书进行了更新,本地有缓存,导致严重不通过,清除本地证书缓存可以解决

bash 复制代码
sudo update-ca-certificates
相关推荐
紫色的路4 分钟前
TCP消息边界处理的精妙算法
c++·网络协议·tcp/ip·算法
知乎的哥廷根数学学派4 分钟前
基于高阶统计量引导的小波自适应块阈值地震信号降噪算法(MATLAB)
网络·人工智能·pytorch·深度学习·算法·机器学习·matlab
wusp19945 分钟前
SSL 证书自动化系统架构文档
系统架构·自动化·ssl
DeepFlow 零侵扰全栈可观测5 分钟前
DeepFlow 实践:利用 eBPF 实现覆盖从网关到数据库的全栈分布式追踪
网络·分布式·云原生·云计算
松涛和鸣8 分钟前
51、51单片机
c语言·网络·单片机·嵌入式硬件·tcp/ip·51单片机
CHENKONG_CK18 分钟前
晨控CK-FR09EIP与汇川H5U系列PLC配置EtherNet/IP通讯连接手册
网络·网络协议·自动化·rfid
上海云盾安全满满20 分钟前
面对T级大流量攻击,业务如何确保稳定可用
网络
古城小栈27 分钟前
Rust 异步、并发 一文全解
网络·rust
小码吃趴菜37 分钟前
tcp连结建立与断开(三握手四挥手)
服务器·网络·tcp/ip
WTCLLB40 分钟前
cmd-set-ip
网络·windows