WebhookCallerImpl (Okhttp3) doesn't honour http.nonProxyHosts

proxy
sonarqube
webhooks

(Justo Aguilar) #1

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


(Simon Brandhof) #3

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.


(Justo Aguilar) #4

That’s exactly the case, Simon.

Thanks
Justo


(Gilbert Rebhan) #5

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


(Simon Brandhof) #6

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