【问题标题】:SSLHandshakeException when connecting to Openshift from EclipseIDE... How to solve?从 EclipseIDE 连接到 Openshift 时出现 SSLHandshakeException ...如何解决?
【发布时间】:2015-10-12 11:58:58
【问题描述】:

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

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

这是我发现的与我的案例最接近的 JBoss Tools BugTrack,https://issues.jboss.org/browse/JBIDE-14760,但事实证明,自 JBossTools 4.1.0 以来,这已被记录为已修复,而我在 Mars 和 Luna 上都有 4.3.0

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

查看下方错误信息的截图;

Eclipse Mars(错误截图如下);

Eclipse Luna(错误截图如下);

以下是日志中的 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 帖子也几乎没有提供任何具体帮助。

谢谢。

【问题讨论】:

  • 我尝试使用 jdk8 和 vanilla Eclipse Luna,但无法重现您的错误。您能否指定您的环境(操作系统,jdk)?此外,我强烈建议您验证您的 jdk 的密钥库是否已正确设置。谷歌搜索可以看到许多具有类似症状的人,然后发现他们的 java 密钥库损坏/配置错误。
  • 操作系统和JDK是... windows8 / jdk7
  • 其实已经解决了。我只更新了我的 Eclipse Mars 的 Windows 安装程序,然后重新安装然后它工作了。

标签: java eclipse jboss openshift jboss-tools


【解决方案1】:

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

如果您看到其他问题,请在https://jira.jboss.org/jira/browse/JBIDE 中报告问题

【讨论】:

    【解决方案2】:

    好的,这就是我所做的,之后我能够从 Eclipse Mars 建立 Openshift 连接

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

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

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

    之后,我尝试从我的 Eclipse Mars IDE 中建立 OpenShift 连接,而不进行任何更改(...当我说“anything”时,我的意思是我的公钥/私钥对),瞧,连接建立了。

    我希望这对遇到此问题并遇到此帖子的任何人有所帮助。

    【讨论】:

    • 还是有点神秘,但非常感谢分享!
    猜你喜欢
    • 2015-06-05
    • 2023-03-03
    • 2017-10-24
    • 2012-04-16
    • 2018-03-30
    • 1970-01-01
    • 2016-07-12
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多