Error SonarQube server can not be reached and PKIX path building failed

we have sonar for multiple services however the below issue is happening only for one service ,please do the needful.

ERROR: SonarQube server [] can not be reached
INFO: ------------------------------------------------------------------------
INFO: ------------------------------------------------------------------------
INFO: Total time: 0.447s
INFO: Final Memory: 4M/24M
INFO: ------------------------------------------------------------------------
ERROR: Error during SonarQube Scanner execution
ERROR: Unable to execute SonarQube
ERROR: Caused by: Fail to get bootstrap index from server
ERROR: Caused by: PKIX path building failed: unable to find valid certification path

Hey there.

It looks like the scanner isn’t able to trust the certificate installed on your SonarQube server (which allows your SonarQube server to be served over HTTPS).

Is there anything different about this environment than the ones in which your other analyses are running? Different built agents, different versions of Java installed…

Specifically, you might start by comparing the environment information provided by the start of the scanner logs (in debug mode, sonar-scanner -X

08:59:43.128 INFO: SonarScanner
08:59:43.128 INFO: Java Eclipse Adoptium (64-bit)
08:59:43.128 INFO: Mac OS X 13.1 x86_64
08:59:43.357 DEBUG: keyStore is : 
08:59:43.358 DEBUG: keyStore type is : pkcs12
08:59:43.358 DEBUG: keyStore provider is : 
08:59:43.358 DEBUG: init keystore
08:59:43.358 DEBUG: init keymanager of type SunX509
08:59:43.588 DEBUG: Create: /Users/colin/.sonar/cache
08:59:43.590 INFO: User cache: /Users/colin/.sonar/cache
08:59:43.590 DEBUG: Create: /Users/colin/.sonar/cache/_tmp
08:59:43.595 DEBUG: Extract sonar-scanner-api-batch in temp...
08:59:43.602 DEBUG: Get bootstrap index...
08:59:43.602 DEBUG: Download: http://localhost:9000/batch/index

And please remember to include the information asked for in the template post

Must-share information (formatted with Markdown):

  • which versions are you using (SonarQube, Scanner, Plugin, and any relevant extension)

I am getting the similar issue, I am trying to run sonarqube from Azure DevOps. I am able to run the prepare sonar step successfully. but on the Sonarqube post analyses report step it fails with the same error as above - Caused by: PKIX path building failed: unable to find valid certification path to requested target

I also tried doing a curl on agent –
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed

0 0 0 0 0 0 0 0 --:–:-- --:–:-- --:–:-- 0* Trying…

  • Connected to ( port 443 (#0)
  • ALPN, offering h2
  • ALPN, offering http/1.1
  • successfully set certificate verify locations:
  • CAfile: /etc/ssl/certs/ca-certificates.crt

It is able to connect to sonar successfully.

Please suggest

I had a similar problem and that error was sent by the SSL certificates that have to be installed I leave you this link, PKIX path building failed: SunCertPathBuilderException: unable to find valid certification path to requested target (

I hope it helps you, you comment that it is only for one service, that service must have a certificate and you have to install it follow the instructions from the link, if you use windows, the path must have quotes “path” and the certificate must be Root.


this solve my problem. Thanks

I have a similar problem can you explain how do you solved it ?