I’m trying to analyze a massive solution file with several thousand projects in it, so I’m not shocked that I’m hitting a timeout. I am just hoping to find a way to increase it before i start finding a way to split this thing.
what have you tried so far to achieve this
I have not seen any settings in sonarqube or the sonarqube properties file that seem to relate to the timeout. So I’m just trying to figure out where its originating from and if it can be changed.
INFO: ------------------------------------------------------------------------
INFO: EXECUTION FAILURE
INFO: ------------------------------------------------------------------------
INFO: Total time: 10:23.179s
INFO: Final Memory: 14M/50M
ERROR: Error during SonarQube Scanner execution
INFO: ------------------------------------------------------------------------
org.sonar.api.utils.command.TimeoutException: Timeout exceeded: 600000 ms [command: C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterp
rise\Team Tools\Static Analysis Tools\FxCop\FxCopCmd.exe /project:C:\Builds\CI1\1\s\folder\folder.sln.20200311100410.fxcop /
ruleset:=C:\SonarScanner\C\SonarScanner\.sonarqube\out\.sonar\mod1337\fxcop-sonarqube.ruleset /out:C:\SonarScanner\C\SonarScanner\.sonarqube\o
ut\.sonar\mod1337\fxcop-report.xml /outxsl:none /forceoutput /searchgac]
at org.sonar.api.utils.command.CommandExecutor.execute(CommandExecutor.java:96)
at org.sonar.api.utils.command.CommandExecutor.execute(CommandExecutor.java:134)
at org.sonar.plugins.fxcop.FxCopExecutor.execute(FxCopExecutor.java:65)
at org.sonar.plugins.fxcop.FxCopSensor.executeFxCop(FxCopSensor.java:215)
at org.sonar.plugins.fxcop.FxCopSensor.analyse(FxCopSensor.java:95)
at org.sonar.plugins.fxcop.FxCopSensor.executeImpl(FxCopSensor.java:83)
at org.sonar.plugins.fxcop.FxCopSensor.execute(FxCopSensor.java:73)
at org.sonar.scanner.sensor.AbstractSensorWrapper.analyse(AbstractSensorWrapper.java:48)
at org.sonar.scanner.sensor.ModuleSensorsExecutor.execute(ModuleSensorsExecutor.java:85)
at org.sonar.scanner.sensor.ModuleSensorsExecutor.lambda$execute$1(ModuleSensorsExecutor.java:59)
at org.sonar.scanner.sensor.ModuleSensorsExecutor.withModuleStrategy(ModuleSensorsExecutor.java:77)
at org.sonar.scanner.sensor.ModuleSensorsExecutor.execute(ModuleSensorsExecutor.java:59)
at org.sonar.scanner.scan.ModuleScanContainer.doAfterStart(ModuleScanContainer.java:82)
at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:136)
at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:122)
at org.sonar.scanner.scan.ProjectScanContainer.scan(ProjectScanContainer.java:400)
at org.sonar.scanner.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:395)
at org.sonar.scanner.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:392)
at org.sonar.scanner.scan.ProjectScanContainer.doAfterStart(ProjectScanContainer.java:358)
at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:136)
at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:122)
at org.sonar.scanner.bootstrap.GlobalContainer.doAfterStart(GlobalContainer.java:141)
at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:136)
at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:122)
at org.sonar.batch.bootstrapper.Batch.doExecute(Batch.java:73)
at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:67)
at org.sonarsource.scanner.api.internal.batch.BatchIsolatedLauncher.execute(BatchIsolatedLauncher.java:46)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.sonarsource.scanner.api.internal.IsolatedLauncherProxy.invoke(IsolatedLauncherProxy.java:60)
at com.sun.proxy.$Proxy0.execute(Unknown Source)
at org.sonarsource.scanner.api.EmbeddedScanner.doExecute(EmbeddedScanner.java:189)
at org.sonarsource.scanner.api.EmbeddedScanner.execute(EmbeddedScanner.java:138)
at org.sonarsource.scanner.cli.Main.execute(Main.java:112)
at org.sonarsource.scanner.cli.Main.execute(Main.java:75)
at org.sonarsource.scanner.cli.Main.main(Main.java:61)
Caused by: java.util.concurrent.TimeoutException
at java.base/java.util.concurrent.FutureTask.get(FutureTask.java:204)
at org.sonar.api.utils.command.CommandExecutor.execute(CommandExecutor.java:87)
... 37 more
ERROR:
The SonarQube Scanner did not complete successfully
I’m not the one to help you on this (I’ve added tags to attract the right attention) but it’s going to help if you also include at least some of the analysis log before the error.
Here is a shortened and sanitized version of the analysis output.
C:\SonarScanner>"C:\SonarScanner\SonarScanner.MSBuild.exe" end
SonarScanner for MSBuild 4.8
Using the .NET Framework version of the Scanner for MSBuild
Post-processing started.
WARNING: The following projects do not have a valid ProjectGuid and were not built using a valid solution (.sln) thus will be skipped from analysis...
<20 lines of duplicate guids>
<660 lines of .SQL files it cant find>
Calling the SonarQube Scanner...
INFO: Scanner configuration file: C:\SonarScanner\sonar-scanner-4.2.0.1873\bin\..\conf\sonar-scanner.properties
INFO: Project root configuration file: C:\SonarScanner\.sonarqube\out\sonar-project.properties
INFO: SonarQube Scanner 4.2.0.1873
INFO: Java 11.0.2 Oracle Corporation (64-bit)
INFO: Windows Server 2016 10.0 amd64
INFO: User cache: C:\Users\user\.sonar\cache
INFO: SonarQube server 7.9.1
INFO: Default locale: "en_US", source code encoding: "windows-1252" (analysis is platform dependent)
INFO: Load global settings
INFO: Load global settings (done) | time=344ms
INFO: Server id:
INFO: User cache: C:\Users\user\.sonar\cache
INFO: Load/download plugins
INFO: Load plugins index
INFO: Load plugins index (done) | time=313ms
INFO: Load/download plugins (done) | time=329ms
INFO: Process project properties
INFO: Execute project builders
INFO: Execute project builders (done) | time=282ms
INFO: Project key: Services
INFO: Base dir: D:\SonarTest\Source\Server
INFO: Working dir: C:\SonarScanner\.sonarqube\out\.sonar
INFO: Load project settings for component key: 'Services'
INFO: Load project settings for component key: 'Services' (done) | time=297ms
INFO: Load quality profiles
INFO: Load quality profiles (done) | time=297ms
INFO: Load active rules
INFO: Load active rules (done) | time=970ms
INFO: Indexing files...
INFO: Project configuration:
INFO: Excluded sources: files.cs
INFO: Indexing files of module <module name>
<5,848 lines of file indexing>
INFO: 10148 files indexed
INFO: 0 files ignored because of inclusion/exclusion patterns
INFO: Quality profile for cs: Combined Server
INFO: ------------- Run sensors on module file.service.abc
INFO: Load metrics repository
INFO: Load metrics repository (done) | time=297ms
WARNING: WARNING: An illegal reflective access operation has occurred
WARNING: WARNING: Illegal reflective access by net.sf.cglib.core.ReflectUtils$1 (file:/C:/Users/user/.sonar/cache/54f6535c111cefad0fb6a09ba3e61922/sonar-javascript-plugin.jar) to method java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain)
WARNING: WARNING: Please consider reporting this to the maintainers of net.sf.cglib.core.ReflectUtils$1
WARNING: WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: WARNING: All illegal access operations will be denied in a future release
INFO: Sensor C# Properties [csharp]
INFO: Sensor C# Properties [csharp] (done) | time=16ms
INFO: Sensor FxCop (cs) [fxcop]
INFO: Base Dir: D:\SonarTest\Source\Services\abcdef
INFO: sonar.dotnet.visualstudio.solution.file not set
INFO: Project key: ProjectKeyGoesHere
INFO: Work Dir: C\SonarScanner\.sonarqube\out\.sonar\mod10
INFO: FxCop start create FxCop configuration for 'D:\SonarTest\Source\Services\Services.sln'
INFO: Start execute: C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Team Tools\Static Analysis Tools\FxCop\FxCopCmd.exe /project:D:\SonarTest\Source\Services\Services.sln.20200311053503.fxcop /ruleset:=C:\SonarScanner\C\SonarScanner\.sonarqube\out\.sonar\mod10\fxcop-sonarqube.ruleset /out:C:\SonarScanner\C\SonarScanner\.sonarqube\out\.sonar\mod10\fxcop-report.xml /outxsl:none /forceoutput /searchgac
INFO: Executing command: C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Team Tools\Static Analysis Tools\FxCop\FxCopCmd.exe /project:D:\SonarTest\Source\Services\Services.sln.20200311053503.fxcop /ruleset:=C:\SonarScanner\C\SonarScanner\.sonarqube\out\.sonar\mod10\fxcop-sonarqube.ruleset /out:C:\SonarScanner\C\SonarScanner\.sonarqube\out\.sonar\mod10\fxcop-report.xml /outxsl:none /forceoutput /searchgac
INFO: Microsoft (R) FxCop Command-Line Tool, Version 15.0 (15.0.28307.705) X86
INFO: Copyright (C) Microsoft Corporation, All Rights Reserved.
INFO:
INFO: Loading D:\SonarTest\Source\Services\Services.sln.20200311053503.fxcop...
INFO: Loaded <file name>
<997 lines of loaded files>
INFO: ------------------------------------------------------------------------
INFO: EXECUTION FAILURE
INFO: ------------------------------------------------------------------------
INFO: Total time: 10:19.824s
INFO: Final Memory: 13M/68M
INFO: ------------------------------------------------------------------------
INFO: ------------------------------------------------------------------------
INFO: EXECUTION FAILURE
INFO: ------------------------------------------------------------------------
INFO: Total time: 10:23.179s
INFO: Final Memory: 14M/50M
ERROR: Error during SonarQube Scanner execution
INFO: ------------------------------------------------------------------------
org.sonar.api.utils.command.TimeoutException: Timeout exceeded: 600000 ms [command: C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterp
rise\Team Tools\Static Analysis Tools\FxCop\FxCopCmd.exe /project:C:\Builds\CI1\1\s\folder\folder.sln.20200311100410.fxcop /
ruleset:=C:\SonarScanner\C\SonarScanner\.sonarqube\out\.sonar\mod1337\fxcop-sonarqube.ruleset /out:C:\SonarScanner\C\SonarScanner\.sonarqube\o
ut\.sonar\mod1337\fxcop-report.xml /outxsl:none /forceoutput /searchgac]
at org.sonar.api.utils.command.CommandExecutor.execute(CommandExecutor.java:96)
at org.sonar.api.utils.command.CommandExecutor.execute(CommandExecutor.java:134)
at org.sonar.plugins.fxcop.FxCopExecutor.execute(FxCopExecutor.java:65)
at org.sonar.plugins.fxcop.FxCopSensor.executeFxCop(FxCopSensor.java:215)
at org.sonar.plugins.fxcop.FxCopSensor.analyse(FxCopSensor.java:95)
at org.sonar.plugins.fxcop.FxCopSensor.executeImpl(FxCopSensor.java:83)
at org.sonar.plugins.fxcop.FxCopSensor.execute(FxCopSensor.java:73)
at org.sonar.scanner.sensor.AbstractSensorWrapper.analyse(AbstractSensorWrapper.java:48)
at org.sonar.scanner.sensor.ModuleSensorsExecutor.execute(ModuleSensorsExecutor.java:85)
at org.sonar.scanner.sensor.ModuleSensorsExecutor.lambda$execute$1(ModuleSensorsExecutor.java:59)
at org.sonar.scanner.sensor.ModuleSensorsExecutor.withModuleStrategy(ModuleSensorsExecutor.java:77)
at org.sonar.scanner.sensor.ModuleSensorsExecutor.execute(ModuleSensorsExecutor.java:59)
at org.sonar.scanner.scan.ModuleScanContainer.doAfterStart(ModuleScanContainer.java:82)
at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:136)
at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:122)
at org.sonar.scanner.scan.ProjectScanContainer.scan(ProjectScanContainer.java:400)
at org.sonar.scanner.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:395)
at org.sonar.scanner.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:392)
at org.sonar.scanner.scan.ProjectScanContainer.doAfterStart(ProjectScanContainer.java:358)
at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:136)
at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:122)
at org.sonar.scanner.bootstrap.GlobalContainer.doAfterStart(GlobalContainer.java:141)
at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:136)
at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:122)
at org.sonar.batch.bootstrapper.Batch.doExecute(Batch.java:73)
at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:67)
at org.sonarsource.scanner.api.internal.batch.BatchIsolatedLauncher.execute(BatchIsolatedLauncher.java:46)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.sonarsource.scanner.api.internal.IsolatedLauncherProxy.invoke(IsolatedLauncherProxy.java:60)
at com.sun.proxy.$Proxy0.execute(Unknown Source)
at org.sonarsource.scanner.api.EmbeddedScanner.doExecute(EmbeddedScanner.java:189)
at org.sonarsource.scanner.api.EmbeddedScanner.execute(EmbeddedScanner.java:138)
at org.sonarsource.scanner.cli.Main.execute(Main.java:112)
at org.sonarsource.scanner.cli.Main.execute(Main.java:75)
at org.sonarsource.scanner.cli.Main.main(Main.java:61)
Caused by: java.util.concurrent.TimeoutException
at java.base/java.util.concurrent.FutureTask.get(FutureTask.java:204)
at org.sonar.api.utils.command.CommandExecutor.execute(CommandExecutor.java:87)
... 37 more
ERROR:
The SonarQube Scanner did not complete successfully
There should not be 10 minutes timeout on our side. Looking at the log, it looks that timeout is raised by FxCop plugin. We don’t maintain this plugin, so this repository could be direction of further investigation.
Looking at FxCop plugin, I’ve found these settings that you can try to set through SonarScanner analysis:
For C#: sonar.cs.fxcop.timeoutMinutes
For VB.NET: sonar.vbnet.fxcop.timeoutMinutes