# SonarQube webhook to Jenkins not working

**URL:** <https://community.sonarsource.com/t/sonarqube-webhook-to-jenkins-not-working/1959>\
**Category:** SonarQube Server / Community Build\
**Tags:** jenkins, webhooks, sonarqube\
**Created:** [August 22, 2018, 9:33am UTC](https://community.sonarsource.com/t/sonarqube-webhook-to-jenkins-not-working/1959 "2018-08-22T09:33:20Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![rvjain89](https://avatars.discourse-cdn.com/v4/letter/r/7ea924/32.png) [@rvjain89](https://community.sonarsource.com/u/rvjain89)\
**Post date:** [August 22, 2018, 9:33am UTC](https://community.sonarsource.com/t/sonarqube-webhook-to-jenkins-not-working/1959/1 "2018-08-22T09:33:20Z")

</div>

Must-share information (formatted with [Markdown](https://commonmark.org/help/)):

- 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](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.

---

<div class="post-metadata">

**Author:** ![ganncamp](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/ganncamp/32/1261_2.png) [@ganncamp](https://community.sonarsource.com/u/ganncamp)\
**Post date:** [August 22, 2018, 12:49pm UTC](https://community.sonarsource.com/t/sonarqube-webhook-to-jenkins-not-working/1959/2 "2018-08-22T12:49:58Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![ganncamp](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/ganncamp/32/1261_2.png) [@ganncamp](https://community.sonarsource.com/u/ganncamp)\
**Post date:** [October 7, 2019, 6:36pm UTC](https://community.sonarsource.com/t/sonarqube-webhook-to-jenkins-not-working/1959/3 "2019-10-07T18:36:16Z")

</div>

A post was split to a new topic: [Problem in Jenkins waiting for Quality Gate](https://community.sonarsource.com/t/problem-in-jenkins-waiting-for-quality-gate/15140)
