sudo yum upgrade nss解决java.security.KeyException错误

2023-05-04 20:42:47 浏览数 (3)

java项目在本机运行正常,部署到linux服务器报Java.security.ProviderException的错误。 升级更新nss之后即可解决:

代码语言:javascript复制
yum upgrade nss

错误如下:

代码语言:javascript复制
javax.NET.ssl.SSLException: Java.security.ProviderException: java.security.KeyException 
at sun.security.ssl.Alerts.getSSLException(Alerts.java:208) 
at sun.security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1916) 
at sun.security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1874) 
at sun.security.ssl.SSLSocketImpl.handleException(SSLSocketImpl.java:1857) 
at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1378) 
at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1355) 
at org.apache.http.conn.ssl.SSLConnectionSocketFactory.createLayeredSocket(SSLConnectionSocketFactory.java:275) 
at org.apache.http.conn.ssl.SSLConnectionSocketFactory.connectSocket(SSLConnectionSocketFactory.java:254) 
at org.apache.http.impl.conn.HttpClientConnectionOperator.connect(HttpClientConnectionOperator.java:123) 
at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.connect(PoolingHttpClientConnectionManager.java:318) 
at org.apache.http.impl.execchain.MainClientExec.establishRoute(MainClientExec.java:363) 
at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:219) 
at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:195) 
at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:86) 
at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:108) 
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:106)

0 人点赞