# Azure DevOps \[Server Prepare analyse on SonarQube\] task issue with HTTPS

**URL:** <https://community.sonarsource.com/t/azure-devops-server-prepare-analyse-on-sonarqube-task-issue-with-https/26717>\
**Category:** SonarQube Server / Community Build\
**Tags:** azuredevops-server, ssl, sonarqube\
**Created:** [June 19, 2020, 12:05pm UTC](https://community.sonarsource.com/t/azure-devops-server-prepare-analyse-on-sonarqube-task-issue-with-https/26717 "2020-06-19T12:05:28Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Lu\_Do](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/lu_do/32/12649_2.png) [@Lu\_Do](https://community.sonarsource.com/u/Lu_Do)\
**Post date:** [June 19, 2020, 12:05pm UTC](https://community.sonarsource.com/t/azure-devops-server-prepare-analyse-on-sonarqube-task-issue-with-https/26717/1 "2020-06-19T12:05:28Z")

</div>

Hi the team,

We are experiencing an issue with the Prepare analyse on SonarQube task of Azure DevOps Server 2019 Update 1.1.

Our SonarQ is an on premise version 8.2

If we use the service with the https URL of SonarQ the pipeline fails and return the following message: [SQ] API GET ‘/api/server/version’ failed, error was: {“code”:“UNABLE\_TO\_VERIFY\_LEAF\_SIGNATURE”}

 ![Capture](https://europe1.discourse-cdn.com/sonarsource/uploads/sonarcommunity/original/2X/2/2f8123fc7f179d8c6d8e6eb8ec0759f453ac275e.png)

It works when we contact SonarQ with the http URL.

Certificates are installed both on CI Server and SonarQ Community Edition (8.2 build 32929)

Nothing clear and official on the web about this issue. What could be the problem?

thanks in advance

Regards

---

<div class="post-metadata">

**Author:** ![mickaelcaro](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/mickaelcaro/32/4147_2.png) [@mickaelcaro](https://community.sonarsource.com/u/mickaelcaro)\
**Post date:** [June 19, 2020, 12:53pm UTC](https://community.sonarsource.com/t/azure-devops-server-prepare-analyse-on-sonarqube-task-issue-with-https/26717/2 "2020-06-19T12:53:36Z")

</div>

Hi @Lu_Do and welcome to the community !

Prepare analysis make some HTTP calls against your SQ instance using Node.js, so you need to explicitly tell Node to use this or that certificate using the **NODE\_EXTRA\_CA\_CERTS** environment variable. (containing the path where your certs are stored)  
Make sure that this one will be available with the task, a restart of the agent is always needed.

HTH,  
Mickaël

---

<div class="post-metadata">

**Author:** ![Lu\_Do](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/lu_do/32/12649_2.png) [@Lu\_Do](https://community.sonarsource.com/u/Lu_Do)\
**Post date:** [June 24, 2020, 3:42pm UTC](https://community.sonarsource.com/t/azure-devops-server-prepare-analyse-on-sonarqube-task-issue-with-https/26717/4 "2020-06-24T15:42:51Z")

</div>

Tip top! Clear enough to go forwad.But now I have another issue. the prepare analyse on sonarQube passed but I receive the following message on the run code analysis task:  
ERROR: SonarQube server [\*\*\*\*\*\*] can not be reach.  
Firewall is opened between both servers (CI and SQ)  
Any idea ?  
Thanks in advance

---

<div class="post-metadata">

**Author:** ![mickaelcaro](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/mickaelcaro/32/4147_2.png) [@mickaelcaro](https://community.sonarsource.com/u/mickaelcaro)\
**Post date:** [June 25, 2020, 5:50am UTC](https://community.sonarsource.com/t/azure-devops-server-prepare-analyse-on-sonarqube-task-issue-with-https/26717/5 "2020-06-25T05:50:19Z")

</div>

I think it’s still a certificate issue. (We are making call by different ways : Node.js for the Prepare task, and most often in Java in the Run Code Analysis) Do you have the exact error show ? Is there any stack trace ?

Thanks

---

<div class="post-metadata">

**Author:** ![Lu\_Do](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/lu_do/32/12649_2.png) [@Lu\_Do](https://community.sonarsource.com/u/Lu_Do)\
**Post date:** [June 25, 2020, 6:13am UTC](https://community.sonarsource.com/t/azure-devops-server-prepare-analyse-on-sonarqube-task-issue-with-https/26717/6 "2020-06-25T06:13:29Z")

</div>

> [@mickaelcaro](#):
>
> a certificate issue.

here the trace log extracted from the build pipeline:

Thanks[8.txt](https://community.sonarsource.com/uploads/short-url/tS3SmEVCc4rIJVHsR8ahFbH73CS.txt) (22.2 KB)

---

<div class="post-metadata">

**Author:** ![mickaelcaro](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/mickaelcaro/32/4147_2.png) [@mickaelcaro](https://community.sonarsource.com/u/mickaelcaro)\
**Post date:** [June 25, 2020, 6:19am UTC](https://community.sonarsource.com/t/azure-devops-server-prepare-analyse-on-sonarqube-task-issue-with-https/26717/7 "2020-06-25T06:19:46Z")

</div>

Thanks !

here’s the real error : Caused by: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

Can you check that your JVM has the correct path to your SQ certificate ?

---

<div class="post-metadata">

**Author:** ![Lu\_Do](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/lu_do/32/12649_2.png) [@Lu\_Do](https://community.sonarsource.com/u/Lu_Do)\
**Post date:** [June 25, 2020, 8:14am UTC](https://community.sonarsource.com/t/azure-devops-server-prepare-analyse-on-sonarqube-task-issue-with-https/26717/8 "2020-06-25T08:14:26Z")

</div>

> [@mickaelcaro](#):
>
> JVM has the correct path to your SQ certificate ?

Thanks Mickaël! Indeed, the certificate was not in the cacerts file. Now it works fine ! thanks for the support

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/system/32/31083_2.png) [@system](https://community.sonarsource.com/u/system)\
**Post date:** [July 2, 2020, 8:14am UTC](https://community.sonarsource.com/t/azure-devops-server-prepare-analyse-on-sonarqube-task-issue-with-https/26717/9 "2020-07-02T08:14:27Z")

</div>

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.
