SonarQube webhook to Jenkins not working

jenkins
sonarqube
webhooks

(Vardhaman Jain) #1

Must-share information (formatted with Markdown):

  • SonarQube - * Version 7.1 (build 11001) , Jenkins ver. 2.121.3] , Docker version 18.03.1-ce, build 9ee9f40
  • Setting up SonarQube webhook to send the quality gate notification to Jenkins pipeline.
    1. Created keystore and certificate on Jenkins
  1. Imported the certificate in SonarQube.
  2. Created the webhook entry in SonarQube( at : http://host:9000/admin/webhooks) as : https://{username}:{passwd}@{jenkins hostname}/sonarqube-webhook/

When I run sample cURL from SonarQube to connect to Jenkins like below, I receive connection refused error :
root@xxxxxx:/opt/sonarqube# curl -H “Content-Type: application/json” -X POST -d “PAYLOAD I already past” https://{username}:{passwd}@{jenkins-host-name}/sonarqube-webhook
curl: (7) Failed to connect to {jenkins-host}port 443: Connection refused

And in the webhook logs in sonarqube, we see ‘Server unreachable’ response.

Please help us find the root-cause and solution.


(G Ann Campbell) #2

Hi,

I believe that this is your root cause:

Failed to connect to {jenkins-host}port 443: Connection refused

It seems to me that you need to investigate why your connection is refused on the Jenkins side.

Ann