操作系统: CentOS 7.0 64位
java version:java version "1.7.0_75"
错误信息:javax.net.ssl.SSLException: java.lang.RuntimeException: Could not generate secret
at sun.security.ssl.Alerts.getSSLException(Alerts.java:208)
at sun.security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1904)
at sun.security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1862)
at sun.security.ssl.SSLSocketImpl.handleException(SSLSocketImpl.java:1845)
at sun.security.ssl.SSLSocketImpl.handleException(SSLSocketImpl.java:1771)
at sun.security.ssl.AppOutputStream.write(AppOutputStream.java:127)
at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:82)
at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:140)
at org.apache.commons.httpclient.HttpConnection.flushRequestOutputStream(HttpConnection.java:828)
at org.apache.commons.httpclient.HttpMethodBase.writeRequest(HttpMethodBase.java:2116)
at org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.java:1096)
at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:398)
at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:171)
at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397)
at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:323)
解决:
修改文件 jre\lib\security\java.security
Add a new security provider line
Below is the example where I added line 10 after the entry for security provider 9 on my laptop.
添加:
security.provider.9=sun.security.mscapi.SunMSCAPI
security.provider.10=iaik.security.provider.IAIK
catalina.sh添加:
JAVA_OPTS='-Dcoldfusion.disablejsafe=true
-Dcom.sun.net.ssl.enableECC=false'