Issue
When I try to connect to an SSL server I see this error
javax.net.ssl.SSLProtocolException: handshake alert: unrecognized_name
Environment
-
CloudBees CI (CloudBees Core) on modern cloud platforms - Managed controller
-
CloudBees CI (CloudBees Core) on modern cloud platforms - Operations Center
-
CloudBees CI (CloudBees Core) on traditional platforms - Client controller
-
CloudBees CI (CloudBees Core) on traditional platforms - Operations Center
-
CloudBees Jenkins Enterprise - Managed controller
-
CloudBees Jenkins Enterprise - Operations center
-
JDK >1.7
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": https://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.