Antarr Byrd Antarr Byrd - 9 months ago 98
Linux Question

SonarQube not extending timeout

I'm getting an error when trying to use SonarQube with TFS Online. Its timing out during processing. I changed the sonar.properties file and restarted the service. But I still get an error saying it timed out because it didn't finish in 300 seconds. I've even tried scaling the server to give it more power. I'm currently under, D2_V2 on Azure.

sonar.properties



sonar.jdbc.maxWait=900000


error




2017-03-11T20:12:34.4141248Z Waiting on the SonarQube server to finish
processing in order to determine the quality gate status.
2017-03-11T20:12:34.4141248Z 2017-03-11T20:12:34.4141248Z
2017-03-11T20:17:34.7999965Z

[error]System.Management.Automation.RuntimeException: The analysis did not complete in the allotted time of 300 seconds. Consider setting



the build variable SonarQubeAnalysisTimeoutInSeconds to a higher
value. ---> System.Management.Automation.RuntimeException: The
analysis did not complete in the allotted time of 300 seconds.
Consider setting the build variable SonarQubeAnalysisTimeoutInSeconds
to a higher value. 2017-03-11T20:17:34.7999965Z --- End of inner
exception stack trace --- 2017-03-11T20:17:34.7999965Z at
System.Management.Automation.Runspaces.PipelineBase.Invoke(IEnumerable
input) 2017-03-11T20:17:34.7999965Z at
System.Management.Automation.PowerShell.Worker.ConstructPipelineAndDoWork(Runspace
rs, Boolean performSyncInvoke) 2017-03-11T20:17:34.8009662Z at
System.Management.Automation.PowerShell.Worker.CreateRunspaceIfNeededAndDoWork(Runspace
rsToUse, Boolean isSync) 2017-03-11T20:17:34.8009662Z at
System.Management.Automation.PowerShell.CoreInvokeHelper[TInput,TOutput](PSDataCollection
1
input, PSDataCollection
1 output, PSInvocationSettings settings)
2017-03-11T20:17:34.8009662Z at
System.Management.Automation.PowerShell.CoreInvoke[TInput,TOutput](PSDataCollection
1
input, PSDataCollection
1 output, PSInvocationSettings settings)
2017-03-11T20:17:34.8009662Z at
Microsoft.TeamFoundation.DistributedTask.Handlers.LegacyVSTSPowerShellHost.VSTSPowerShellHost.Main(String[]
args) 2017-03-11T20:17:34.8109668Z

[error]LegacyVSTSPowerShellHost.exe completed with return code: -1. 2017-03-11T20:17:34.8109668Z ##[section]Finishing: Complete the



SonarQube analysis

Answer Source

As the error message says:

The analysis did not complete in the allotted time of 300 seconds. Consider setting the build variable SonarQubeAnalysisTimeoutInSeconds to a higher value

Go to the Variables tab in the build definition, add the above mentioned variable and up the value.