2

I am trying to integrate SonarQube MSBuild runner with TFS 2013 and I am using SonarQube 5.2 version and MSBuild.SonarQube.Runner-1.0.2 with all the required plug-ins for LDAP, .NET and C#. I get this error when I run the TFS Build:

Unhandled Exception: System.Net.WebException: The remote server returned an error: (401) Unauthorized.
at System.Net.WebClient.DownloadDataInternal(Uri address, WebRequest& request)
at System.Net.WebClient.DownloadString(Uri address)
at System.Net.WebClient.DownloadString(String address)
at SonarQube.TeamBuild.PreProcessor.WebClientDownloader.Download(String url)
at SonarQube.TeamBuild.PreProcessor.SonarWebService.GetProperties(String projectKey, ILogger logger)
at SonarQube.TeamBuild.PreProcessor.PropertiesFetcher.FetchProperties(SonarWebService ws, String sonarProjectKey, ILogger logger)
at SonarQube.TeamBuild.PreProcessor.TeamBuildPreProcessor.FetchArgumentsAndRulesets(ProcessedArgs args, String configDir, ILogger logger, IDictionary`2& serverSettings)
at SonarQube.TeamBuild.PreProcessor.TeamBuildPreProcessor.DoExecute(ProcessedArgs args, ILogger logger)
at SonarQube.TeamBuild.PreProcessor.TeamBuildPreProcessor.Execute(String[] args, ILogger logger)
at SonarQube.TeamBuild.PreProcessor.Program.Main(String[] args)
Exception Message: TF270015: 'MSBuild.SonarQube.Runner.exe' returned an unexpected exit code. Expected '0'; actual '-532462766'. See the build logs for more details. (type UnexpectedExitCodeException)Exception Stack Trace:    at System.Activities.Statements.Throw.Execute(CodeActivityContext context)   at System.Activities.CodeActivity.InternalExecute(ActivityInstance instance, ActivityExecutor executor, BookmarkManager bookmarkManager)   at System.Activities.Runtime.ActivityExecutor.ExecuteActivityWorkItem.ExecuteBody(ActivityExecutor executor, BookmarkManager bookmarkManager, Location resultLocation)
Pascal Berger
  • 4,262
  • 2
  • 30
  • 54
mprabhu
  • 21
  • 2

1 Answers1

2

Only technical users are supported for authentication from MSBuild.SonarQube.Runner.exe or SonarQube Runner against SonarQube 5.2 with LDAP plugin 1.5.1(and Windows Authentication mode enabled).

  • This appears to be the problem and once I modified MSBuild SonarQube Runner to authenticate with a technical user it worked....thank you – mprabhu Dec 17 '15 at 12:17