Help with time outs

I’ve been trying for hours now to get this scan going and it’s been timing out every time. I’m running this command:

dotnet sonarscanner begin /key:"Acme.v4" /name:"Acme Enterprise" /version:"4.2.0" /"120" /"$SONAR_HOST" /d:sonar.login="$SONAR_LOGIN" /d:sonar.pullrequest.key="$GITHUB_PULL_REQUEST_ID" /d:sonar.pullrequest.branch="$branch" /d:sonar.pullrequest.base=develop

I can hit the sonarqube endpoint just fine. I’m running sonarqube * Developer Edition

  • Version 8.0 (build 29455) and the ‘dotnet-sonarscanner’ (version ‘4.8.0’)
[16:19:17]16:19:15.321  Failed to request and parse '': The operation has timed out.
[16:19:17]Unhandled exception. System.Net.WebException: The operation has timed out.
[16:19:17]   at System.Net.HttpWebRequest.GetResponse()
[16:19:17]   at System.Net.WebClient.GetWebResponse(WebRequest request)
[16:19:17]   at System.Net.WebClient.DownloadBits(WebRequest request, Stream writeStream)
[16:19:17]   at System.Net.WebClient.DownloadDataInternal(Uri address, WebRequest& request)
[16:19:17]   at System.Net.WebClient.DownloadString(Uri address)
[16:19:17]   at System.Net.WebClient.DownloadString(String address)
[16:19:17]   at SonarScanner.MSBuild.PreProcessor.WebClientDownloader.<>c__DisplayClass5_0.<TryDownloadIfExists>b__0()
[16:19:17]   at SonarScanner.MSBuild.PreProcessor.WebClientDownloader.DoIgnoringMissingUrls(Action op)
[16:19:17]   at SonarScanner.MSBuild.PreProcessor.WebClientDownloader.TryDownloadIfExists(String url, String& contents)
[16:19:17]   at SonarScanner.MSBuild.PreProcessor.SonarWebService.<>c__DisplayClass17_0.<GetProperties63>b__0()
[16:19:17]   at SonarScanner.MSBuild.PreProcessor.SonarWebService.DoLogExceptions[T](Func`1 op, String url, Action`1 onError)
[16:19:17]   at SonarScanner.MSBuild.PreProcessor.SonarWebService.GetProperties63(String projectId)
[16:19:17]   at SonarScanner.MSBuild.PreProcessor.SonarWebService.GetProperties(String projectKey, String projectBranch)
[16:19:17]   at SonarScanner.MSBuild.PreProcessor.TeamBuildPreProcessor.FetchArgumentsAndRulesets(ISonarQubeServer server, ProcessedArgs args, TeamBuildSettings settings, IDictionary`2& serverSettings, List`1& analyzersSettings)
[16:19:17]   at SonarScanner.MSBuild.PreProcessor.TeamBuildPreProcessor.DoExecute(ProcessedArgs localSettings)
[16:19:17]   at SonarScanner.MSBuild.PreProcessor.TeamBuildPreProcessor.Execute(String[] args)
[16:19:17]   at SonarScanner.MSBuild.BootstrapperClass.PreProcess()
[16:19:17]   at SonarScanner.MSBuild.BootstrapperClass.Execute()
[16:19:17]   at SonarScanner.MSBuild.Program.Execute(String[] args, ILogger logger)
[16:19:17]   at SonarScanner.MSBuild.Program.Execute(String[] args, Boolean showDeprecatedWarning)
[16:19:17]   at SonarScanner.MSBuild.Program.Main(String[] args)
[16:19:17]Process exited with code 134


As you specified /"120", you confirm that this query timeout after 120s? :open_mouth:
This is really weird, especially knowing that this query is not that problematic (not like the report submission for example).

Can you check into access.log if this query even reach SQ? If yes, I hope web.log will say more about it, it not, well, you’ll have to look somewhere else, probably a proxy in the middle.


You know what it was? $SONAR_HOST was using https which I think requires SSL verification. Pointing at HTTP and the ip of the server worked out. I guess I’ll just settle for that ¯_(ツ)_/¯. Thanks though @Antoine.

Good catch @nsaud01

So this is not SQ related I confirm, though it might be good to understand on your side why using HTTPS did not work. Up to you!