Uploaded image for project: 'Tools (JBoss Tools)'
  1. Tools (JBoss Tools)
  2. JBIDE-15594

Cannot connect to OpenShift DEVENV with hostname: javax.net.ssl.SSLProtocolException

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Won't Fix
    • Affects Version/s: 4.1.1.Alpha2, 4.2.0.Alpha1
    • Fix Version/s: 4.1.1.CR1
    • Component/s: openshift
    • Labels:
      None
    • Steps to Reproduce:
      Hide
      1. ASSERT: make sure you're using JDK7 (it wont happen with JDK6)
      2. ASSERT: make sure you have an OpenShift DEVENV instance (ex. ec2-54-226-150-31.compute-1.amazonaws.com)
      3. EXEC: Launch JBDS and the OpenShift Application wizard
      4. EXEC: In connection dialog: as host provide the OpenShift instance (ex. ec2-54-226-150-31.compute-1.amazonaws.com) and some credentials (DEVENVs dont verify credentials), hit "Finish"

      Actual results:
      Cannot connect, unknown error:

      In the Eclipse logs (<workspace>/.metadata/.log) you'll spot the following:

      com.openshift.client.OpenShiftEndpointException: Could not request https://ec2-54-226-150-31.compute-1.amazonaws.com/broker/rest/api: javax.net.ssl.SSLProtocolException: handshake alert:  unrecognized_name
      	at com.openshift.internal.client.RestService.request(RestService.java:115)
      	at com.openshift.internal.client.RestService.request(RestService.java:100)
      	at com.openshift.internal.client.RestService.request(RestService.java:81)
      	at com.openshift.internal.client.AbstractOpenShiftConnectionFactory.getConnection(AbstractOpenShiftConnectionFactory.java:34)
      	at com.openshift.client.OpenShiftConnectionFactory.getConnection(OpenShiftConnectionFactory.java:134)
      	at com.openshift.client.OpenShiftConnectionFactory.getConnection(OpenShiftConnectionFactory.java:103)
      	at org.jboss.tools.openshift.express.internal.core.connection.Connection.createUser(Connection.java:219)
      	at org.jboss.tools.openshift.express.internal.core.connection.Connection.connect(Connection.java:199)
      	at org.jboss.tools.openshift.express.internal.ui.wizard.connection.ConnectionWizardPageModel.connect(ConnectionWizardPageModel.java:252)
      	at org.jboss.tools.openshift.express.internal.ui.wizard.connection.ConnectionWizardPage$ConnectJob.run(ConnectionWizardPage.java:474)
      	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:53)
      Caused by: com.openshift.internal.client.httpclient.HttpClientException: javax.net.ssl.SSLProtocolException: handshake alert:  unrecognized_name
      	at com.openshift.internal.client.httpclient.UrlConnectionHttpClient.createException(UrlConnectionHttpClient.java:213)
      	at com.openshift.internal.client.httpclient.UrlConnectionHttpClient.write(UrlConnectionHttpClient.java:180)
      	at com.openshift.internal.client.httpclient.UrlConnectionHttpClient.get(UrlConnectionHttpClient.java:111)
      	at com.openshift.internal.client.RestService.request(RestService.java:151)
      	at com.openshift.internal.client.RestService.request(RestService.java:107)
      	... 10 more
      Caused by: javax.net.ssl.SSLProtocolException: handshake alert:  unrecognized_name
      	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
      	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
      	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
      	at java.lang.reflect.Constructor.newInstance(Constructor.java:525)
      	at sun.net.www.protocol.http.HttpURLConnection$6.run(HttpURLConnection.java:1664)
      	at sun.net.www.protocol.http.HttpURLConnection$6.run(HttpURLConnection.java:1662)
      	at java.security.AccessController.doPrivileged(Native Method)
      	at sun.net.www.protocol.http.HttpURLConnection.getChainedException(HttpURLConnection.java:1660)
      	at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1243)
      	at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:468)
      	at sun.net.www.protocol.https.HttpsURLConnectionImpl.getResponseCode(HttpsURLConnectionImpl.java:338)
      	at com.openshift.internal.client.httpclient.UrlConnectionHttpClient.createException(UrlConnectionHttpClient.java:196)
      	... 14 more
      Caused by: 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:1970)
      	at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:1093)
      	at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1328)
      	at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1355)
      	at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1339)
      	at sun.net.www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:515)
      	at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:185)
      	at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1299)
      	at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:254)
      	at com.openshift.internal.client.httpclient.UrlConnectionHttpClient.write(UrlConnectionHttpClient.java:178)
      	... 13 more
      

      Expected results:
      You can connect to the server.

      Show
      ASSERT: make sure you're using JDK7 (it wont happen with JDK6) ASSERT: make sure you have an OpenShift DEVENV instance (ex. ec2-54-226-150-31.compute-1.amazonaws.com) EXEC: Launch JBDS and the OpenShift Application wizard EXEC: In connection dialog: as host provide the OpenShift instance (ex. ec2-54-226-150-31.compute-1.amazonaws.com) and some credentials (DEVENVs dont verify credentials), hit "Finish" Actual results: Cannot connect, unknown error: In the Eclipse logs (<workspace>/.metadata/.log) you'll spot the following: com.openshift.client.OpenShiftEndpointException: Could not request https: //ec2-54-226-150-31.compute-1.amazonaws.com/broker/ rest /api: javax.net.ssl.SSLProtocolException: handshake alert: unrecognized_name at com.openshift.internal.client.RestService.request(RestService.java:115) at com.openshift.internal.client.RestService.request(RestService.java:100) at com.openshift.internal.client.RestService.request(RestService.java:81) at com.openshift.internal.client.AbstractOpenShiftConnectionFactory.getConnection(AbstractOpenShiftConnectionFactory.java:34) at com.openshift.client.OpenShiftConnectionFactory.getConnection(OpenShiftConnectionFactory.java:134) at com.openshift.client.OpenShiftConnectionFactory.getConnection(OpenShiftConnectionFactory.java:103) at org.jboss.tools.openshift.express.internal.core.connection.Connection.createUser(Connection.java:219) at org.jboss.tools.openshift.express.internal.core.connection.Connection.connect(Connection.java:199) at org.jboss.tools.openshift.express.internal.ui.wizard.connection.ConnectionWizardPageModel.connect(ConnectionWizardPageModel.java:252) at org.jboss.tools.openshift.express.internal.ui.wizard.connection.ConnectionWizardPage$ConnectJob.run(ConnectionWizardPage.java:474) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:53) Caused by: com.openshift.internal.client.httpclient.HttpClientException: javax.net.ssl.SSLProtocolException: handshake alert: unrecognized_name at com.openshift.internal.client.httpclient.UrlConnectionHttpClient.createException(UrlConnectionHttpClient.java:213) at com.openshift.internal.client.httpclient.UrlConnectionHttpClient.write(UrlConnectionHttpClient.java:180) at com.openshift.internal.client.httpclient.UrlConnectionHttpClient.get(UrlConnectionHttpClient.java:111) at com.openshift.internal.client.RestService.request(RestService.java:151) at com.openshift.internal.client.RestService.request(RestService.java:107) ... 10 more Caused by: javax.net.ssl.SSLProtocolException: handshake alert: unrecognized_name at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:525) at sun.net.www.protocol.http.HttpURLConnection$6.run(HttpURLConnection.java:1664) at sun.net.www.protocol.http.HttpURLConnection$6.run(HttpURLConnection.java:1662) at java.security.AccessController.doPrivileged(Native Method) at sun.net.www.protocol.http.HttpURLConnection.getChainedException(HttpURLConnection.java:1660) at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1243) at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:468) at sun.net.www.protocol.https.HttpsURLConnectionImpl.getResponseCode(HttpsURLConnectionImpl.java:338) at com.openshift.internal.client.httpclient.UrlConnectionHttpClient.createException(UrlConnectionHttpClient.java:196) ... 14 more Caused by: 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:1970) at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:1093) at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1328) at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1355) at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1339) at sun.net.www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:515) at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:185) at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1299) at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:254) at com.openshift.internal.client.httpclient.UrlConnectionHttpClient.write(UrlConnectionHttpClient.java:178) ... 13 more Expected results: You can connect to the server.
    • Workaround Description:
      Hide

      add "-Djsse.enableSNIExtension=false" in the end of "jbdevstudio.ini" and then run JBDS
      Or use IP to connect instead of hostname

      Show
      add "-Djsse.enableSNIExtension=false" in the end of "jbdevstudio.ini" and then run JBDS Or use IP to connect instead of hostname

      Attachments

        Issue Links

          Activity

            People

            Assignee:
            adietish André Dietisheim
            Reporter:
            adietish André Dietisheim
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: