SonarQube - 无法连接到没有代理的更新中心

SonarQube - Fail to connect to update center with no proxy

我安装了 SonarQube 5.6.3,当我进入更新中心时,我只能看到 "Installed" 个插件。但其他选项卡不显示任何内容(显示 0)。 我没有使用代理。日志显示如下:

ERROR web[o.s.s.p.UpdateCenterClient] Fail to connect to update center
org.sonar.api.utils.SonarException: Fail to download: https://update.sonarsource.org/update-center.properties (no proxy)
    at org.sonar.core.util.DefaultHttpDownloader.failToDownload(DefaultHttpDownloader.java:157) ~[sonar-core-5.6.3.jar:na]

我尝试使用 wget 手动下载文件 https://update.sonarsource.org/update-center.properties,它工作正常。

为什么不能从 UpdateCenter 工作?我需要在 sonar.properties 文件中指定任何内容吗? sonar.properties中与更新中心相关的唯一一行是:sonar.updatecenter.activate=true

您使用的 IBM JDK 与 Oracle JDK 的 TLS 连接不同。如果不将 com.ibm.jsse2.overrideDefaultTLS 设置为 true,应用程序将无法连接到使用 TLS 1.2 (http://www.ibm.com/support/knowledgecenter/en/SSYKE2_8.0.0/com.ibm.java.security.component.80.doc/security-component/jsse2Docs/matchsslcontext_tls.html#matchsslcontext_tls)

的更新中心

-Dcom.ibm.jsse2.overrideDefaultTLS=true添加到sonar.web.javaOpts中conf/sonar.properties 将解决您的问题。

我强烈建议将此 属性 (-Dcom.ibm.jsse2.overrideDefaultTLS=true) 添加到 sonar.web.javaOpts、sonar.ce.javaOpts 和 sonar.search.javaOpts

干杯,

我听从了 Eric 的建议,并从 Oracle 而不是 IBM 安装了 Java。在此之前,我尝试将 -Dcom.ibm.jsse2.overrideDefaultTLS=true 添加到 java 选项,但没有任何改变。我一改用 Oracle JRE,更新中心就开始正常工作了。

非常感谢您的帮助

确保在 sonar.properties 中设置了 http 和 https 代理配置:

http.proxyHost=<host>
http.proxyPort=<port>
http.proxyUser=<username>
http.proxyPassword=<password>    
https.proxyHost=<host>
https.proxyPort=<port>
https.proxyUser=<username>
https.proxyPassword=<password>

在尝试此处可用的任何选项之前,请检查声纳曲机器的互联网连接并再次检查(刷新)ALM 配置。