I was trying to run the sonar scan from jenkins. I am getting the following error
ERROR: SonarQube server [https://abc.com] can not be reached
INFO: ------------------------------------------------------------------------
INFO: EXECUTION FAILURE INFO: ------------------------------------------------------------------------
INFO: Total time: 0.281s INFO: Final Memory: 4M/128M 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: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
ERROR: Caused by: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
ERROR: Caused by: unable to find valid certification path to requested target
ERROR: ERROR: Re-run SonarQube Scanner using the -X switch to enable full debug logging. WARN: Unable to locate âreport-task.txtâ in the workspace. Did the SonarScanner succedeed? ERROR: SonarQube scanner exited with non-zero code: 1 Finished: FAILURE
I tried importing the certs to default location jre\lib\security\cacerts. It worked at that time. But i had created a custom keystore and passed on path of the keystore along with password in the sonarqube server additional arguments. Also tried passing path of the keystore at the time of build. Result is same.
Jenkins version: 2.166
Can anyone please look into it and let me know.