WebhookCallerImpl (Okhttp3) doesn't honour http.nonProxyHosts

Sonarqube: 7.3.0

SonarQube CE and Jenkins are behind proxy. Proxy is setted in SonarQube for access to marketplace. However, all webhooks send fails because the request goes through proxy.

**Webhook Error > **
Response: Server Unreachable
Duration: 10s

Okhttp3 doesn’t take into account http.nonProxyHosts

I’ve removed proxy settings and now webhooks requests works.

Thanks in advance

Best regards
Justo

If I correctly understand removing proxy settings made internal calls to webhooks work but external calls to marketplace fail ? In that case I agree that the proxy settings should be consistently used across services.

That’s exactly the case, Simon.

Thanks
Justo

Hi Justo,
had exactly the same problems with SQ 7.3 and Jenkins.
Didn’t know that the proxy settings needed for update center also affect sonarqube CE.
The nonProxyHosts setting works for me.
Here are the relevant parts of my sonarqube.properties:
#--------------------------------------------------------------------------------------------------
# UPDATE CENTER

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

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

sonar.ce.javaOpts=-server -Xmx4G -Xms512m -Xss1G -XX:+HeapDumpOnOutOfMemoryError -Dhttp.nonProxyHosts=heregoesyourjenkinsurl

Regards,
Gilbert

2 Likes

Ticket https://jira.sonarsource.com/browse/SONAR-11251 created.

Hi there,

just wanted to let you know that i just stumbled upon this behaviour, too.

Honoring http.nonProxyHosts would really be a boon! \o/

Here is a proposed Solution on Stackoverflow, maybe you could mention that in the created JIRA-Ticket, too //edit: just realized, that Justo mentioned this SO-Article in his original posting already.

cheers
Daniel