JAVA_javax.net.ssl.SSLProtocolException: handshake alert: unrecognized_name

tomcat访问https请求返回:

[java] view plain copy

  1. javax.net.ssl.SSLProtocolException: handshake alert:  unrecognized_name
  2. at sun.security.ssl.ClientHandshaker.handshakeAlert(ClientHandshaker.java:1292)
  3. at sun.security.ssl.SSLSocketImpl.recvAlert(SSLSocketImpl.java:1952)
  4. at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:1077)
  5. at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1312)
  6. at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1339)
  7. at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1323)
  8. at org.apache.http.conn.ssl.SSLConnectionSocketFactory.createLayeredSocket(SSLConnectionSocketFactory.java:275)
  9. at org.apache.http.conn.ssl.SSLConnectionSocketFactory.connectSocket(SSLConnectionSocketFactory.java:254)
  10. at org.apache.http.impl.conn.HttpClientConnectionOperator.connect(HttpClientConnectionOperator.java:117)
  11. at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.connect(PoolingHttpClientConnectionManager.java:314)
  12. at org.apache.http.impl.execchain.MainClientExec.establishRoute(MainClientExec.java:363)
  13. at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:219)
  14. at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:195)
  15. at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:86)
  16. at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:108)
  17. at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:186)
  18. at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:72)
  19. at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:214)
  20. at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:160)
  21. at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:136)

服务器java版本:

[html] view plain copy

  1. java version "1.7.0_51"

解决办法:

在TOMCAT_HOME/bin/catalina.sh中加入-Djsse.enableSNIExtension=false设置

[java] view plain copy

  1. 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

时间: 2024-11-05 18:57:35

JAVA_javax.net.ssl.SSLProtocolException: handshake alert: unrecognized_name的相关文章

快钱报错:javax.net.ssl.SSLProtocolException: handshake alert: unrecognized_name解决

jdk1.7提示:javax.net.ssl.SSLProtocolException: handshake alert: unrecognized_name //方案1:设置系统属性:System.setProperty("jsse.enableSNIExtension", "false"); //方案2:如果是tomcat: // 1. linux,在catalina.sh加上JAVA_OPTS="$JAVA_OPTS -Djsse.enableSNI

SSL handshake alert: unrecognized_name error since upgrade to Java 1.7

今天将jdk从1.6升级到1.7,但是HttpUrlConnection连接https出现问题了. javax.net.ssl.SSLProtocolException: handshake alert: unrecognized_name at sun.security.ssl.ClientHandshaker.handshakeAlert(ClientHandshaker.java:1288) at sun.security.ssl.SSLSocketImpl.recvAlert(SSLSo

Java1.7 SSL访问Https occur SSLProtocolException and CertificateException

最近在调用微信公众平台高级群发接口之一: https://file.api.weixin.qq.com/cgi-bin/media/uploadvideo?access_token=ACCESS_TOKEN 时,https访问抛出异常: javax.net.ssl.SSLProtocolException: handshake alert: unrecognized_name 异常中出现关键字:unrecognized 未被承认的name. google之,处理办法,代码加入: //bug fi

Java Secure Socket Extension (JSSE) Reference Guide

Skip to Content Oracle Technology Network Software Downloads Documentation Search Java Secure Socket Extension (JSSE) Reference Guide This guide covers the following topics: Skip Navigation Links Introduction Features and Benefits JSSE Standard API S

myeclipse2015 https svn插件配置问题记录

1.因为svn地址用的是https,需设置myeclipse preference->team->svn->svn接口->SVNKit 2.客户端为TortoiseSVN 1.8.1,svn插件为 http://subclipse.tigris.org/update_1.8.x , Team -> Share Project 报错:org.apache.subversion.javahl.ClientException: svn: E155021: This client i

java sni support result in svn fail

svn: E175002: handshake alert:  unrecognized_name http://stackoverflow.com/questions/7615645/ssl-handshake-alert-unrecognized-name-error-since-upgrade-to-java-1-7-0 在eclipse.ini中加上-Djsse.enableSNIExtension=false done http://stackoverflow.com/question

Android关于 https SSL handshake aborted 问题查找

Android 关于 https SSL handshake aborted 问题查找 记录这个问题的定位过程和问题定位的方法 1.问题描述: 项目改为使用 https 协议,访问时发现返回错误代码: 域名:https://sandbox.api.xxx.com 错误:SSL handshake aborted: ssl=0x5ef8e720: I/O error during system call, Connection reset by peer 错误描述:https 在使用 ssl 时候

centos7 apache配置ssl支持tlsv1.0 1.1 1.2

centos7 apache配置ssl支持tlsv1.0 1.1 1.2原创93dd大智若愚 最后发布于2017-05-11 17:25:39 阅读数 2162 收藏展开按照阿里云的证书配置如下安装证书: 文件说明: 1. 证书文件214089425050896.pem,包含两段内容,请不要删除任何一段内容. 2. 如果是证书系统创建的CSR,还包含:证书私钥文件214089425050896.key.证书公钥文件public.pem.证书链文件chain.pem. ( 1 ) 在Apache的

SSL ***技术解析

SSL ***背景 ? 企业出差员工,需要在外地远程办公,并期望能够通过Internet随时随地的远程访问企业内部资源.同时,企业为了保证内网资源的安全性,希望能对移动办公用户进行多种形式的身份认证,并对移动办公用户可访问内网资源的权限做精细化控制? IPSec.L2TP等先期出现的***技术虽然可以支持远程接入这个应用场景,但这些***技术的组网不灵活:移动办公用户需要安装指定的客户端软件(SecoClient),导致网络部署和维护都比较麻烦:无法对移动办公用户的访问权限做精细化控制? SSL