Issue connecting to SonarQube via Sonar Scanner running locally

Using SonarQube Community Edition version 9.6.1 along with Sonar Scanner version 4.8
attempting to do a code scan locally using both mentioned above.
while running locally in cmd getting error of “SonarQube server [server address] cannot be reached”
have tried to update version of Sonar Scanner but there is no more up to date version.
Not sure if there is an issue with versioning or an issue with establishing connection from local to server.

Trace of the logs:
ERROR: Error during SonarScanner execution org.sonarsource.scanner.api.internal.ScannerException: Unable to execute SonarScanner analysis
Caused by: java.lang.IllegalStateException: Fail to get bootstrap index from server
Caused by: javax.net.ssl.SSLHandshakeException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
Caused by: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
Caused by: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

Hi,

Welcome to the community!

This is an SSL / certificate problem, which is a bit out of scope for us. Since it’s all on localhost, maybe just go directly, on http?

:warning: Make sure you upgrade to SonarQube v9.9 LTS soon, not only to benefit from our Best LTS Ever™, but because soon we will systematically ask users to upgrade when they ask questions about earlier versions of SonarQube, which are now considered unsupported. :smiley:

 
HTH,
Ann