I was able to scan my project using SonarQube scanner in my local and able to submit the report to the private community build SonarQube server without any issues.
While I was setting up the same using GitHub actions, I got stuck.
I followed the official documentation for setting up the Sonar scanner using GitHub actions.
Here’s the details of the SonarQube server and scanner versions:
Private Community Build v25.1.0.102122
SonarScanner CLI 7.1.0.4889
Here’s the error details from GitHub actions:
14:00:59.597 INFO SonarScanner CLI 7.1.0.4889
14:00:59.599 INFO Java 17.0.13 Eclipse Adoptium (64-bit)
14:00:59.599 INFO Linux 6.11.0-1015-azure amd64
14:00:59.606 DEBUG Scanner max available memory: 3 GB
14:00:59.628 DEBUG uname -m returned 'x86_64'
14:00:59.629 WARN Both 'sonar.login' and 'sonar.token' (or the 'SONAR_TOKEN' env variable) are set, but only the latter will be used.
14:00:59.630 DEBUG Using scanner truststore: /home/runner/.sonar/ssl/truststore.p12
14:00:59.631 DEBUG Create: /home/runner/.sonar/cache
14:00:59.631 INFO User cache: /home/runner/.sonar/cache
14:00:59.631 DEBUG Create: /home/runner/.sonar/cache/_tmp
14:00:59.715 DEBUG Loading OS trusted SSL certificates...
14:00:59.715 DEBUG This operation might be slow or even get stuck. You can skip it by passing the scanner property 'sonar.scanner.skipSystemTruststore=true'
14:00:59.939 DEBUG Loaded [440] system trusted certificates
14:01:00.217 DEBUG Loaded truststore from '/home/runner/.sonar/ssl/truststore.p12' containing 1 certificates
14:01:00.345 DEBUG --> GET <HOST_URL>/api/v2/analysis/version
14:01:05.495 DEBUG <-- HTTP FAILED: java.net.SocketTimeoutException: Connect timed out
14:01:05.495 ERROR Failed to query server version: Call to URL [<HOST_URL>/api/v2/analysis/version] failed: Connect timed out
org.sonarsource.scanner.lib.internal.MessageException: Failed to query server version: Call to URL [<HOST_URL>/api/v2/analysis/version] failed: Connect timed out
NOTE: I replaced the host URL with <HOST_URL>
for privacy.
I was able to navigate the URL with the browser and it returns the version as expected.
I configured the SONAR_ROOT_CERT
by following the official documentation.
I’m looking forward to resolve this issue at the earliest. Please let me know if any more details required.