java.security.ProviderException: java.security.KeyException

本机部署没问题,部署到linux服务器报错 
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)

 

一般是JDK不同厂商导致的,需要换成换成sun的jdk版本。检查linux上的是否为openjdk。

 

解决

1.更新nss

sudo yum upgrade nss

2.重启服务器

 

posted @ 2017-02-14 20:11  phpdragon  阅读(1062)  评论(0)    收藏  举报
编辑推荐:
· 为什么说方法的参数最好不要超过4个?
· C#.Net 筑基-优雅 LINQ 的查询艺术
· 一个自认为理想主义者的程序员,写了5年公众号、博客的初衷
· 大数据高并发核心场景实战,数据持久化之冷热分离
· 运维排查 | SaltStack 远程命令执行中文乱码问题
阅读排行:
· C#.Net筑基-优雅LINQ的查询艺术
· 博客园众包平台:诚征3D影像景深延拓实时处理方案(预算8-15万)
· Cursor生成UI,加一步封神
· 为什么说方法的参数最好不要超过4个?
· [原创]《C#高级GDI+实战:从零开发一个流程图》第04章:来个圆形,连线它!
点击右上角即可分享
微信分享提示