JIRA throws handshake alert when failing to connect to Subversion repository
Platform notice: Server and Data Center only. This article only applies to Atlassian products on the Server and Data Center platforms.
Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Except Fisheye and Crucible
Problem
JIRA is not able to connect to a Subversion(SVN) repository using a SSL connection.
You may encounter this when setting up a new SVN connection or after a JIRA upgrade where the Java environment was upgraded as well.
The following appears in the atlassian-jira.log:
2015-06-18 14:42:19,842 http-apr-10.16.42.81-26002-exec-9 ERROR cas_admin 882x287x1 b9wntt 10.13.66.236,145.228.113.163 /secure/ActivateSubversionRepository.jspa [plugin.ext.subversion.SubversionManagerImpl] Connection to Subversion repository https://xxxxx.xxxx.xxx/svn/his failed: org.xxxxx.svn.core.SVNException: svn: E175002: handshake alert: unrecognized_name
svn: E175002: OPTIONS request failed on '/svn/his'
org.tmatesoft.svn.core.SVNException: svn: E175002: handshake alert: unrecognized_name
svn: E175002: OPTIONS request failed on '/svn/his'
at org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorManager.java:106)
at org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorManager.java:90)
at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.request(HTTPConnection.java:758)
at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.request(HTTPConnection.java:371)
Caused by: javax.net.ssl.SSLProtocolException: handshake alert: unrecognized_name
at sun.security.ssl.ClientHandshaker.handshakeAlert(Unknown Source)
at sun.security.ssl.SSLSocketImpl.recvAlert(Unknown Source)
at sun.security.ssl.SSLSocketImpl.readRecord(Unknown Source)
at sun.security.ssl.SSLSocketImpl.performInitialHandshake(Unknown Source)
at sun.security.ssl.SSLSocketImpl.writeRecord(Unknown Source)
at java.io.BufferedOutputStream.flushBuffer(Unknown Source)
at java.io.BufferedOutputStream.flush(Unknown Source)
at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.sendData(HTTPConnection.java:321)
at org.tmatesoft.svn.core.internal.io.dav.http.HTTPRequest.dispatch(HTTPRequest.java:170)
at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.request(HTTPConnection.java:462)
2015-06-18 14:41:50,932 UpmAsynchronousTaskManager:thread-2 ERROR cas_admin 881x60x2 b9wntt 10.13.66.236,145.228.113.163 /rest/plugins/1.0/ [revisions.scheduling.clustersafe.SchedulerLauncher] Unexpected error during launch
java.lang.RuntimeException: Unable to create service: Subversion Index Update Service
at com.atlassian.jira.plugin.ext.subversion.revisions.scheduling.clustersafe.SchedulerLauncher.registerService(SchedulerLauncher.java:170)
at com.atlassian.jira.plugin.ext.subversion.revisions.scheduling.clustersafe.SchedulerLauncher.launch(SchedulerLauncher.java:
Diagnosis
Environment
- JIRA is using Java 7 or higher
- Check that the Java environment is covered by JIRA Supported Platforms
Cause
Java 7 introduced support for SNI(Server Name Indication) and it comes enabled by default. Certain misconfigured servers send a "Unrecognized Name" warning in the SSL handshake which is ignored by most clients, except for Java.
Workaround
Add the property jsse.enableSNIExtension=false to JIRA Startup Parameters as per Setting Properties and Options on Startup. For example:
JVM_SUPPORT_RECOMMENDED_ARGS="-Djsse.enableSNIExtension=false"
Resolution
Ensure the SSL certificate is using a valid domain name matching your server name. The domain name and server name must be identical.