Issue on Sonar Qube Execution on Devops Pipeline

We are using Hosted VM with v7.9LTS. It is causing issue on Pipeline.

2020-04-29T15:24:08.3057569Z ##[section]Starting: SonarQubeAnalyze
2020-04-29T15:24:08.3064733Z ==============================================================================
2020-04-29T15:24:08.3065476Z Task : Run Code Analysis
2020-04-29T15:24:08.3066000Z Description : Run scanner and upload the results to the SonarQube server.
2020-04-29T15:24:08.3066312Z Version : 4.9.0
2020-04-29T15:24:08.3066552Z Author : sonarsource
2020-04-29T15:24:08.3067173Z Help : Version: 4.9.0. This task is not needed for Maven and Gradle projects since the scanner should be run as part of the build.

More Information
2020-04-29T15:24:08.3067821Z ==============================================================================
2020-04-29T15:24:08.4981485Z [command]/home/vsts/work/_tasks/SonarQubeAnalyze_6d01813a-9589-4b15-8491-8164aeb38055/4.9.0/sonar-scanner/bin/sonar-scanner
2020-04-29T15:24:09.0321585Z INFO: Scanner configuration file: /home/vsts/work/_tasks/SonarQubeAnalyze_6d01813a-9589-4b15-8491-8164aeb38055/4.9.0/sonar-scanner/conf/sonar-scanner.properties
2020-04-29T15:24:09.0348534Z INFO: Project root configuration file: NONE
2020-04-29T15:24:09.0615288Z INFO: SonarQube Scanner 4.2.0.1873
2020-04-29T15:24:09.0617346Z INFO: Java 1.8.0_242 Azul Systems, Inc. (64-bit)
2020-04-29T15:24:09.0618396Z INFO: Linux 5.0.0-1035-azure amd64
2020-04-29T15:24:09.4592383Z INFO: User cache: /home/vsts/.sonar/cache
2020-04-29T15:24:09.7043180Z INFO: ------------------------------------------------------------------------
2020-04-29T15:24:09.7044086Z INFO: EXECUTION FAILURE
2020-04-29T15:24:09.7045139Z INFO: ------------------------------------------------------------------------
2020-04-29T15:24:09.7050805Z INFO: Total time: 0.723s
2020-04-29T15:24:09.7316336Z INFO: Final Memory: 4M/105M
2020-04-29T15:24:09.7317884Z INFO: ------------------------------------------------------------------------
2020-04-29T15:24:09.7319546Z ##[error]ERROR: Error during SonarQube Scanner execution
2020-04-29T15:24:09.7321333Z ERROR: Error during SonarQube Scanner execution
2020-04-29T15:24:09.7384166Z ##[error]org.sonarsource.scanner.api.internal.ScannerException: Unable to execute SonarQube
at org.sonarsource.scanner.api.internal.IsolatedLauncherFactory.lambda$createLauncher$0(IsolatedLauncherFactory.java:85)
at java.security.AccessController.doPrivileged(Native Method)
at org.sonarsource.scanner.api.internal.IsolatedLauncherFactory.createLauncher(IsolatedLauncherFactory.java:74)
at org.sonarsource.scanner.api.internal.IsolatedLauncherFactory.createLauncher(IsolatedLauncherFactory.java:70)
at org.sonarsource.scanner.api.EmbeddedScanner.doStart(EmbeddedScanner.java:185)
at org.sonarsource.scanner.api.EmbeddedScanner.start(EmbeddedScanner.java:123)
at org.sonarsource.scanner.cli.Main.execute(Main.java:73)
at org.sonarsource.scanner.cli.Main.main(Main.java:61)
Caused by: java.lang.IllegalStateException: Fail to parse entry in bootstrap index: 2020-04-29T15:24:09.7419606Z org.sonarsource.scanner.api.internal.ScannerException: Unable to execute SonarQube
2020-04-29T15:24:09.7420172Z at org.sonarsource.scanner.api.internal.IsolatedLauncherFactory.lambda$createLauncher$0(IsolatedLauncherFactory.java:85)
2020-04-29T15:24:09.7420650Z at java.security.AccessController.doPrivileged(Native Method)
2020-04-29T15:24:09.7421099Z at org.sonarsource.scanner.api.internal.IsolatedLauncherFactory.createLauncher(IsolatedLauncherFactory.java:74)
2020-04-29T15:24:09.7421684Z at org.sonarsource.scanner.api.internal.IsolatedLauncherFactory.createLauncher(IsolatedLauncherFactory.java:70)
2020-04-29T15:24:09.7422192Z at org.sonarsource.scanner.api.EmbeddedScanner.doStart(EmbeddedScanner.java:185)
2020-04-29T15:24:09.7422631Z at org.sonarsource.scanner.api.EmbeddedScanner.start(EmbeddedScanner.java:123)
2020-04-29T15:24:09.7423044Z at org.sonarsource.scanner.cli.Main.execute(Main.java:73)
2020-04-29T15:24:09.7423394Z at org.sonarsource.scanner.cli.Main.main(Main.java:61)
2020-04-29T15:24:09.7718918Z ERROR: Re-run SonarQube Scanner using the -X switch to enable full debug logging.
2020-04-29T15:24:09.7721215Z ##[error]The process ‘/home/vsts/work/_tasks/SonarQubeAnalyze_6d01813a-9589-4b15-8491-8164aeb38055/4.9.0/sonar-scanner/bin/sonar-scanner’ failed with exit code 1
2020-04-29T15:24:09.7726723Z ##[section]Finishing: SonarQubeAnalyze

Hi,

Can you make sure that your SQ instance is available from your where your build agent is installed ?

Mickaël

SQ Instance is available with 4.9 Sonar Qube.

I meant, can you make sure that, from the machine where your build agent is, you can query your SonarQube instance ? (like make an HTTP call).

Thanks.

We are using Azure DevOps Build Agent. We don’t have connectivity. It will fail in the Sonar Configuration. It is failing on Sonar Cube Analysis.

Do we need provided any permission? We have open only 9000 port on VM. We need related for Azure Devops with Git. Suggest me.

How did you configure the Host URL in the Service connection ? Is it with a domain or an IP ? Do you have access to the instance where the build agent is to try to make http call ?

These are the configured way,
Service Connection - With URL and Token. URL using with IP address. We have enable outbound with all.