SSL handshake alert unrecognized name

Issue

When I try to connect to an SSL server I see this error

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

Environment

Resolution

Root cause

The error message is provided by the SNI module (in the JDK >1.7) since the server sends a warning. Browsers are ignoring it, but Java terminates. Oracle means it’s “not a defect”: http://bugs.java.com/bugdatabase/view_bug.do?bug_id=7127374

Solution

Since the error message is related to a wrong configuration of virtual hosts on the server side, the solution is to review your current virtual hosts’ configuration of the server that is reached by the Jenkins instance.

Workaround

With JDK >1.7 we usually recommended to add -Djsse.enableSNIExtension=false to Jenkins options. However, since some connections like the update center connections, need the enableSNIExtension enabled, we don’t recommend this option anymore.

How to add Java arguments to Jenkins

Have more questions?

0 Comments

Please sign in to leave a comment.