Sonarqube 6.1 http.proxy更新中心无法正常工作

时间:2016-12-15 12:03:39

标签: sonarqube

自从更新到6.1(从那时起绝对不确定),我无法通过我们的代理连接到更新中心,因为SonarQube不会进行身份验证!如果我打开后端并转到Administration-> System-> Update Center,我可以在日志文件中看到以下异常(非常短的版本):

2016.12.15 11:54:11 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 (HTTP proxy: MY-PROXY-IP:8080)
(...)    
Caused by: java.io.IOException: Unable to tunnel through proxy. Proxy returns "HTTP/1.1 407 authenticationrequired"

几天前它有效!我测试了代理配置。在同一台机器上,Jenkins使用相同的代理设置,没有任何问题!

在文件/opt/sonar/conf/sonar.properties中,我配置了以下内容:

    #--------------------------------------------------------------------------------------------------
# UPDATE CENTER

# Update Center requires an internet connection to request http://update.sonarsource.org
# It is enabled by default.
#sonar.updatecenter.activate=true

# HTTP proxy (default none)
http.proxyHost=MY-PROXY-IP
http.proxyPort=8080
# HTTPS proxy (defaults are values of http.proxyHost and http.proxyPort)
#https.proxyHost=
#https.proxyPort=

# NT domain name if NTLM proxy is used
#http.auth.ntlm.domain=

# SOCKS proxy (default none)
#socksProxyHost=
#socksProxyPort=

# Proxy authentication (used for HTTP, HTTPS and SOCKS proxies)
http.proxyUser=MY-PROXY-USER
http.proxyPassword=MY-PROXY-PASSWORD

对我来说,看起来不会进行身份验证。我无法查看代理服务器的日志文件。

1 个答案:

答案 0 :(得分:3)

我有类似的问题。在我的情况下,它是由JDK计划的更改引起的。 8u111更新版本的Disable Basic authentication for HTTPS tunneling

我可以解决方法在/opt/sonar/conf/sonar.properties中追加属性,如下所示。

sonar.web.javaAdditionalOpts=-Djdk.http.auth.tunneling.disabledSchemes=""