我有一个 SonarQube 5.1.2 安装,我正在尝试安装和更新一些插件,服务器没有直接的互联网访问,我们在这里有一个代理,假设http://1.1.2.3:9191/是我们的代理和我们有用户和密码认证。好吧,我已经根据文档编写了 sonar.properties
http.proxyHost=10.1.2.3
http.proxyPort=9191
http.proxyUser=theuser
http.proxyPassword=thepassword
我访问http://sonar.sub.domain:9000/updatecenter/updates,我可以看到插件列表和更新,所以我假设此时代理通信正常。
但是,当我尝试更新或安装插件时,页面中出现此错误(注意no proxy
消息)。
Fail to download the plugin (scmsvn, version 1.2) from https://bintray.com/artifact/download/sonarsource/SonarQube/org/sonarsource/scm/svn/sonar-scm-svn-plugin/1.2/sonar-scm-svn-plugin-1.2.jar (error is : Fail to download: https://bintray.com/artifact/download/sonarsource/SonarQube/org/sonarsource/scm/svn/sonar-scm-svn-plugin/1.2/sonar-scm-svn-plugin-1.2.jar (no proxy)) [hide]
所以我调试日志并尝试,这出现在日志中
2015.09.11 09:32:47 DEBUG web[o.s.a.u.HttpDownloader$BaseHttpDownloader$HttpInputSupplier] Download: http://update.sonarsource.org/update-center.properties (HTTP proxy: 1.1.2.3:9191)
2015.09.11 09:32:49 DEBUG web[o.s.a.u.HttpDownloader$BaseHttpDownloader$HttpInputSupplier] Download: https://bintray.com/artifact/download/sonarsource/SonarQube/org/sonarsource/scm/svn/sonar-scm-svn-plugin/1.2/sonar-scm-svn-plugin-1.2.jar (no proxy)
2015.09.11 09:33:10 DEBUG web[o.s.s.p.PluginDownloader] Fail to download the plugin (scmsvn, version 1.2) from https://bintray.com/artifact/download/sonarsource/SonarQube/org/sonarsource/scm/svn/sonar-scm-svn-plugin/1.2/sonar-scm-svn-plugin-1.2.jar (error is : Fail to download: https://bintray.com/artifact/download/sonarsource/SonarQube/org/sonarsource/scm/svn/sonar-scm-svn-plugin/1.2/sonar-scm-svn-plugin-1.2.jar (no proxy))
org.sonar.api.utils.SonarException: Fail to download: https://bintray.com/artifact/download/sonarsource/SonarQube/org/sonarsource/scm/svn/sonar-scm-svn-plugin/1.2/sonar-scm-svn-plugin-1.2.jar (no proxy)
...
还有很多 StackTrace 行,
因此,当它试图到达update-center.properties
资源时没有问题,它会通过代理显示(HTTP proxy: 1.1.2.3:9191)
消息。但是当它试图下载软件包时,它只是绕过代理(我不知道为什么),如(no proxy)
第二行和第三行末尾的消息所示
所以我的问题是,我必须如何配置 SonarQube 以与代理一起使用?
注意:这个问题类似于SonarQube Proxy Configuration, Tricky但我认为不一样我可以看到插件和更新列表,但可以下载它们,所以我认为不重复。