javax.net.ssl.SSLProtocolException: handshake alert: unrecognized_name
来源:互联网 发布:java程序设计教程视频 编辑:程序博客网 时间:2024/06/04 19:44
服务器在请求微信接口时经常抛出错误信息如下:
javax.net.ssl.SSLProtocolException: handshake alert: unrecognized_name at sun.security.ssl.ClientHandshaker.handshakeAlert(ClientHandshaker.java:1292) at sun.security.ssl.SSLSocketImpl.recvAlert(SSLSocketImpl.java:1952) at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:1077) at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1312) at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1339) at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1323) 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:117) at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.connect(PoolingHttpClientConnectionManager.java:314) 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:186) at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:72) at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:214) at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:160) at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:136)
服务器java版本:
java version "1.7.0_51"
在TOMCAT_HOME/bin/catalina.sh中加入-Djsse.enableSNIExtension=false设置
JAVA_OPTS="$JAVA_OPTS -Djsse.enableSNIExtension=false
重启Tomcat,问题解决
问题原因参考:
http://stackoverflow.com/questions/7615645/ssl-handshake-alert-unrecognized-name-error-since-upgrade-to-java-1-7-0/11043871#11043871
0 0
- javax.net.ssl.SSLProtocolException: handshake alert: unrecognized_name
- javax.net.ssl.SSLProtocolException: handshake alert: unrecognized_name
- javax.net.ssl.SSLProtocolException: handshake alert: unrecognized_name
- javax.net.ssl.SSLProtocolException: handshake alert:unrecognized_name
- 出现javax.net.ssl.SSLProtocolException: handshake alert: unrecognized_name
- javax.net.ssl.SSLProtocolException: handshake alert: unrecognized_name解决
- 出现javax.net.ssl.SSLProtocolException: handshake alert: unrecognized_name
- jenkins配置SVN时报错:javax.net.ssl.SSLProtocolException: handshake alert: unrecognized_name
- javax.net.ssl.SSLProtocolException: handshakealert: unrecognized_name
- javax.net.ssl.SSLProtocolException:SSL handshake aborted
- OkHttpUtils: javax.net.ssl.SSLProtocolException: SSL handshake aborted: ssl=0xb8f02e68: Failure in S
- 关于javax.net.ssl.SSLProtocolException
- SSL/TLS的Handshake过程与javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure异常
- SSL/TLS的Handshake过程与javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure异常
- SSL/TLS的Handshake过程与javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure异常
- javax.net.ssl.SSLHandshakeException: Handshake failed
- 关于volley javax.net.ssl.SSLHandshakeException: javax.net.ssl.SSLProtocolException: 错误
- javax.net.ssl.SSLHandshakeException: Remote host closed connection during handshake
- PHP程序员最常犯的11个MySQL错误[转]
- POJ 1584 A Round Peg in a Ground Hole(凸包判定&&圆在凸包内判定)
- Eclipse使用常见错误
- 负数在前正数在后且顺序不变
- android的消息处理机制
- javax.net.ssl.SSLProtocolException: handshake alert: unrecognized_name
- IOS学习之NSString
- JD 1168:字符串的查找删除
- 【树状数组】 HDOJ 4276 A Simple Problem with Integers
- PHP实例————实现验证码功能
- android4.4.4 源码下载
- js-- || &&
- 用android:clipChildren来实现红心变大特效
- 关于java for()循环 remove 的使用