German Anguiano
German Anguiano

Reputation: 23

SonarQube - Fail to connect to update center with no proxy

I installed SonarQube 5.6.3 and when I go to Update Center, I can only see "Installed" plugins. But the other tabs don't show anything (0 shown). I'm not using a proxy. The logs show the following:

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]

I tried downloading manually the file https://update.sonarsource.org/update-center.properties using wget and it worked fine.

Why is not working from UpdateCenter? Do I need to specify anything in sonar.properties file? The only line related to Update Center in sonar.properties is: sonar.updatecenter.activate=true

Upvotes: 1

Views: 5385

Answers (4)

sanjay kumar
sanjay kumar

Reputation: 41

Before you try any options available here, please check the internet connectivity to sonarqube machine and check(refresh) the ALM configuration again.

Upvotes: 0

user2310395
user2310395

Reputation: 307

Make sure that you set your http and https proxy configuration in sonar.properties:

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

Upvotes: 0

German Anguiano
German Anguiano

Reputation: 23

I followed the suggestion from Eric, and installed Java from Oracle, instead of IBM. Before doing that, I tried adding -Dcom.ibm.jsse2.overrideDefaultTLS=true to java options, but nothing changed. As soon as I changed to Oracle JRE, the Update Center started working as expected.

Thanks a lot for your help

Upvotes: 1

Eric Hartmann
Eric Hartmann

Reputation: 1701

You are using IBM JDK that does not behave like Oracle JDK with TLS connections. And without setting com.ibm.jsse2.overrideDefaultTLS to true, the application is unable to connect to the Update Center that is using 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)

Adding -Dcom.ibm.jsse2.overrideDefaultTLS=true to sonar.web.javaOpts in conf/sonar.properties will solve your issue.

I highly recommand to add this property (-Dcom.ibm.jsse2.overrideDefaultTLS=true) to sonar.web.javaOpts, sonar.ce.javaOpts and sonar.search.javaOpts

Cheers,

Upvotes: 2

Related Questions