Error during SonarScanner execution:

I am attempting to get static analysis done of my code base via SonarQube and when running things locally everything works fine. However when run on the target machine sonar-scanner.bat fails with the following error:

INFO: Sensor CFamily [cpp]
INFO: ------------------------------------------------------------------------
INFO: ------------------------------------------------------------------------
INFO: Total time: 1:06.930s
INFO: Final Memory: 43M/154M
INFO: ------------------------------------------------------------------------
ERROR: Error during SonarScanner execution
java.lang.IllegalStateException: S:\
	at com.sonar.cpp.jni.FileSystemOperations.realPath(
	at com.sonar.cpp.plugin.AnalysisResultsExporter.<init>(
	at com.sonar.cpp.plugin.CFamilySensor.execute(
	at org.sonar.scanner.sensor.AbstractSensorWrapper.analyse(
	at org.sonar.scanner.sensor.ModuleSensorsExecutor.execute(
	at org.sonar.scanner.sensor.ModuleSensorsExecutor.execute(
	at org.sonar.scanner.scan.SpringModuleScanContainer.doAfterStart(
	at org.sonar.core.platform.SpringComponentContainer.startComponents(
	at org.sonar.core.platform.SpringComponentContainer.execute(
	at org.sonar.scanner.scan.SpringProjectScanContainer.scan(
	at org.sonar.scanner.scan.SpringProjectScanContainer.scanRecursively(
	at org.sonar.scanner.scan.SpringProjectScanContainer.doAfterStart(
	at org.sonar.core.platform.SpringComponentContainer.startComponents(
	at org.sonar.core.platform.SpringComponentContainer.execute(
	at org.sonar.scanner.bootstrap.SpringGlobalContainer.doAfterStart(
	at org.sonar.core.platform.SpringComponentContainer.startComponents(
	at org.sonar.core.platform.SpringComponentContainer.execute(
	at org.sonar.batch.bootstrapper.Batch.doExecute(
	at org.sonar.batch.bootstrapper.Batch.execute(
	at org.sonarsource.scanner.api.internal.batch.BatchIsolatedLauncher.execute(
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.base/java.lang.reflect.Method.invoke(Unknown Source)
	at org.sonarsource.scanner.api.internal.IsolatedLauncherProxy.invoke(
	at com.sun.proxy.$Proxy0.execute(Unknown Source)
	at org.sonarsource.scanner.api.EmbeddedScanner.doExecute(
	at org.sonarsource.scanner.api.EmbeddedScanner.execute(
	at org.sonarsource.scanner.cli.Main.execute(
	at org.sonarsource.scanner.cli.Main.execute(
	at org.sonarsource.scanner.cli.Main.main(
ERROR: Re-run SonarScanner using the -X switch to enable full debug logging.

Everything above this error looks more or less like a successful run from my local machine.

Now I (obviously) don’t have access to the source code so could someone take a look at this call stack and shed some light on what is going wrong? As stated above I have not been able to reproduce this locally.

Some background information about the environment:

  • The project is in C/C++
  • The version control being used is ClearCase (target is a dynamic view, local is a static view).
  • Both the target and my local machines are windows (target is Win10, local is Win11).
  • Both the build wrapper and SonarScanner (v4.7.0.2747) are being downloaded at run time as a zip file, are extracted to some directory, and are executed from the relevant project directory.

I attempted to run the sonar-scanner-debug.bat file instead on the target machine to see if it would reveal any other useful info, but it looks like the default version of it gets stuck waiting on some TCP connection?

"Executing SonarScanner in Debug Mode"
"SONAR_SCANNER_DEBUG_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000"
Listening for transport dt_socket at address: 8000
Build was aborted

I manually aborted the build after about 12 minutes after it started listening on a socket.

If any other info is needed let me know. Thank you!

Hey there.

What version of SonarQube are you using?

This is the sonar-scanner-cli version, right? It should be version
The server that is hosting our SonarQube instance is version: Enterprise Edition - Version 9.9.1 (build 69595)

I was able to recreate this issue locally with a ClearCase dynamic view

Hi @zarek_lazowski,

We currently don’t support ClearCase by default. Here is the ticket: [CPP-3674] - Jira

We have internal properties to work around this issue, but it has a performance penalty. I will share it with you privately and you can compare the analysis time with the shared properties vs. without properties and without ClearCase and choose what works better for you.


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.