从EclipseIDE连接到Openshift时出现SSLHandshakeException ...如何解决?

时间:2015-10-12 11:58:59

标签: java eclipse jboss openshift jboss-tools

我正在尝试从Eclipse Mars IDE连接到Openshift。

我可以在网上登录我的Openshift帐户....此外,通过错误消息,我甚至创建了新的私钥/公钥并重新连接但仍无济于事。然后我运行了JBossTools更新,并再次尝试,但没有解决方案。

这是我发现的与我的案例https://issues.jboss.org/browse/JBIDE-14760相关的最接近的JBoss Tools BugTrack,但事实证明这是自JBossTools 4.1.0以来记录为固定的,而我在火星和Luna上都有4.3.0 < / p>

更令人不安的是,我之前已经能够与Eclipse Luna建立此连接,然后我回到Luna并再次尝试但仍无法建立Openshift连接。

请参阅以下错误消息的屏幕截图;

Eclipse Mars(下面的错误截图);

enter image description here

Eclipse Luna(错误截图如下);

enter image description here

以下是日志中的StackTrace,如下所示:

!ENTRY org.jboss.tools.openshift.express.ui 4 4 2015-10-09 18:05:58.143
!MESSAGE Could not request https://openshift.redhat.com/broker/rest/api: javax.net.ssl.SSLHandshakeException: java.security.cert.CertificateException: No X509TrustManager implementation available
!STACK 0
com.openshift.client.OpenShiftEndpointException: Could not request https://openshift.redhat.com/broker/rest/api: javax.net.ssl.SSLHandshakeException: java.security.cert.CertificateException: No X509TrustManager implementation available
    at com.openshift.internal.client.RestService.request(RestService.java:120)
    at com.openshift.internal.client.RestService.request(RestService.java:92)
    at com.openshift.internal.client.AbstractOpenShiftConnectionFactory.getConnection(AbstractOpenShiftConnectionFactory.java:36)
    at com.openshift.client.OpenShiftConnectionFactory.getConnection(OpenShiftConnectionFactory.java:198)
    at com.openshift.client.OpenShiftConnectionFactory.getConnection(OpenShiftConnectionFactory.java:158)
    at com.openshift.client.OpenShiftConnectionFactory.getConnection(OpenShiftConnectionFactory.java:114)
    at com.openshift.client.OpenShiftConnectionFactory.getConnection(OpenShiftConnectionFactory.java:103)
    at org.jboss.tools.openshift.express.internal.core.connection.Connection.createUser(Connection.java:229)
    at org.jboss.tools.openshift.express.internal.core.connection.Connection.connect(Connection.java:205)
    at org.jboss.tools.openshift.express.internal.ui.wizard.connection.ConnectionWizardPageModel.connect(ConnectionWizardPageModel.java:247)
    at org.jboss.tools.openshift.express.internal.ui.wizard.connection.ConnectionWizardPage$ConnectJob.run(ConnectionWizardPage.java:479)
    at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
Caused by: com.openshift.internal.client.httpclient.HttpClientException: javax.net.ssl.SSLHandshakeException: java.security.cert.CertificateException: No X509TrustManager implementation available
    at com.openshift.internal.client.httpclient.UrlConnectionHttpClient.createException(UrlConnectionHttpClient.java:201)
    at com.openshift.internal.client.httpclient.UrlConnectionHttpClient.request(UrlConnectionHttpClient.java:161)
    at com.openshift.internal.client.httpclient.UrlConnectionHttpClient.request(UrlConnectionHttpClient.java:140)
    at com.openshift.internal.client.httpclient.UrlConnectionHttpClient.get(UrlConnectionHttpClient.java:99)
    at com.openshift.internal.client.RestService.request(RestService.java:160)
    at com.openshift.internal.client.RestService.request(RestService.java:107)
    ... 11 more
Caused by: javax.net.ssl.SSLHandshakeException: java.security.cert.CertificateException: No X509TrustManager implementation available
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
    at java.lang.reflect.Constructor.newInstance(Unknown Source)
    at sun.net.www.protocol.http.HttpURLConnection$10.run(Unknown Source)
    at sun.net.www.protocol.http.HttpURLConnection$10.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at sun.net.www.protocol.http.HttpURLConnection.getChainedException(Unknown Source)
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(Unknown Source)
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
    at java.net.HttpURLConnection.getResponseCode(Unknown Source)
    at sun.net.www.protocol.https.HttpsURLConnectionImpl.getResponseCode(Unknown Source)
    at com.openshift.internal.client.httpclient.UrlConnectionHttpClient.createException(UrlConnectionHttpClient.java:184)
    ... 16 more
Caused by: javax.net.ssl.SSLHandshakeException: java.security.cert.CertificateException: No X509TrustManager implementation available
    at sun.security.ssl.Alerts.getSSLException(Unknown Source)
    at sun.security.ssl.SSLSocketImpl.fatal(Unknown Source)
    at sun.security.ssl.Handshaker.fatalSE(Unknown Source)
    at sun.security.ssl.Handshaker.fatalSE(Unknown Source)
    at sun.security.ssl.ClientHandshaker.serverCertificate(Unknown Source)
    at sun.security.ssl.ClientHandshaker.processMessage(Unknown Source)
    at sun.security.ssl.Handshaker.processLoop(Unknown Source)
    at sun.security.ssl.Handshaker.process_record(Unknown Source)
    at sun.security.ssl.SSLSocketImpl.readRecord(Unknown Source)
    at sun.security.ssl.SSLSocketImpl.performInitialHandshake(Unknown Source)
    at sun.security.ssl.SSLSocketImpl.startHandshake(Unknown Source)
    at sun.security.ssl.SSLSocketImpl.startHandshake(Unknown Source)
    at sun.net.www.protocol.https.HttpsClient.afterConnect(Unknown Source)
    at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(Unknown Source)
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(Unknown Source)
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
    at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(Unknown Source)
    at com.openshift.internal.client.httpclient.UrlConnectionHttpClient.request(UrlConnectionHttpClient.java:157)
    ... 15 more
Caused by: java.security.cert.CertificateException: No X509TrustManager implementation available
    at sun.security.ssl.DummyX509TrustManager.checkServerTrusted(Unknown Source)
    ... 29 more

this等类似的SO帖子也没有提供任何具体的帮助。

感谢。

2 个答案:

答案 0 :(得分:0)

请确保您使用最新的JDK版本,因为较旧的版本在使用ssh后出现问题。

如果您看到其他内容,请在https://jira.jboss.org/jira/browse/JBIDE

中报告问题

答案 1 :(得分:0)

好的,我做了什么,之后我能够从Eclipse Mars建立Openshift连接

我怀疑这是一个过时的Windows安装程序问题,因为我所做的只是尝试重新安装我从here

获得的Eclipse Mars

注意 - 在我以前的安装中,我没有注意到安装程序中的更新选项,因此我安装时没有更新。好吧,我相信该副本不包含解决此特定问题的错误修复

但是,当我尝试重新安装时,我注意到右上角的更新图标(见下图)所以我首先更新了所有内容,然后再继续安装过程。我想这只是在安装之前下载并应用了所有错误修复。

enter image description here

之后,我试图在我的Eclipse Mars IDE中建立OpenShift连接而不做任何改动( ......当我说&#39; 任何东西&#39;,我的意思是我的公钥/私钥对)和Voila,连接已经建立。

我希望这可以帮助任何遇到这个问题并且碰到这篇文章的人。