Sonarqube runner failing "EXECUTION FAILURE"

We are trying to run sonarqube (msbuild) to scan the source code.using MSBuild.SonarQube.Runner.exe. After the end command it shows execution failure with no obvious reason why. Below is the log:

SONAR_SCANNER_OPTS is not configured. Setting it to the default value of -Xmx1024m
Calling the SonarQube Scanner...
Setting environment variable 'SONAR_SCANNER_OPTS'. Value: -Xmx1024m
Executing file C:\ProgramData\chocolatey\lib\msbuild-sonarqube-runner\tools\sonar-scanner-3.0.3.778\bin\sonar-scanner.bat
  Args: -Dsonar.scanAllFiles=true -Dproject.settings=C:\projects\build\.sonarqube\out\sonar-project.properties <sensitive data removed>
  Working directory: C:\projects\build
  Timeout (ms):-1
  Process id: 3432
INFO: Scanner configuration file: C:\ProgramData\chocolatey\lib\msbuild-sonarqube-runner\tools\sonar-scanner-3.0.3.778\bin\..\conf\sonar-scanner.properties
INFO: Project root configuration file: C:\projects\build\.sonarqube\out\sonar-project.properties
10:29:07.840 INFO: SonarQube Scanner 3.0.3.778
10:29:07.856 INFO: Java 19.0.1 Oracle Corporation (64-bit)
10:29:07.856 INFO: Windows Server 2016 10.0 amd64
10:29:07.856 INFO: SONAR_SCANNER_OPTS=-Xmx1024m
10:29:08.809 DEBUG: keyStore is : 
10:29:08.809 DEBUG: keyStore type is : pkcs12
10:29:08.809 DEBUG: keyStore provider is : 
10:29:08.809 DEBUG: init keystore
10:29:08.809 DEBUG: init keymanager of type SunX509
10:29:09.246 INFO: User cache: C:\Users\Administrator\.sonar\cache
10:29:09.246 DEBUG: Extract sonar-scanner-api-batch in temp...
10:29:09.264 DEBUG: Get bootstrap index...
10:29:09.264 DEBUG: Download: http://xx.xxx.xxx.57/batch/index
10:29:09.935 DEBUG: Get bootstrap completed
10:29:09.935 DEBUG: Create isolated classloader...
10:29:10.090 DEBUG: Start temp cleaning...
10:29:10.106 DEBUG: Temp cleaning done
10:29:10.106 DEBUG: Execution getVersion
10:29:10.187 DEBUG: Execution start
10:29:11.512 INFO: Issues mode
 Run Step - End: Ends SonarQube analysis

Please advise.

After running with publish mode:

Calling the SonarQube Scanner...
Setting environment variable 'SONAR_SCANNER_OPTS'. Value: -Xmx1024m
Executing file C:\ProgramData\chocolatey\lib\msbuild-sonarqube-runner\tools\sonar-scanner-3.0.3.778\bin\sonar-scanner.bat
  Args: -Dsonar.scanAllFiles=true -Dproject.settings=C:\projects\build\.sonarqube\out\sonar-project.properties <sensitive data removed>
  Working directory: C:\projects\build
  Timeout (ms):-1
  Process id: 5316
INFO: Scanner configuration file: C:\ProgramData\chocolatey\lib\msbuild-sonarqube-runner\tools\sonar-scanner-3.0.3.778\bin\..\conf\sonar-scanner.properties
INFO: Project root configuration file: C:\projects\build\.sonarqube\out\sonar-project.properties
12:14:53.436 INFO: SonarQube Scanner 3.0.3.778
12:14:53.436 INFO: Java 19.0.1 Oracle Corporation (64-bit)
12:14:53.436 INFO: Windows Server 2016 10.0 amd64
12:14:53.436 INFO: SONAR_SCANNER_OPTS=-Xmx1024m
12:14:53.858 DEBUG: keyStore is : 
12:14:53.858 DEBUG: keyStore type is : pkcs12
12:14:53.873 DEBUG: keyStore provider is : 
12:14:53.873 DEBUG: init keystore
12:14:53.873 DEBUG: init keymanager of type SunX509
12:14:54.264 INFO: User cache: C:\Users\Administrator\.sonar\cache
12:14:54.264 DEBUG: Extract sonar-scanner-api-batch in temp...
12:14:54.264 DEBUG: Get bootstrap index...
12:14:54.264 DEBUG: Download: http://xx.xxx.xxx.57/batch/index
12:14:54.358 DEBUG: Get bootstrap completed
12:14:54.358 DEBUG: Create isolated classloader...
12:14:54.480 DEBUG: Start temp cleaning...
12:14:54.494 DEBUG: Temp cleaning done
12:14:54.494 DEBUG: Execution getVersion
12:14:54.525 DEBUG: Execution start
12:14:54.991 INFO: Publish mode
12:14:55.204 INFO: Load global settings
12:14:55.263 DEBUG: GET 200 http://xx.xxx.xxx.57/api/settings/values.protobuf | time=43ms
12:14:55.291 INFO: Load global settings (done) | time=88ms
12:14:55.306 INFO: Server id: AWDIwuNj4k06Z0I7GUo8
12:14:55.320 INFO: User cache: C:\Users\Administrator\.sonar\cache
12:14:55.608 INFO: Load plugins index
12:14:55.615 DEBUG: GET 200 http://xx.xxx.xxx.57/api/plugins/installed | time=6ms
12:14:55.671 INFO: Load plugins index (done) | time=63ms
12:14:55.671 DEBUG: Load plugins
12:14:55.712 DEBUG: Load plugins (done) | time=41ms
12:14:55.750 DEBUG: Plugins:
12:14:55.750 DEBUG:   * GitHub 1.4.2.1027 (github)
12:14:55.750 DEBUG:   * SonarC# 6.7.1.4347 (csharp)
12:14:55.751 DEBUG:   * SonarTS 1.5.0.2122 (typescript)
12:14:55.751 DEBUG:   * SonarQube :: Plugins :: SCM :: Git 1.3.0.869 (scmgit)
12:14:55.751 DEBUG:   * GitHub Authentication for SonarQube 1.3 (authgithub)
12:14:55.777 DEBUG: Execution getVersion
12:14:55.777 INFO: SonarQube server 6.7.1
12:14:55.780 INFO: Default locale: "en_US", source code encoding: "UTF-8" (analysis is platform dependent)
12:14:55.781 DEBUG: Work directory: C:\projects\build\.sonarqube\out\.sonar
12:14:55.782 DEBUG: Execution getVersion
12:14:55.782 DEBUG: Execution execute
12:14:56.542 INFO: Process project properties
12:14:56.700 DEBUG: Process project properties (done) | time=158ms
12:14:56.737 INFO: Load project repositories
12:14:56.756 DEBUG: GET 200 http://xx.xxx.xxx.57/batch/project.protobuf?key=xxxxxxx.xxxxxxxx.serverapps | time=18ms
12:14:56.915 INFO: Load project repositories (done) | time=178ms
12:14:56.927 INFO: Execute project builders
12:14:56.931 INFO: ------------------------------------------------------------------------
12:14:56.931 INFO: EXECUTION FAILURE
12:14:56.931 INFO: ------------------------------------------------------------------------
12:14:56.932 INFO: Total time: 3.776s
12:14:56.957 INFO: Final Memory: 44M/79M
12:14:56.957 INFO: ------------------------------------------------------------------------

Hi,

Your version is very much past EOL. You should upgrade to either the latest version or the current LTS at your earliest convenience. Your upgrade path is:

6.7.1 → 7.9.6 → 8.9.10 → 9.8 (last step optional)

(Note that the release of a new LTS, 9.9, is expected on 7 Feb 2023.)

You may find the Upgrade Guide and the LTS-to-LTS Upgrade Notes helpful. If you have questions about upgrading, feel free to open a new thread for that here.

In addition to upgrading the server, you should make sure you have the latest scanner version installed, and make sure you’re using a supported Java version. Even for the very latest version, Java 19 isn’t supported yet for analysis.

 
Ann