SonarQube, Tricky Proxy Configuration

I cannot get the proxy configuration to work for SonarQube 4.0 so that I can install plugins.

When I open http://localhost:9000/updatecenter/available , it displays an error: "Not connected to the update center. Check your Internet connection and logs."

In sonar.log I read: "org.sonar.api.utils.HttpDownloader $ HttpException: Failed to load [http://update.sonarsource.org/update-center.properties]. Response code: 403"

In sonar.properties, I configured it with the same proxy that I use for other programs:

 sonar.updatecenter.activate=true http.proxyHost=<host> http.proxyPort=<port> http.proxyUser=<username> http.proxyPassword=<password> 

I tried setting the same thing in the wrapper.properties file, but it didn't work by the way.

For the proxy host, I tried a short and full name. For the username, I tried only the username and <DOMAINNAME>\<username> and <DOMAINNAME>\\<username> .

None of this worked out. Any ideas?

+9
proxy sonarqube
source share
4 answers

My proxy configuration works and looks like this:

 http.proxyHost=proxy.domain.de http.proxyPort=8888 

Note that there is no “http: //” or anything else before the URL.

In addition, I do not use proxy authentication, so I left “proxyUser” and “proxyPassword” commented out.

+6
source share

Just information: I also had this problem. I see PlugIns but cannot download it. The problem is that you have to add this line to your sonar.properties options, for https:

 # https-proxy sonar.web.javaAdditionalOpts=-Dhttps.proxyHost=xxxxx -Dhttps.proxyPort=xxxx -Dhttps.proxyUser=xxxx -Dhttps.proxyPassword=xxxx 
+4
source share

I used the official documentation and it works: Using Update Center behind a proxy server

 http.proxyHost=<your.proxy.host> http.proxyPort=<yout.proxy.port> 

Hi,

+3
source share

For those who work with SonarQube in Docker, I am out of luck with the suggestion mentioned here. But I found the following solution that worked for me ( here ):

 docker run -d sonarqube -Dhttp.proxyHost=<myproxy.url.com> -Dhttp.proxyPort=<port> 

and the equivalent of this in the docker note:

 services: sonarqube: image: sonarqube command: -Dhttp.proxyHost=<myproxy.url.com> -Dhttp.proxyPort=<port> 
0
source share

All Articles