Failed Request to Parse ... Version string portion was too short or too long

(Patrick Delaney) #1

using TFS 2015 update 4 SonarQube plugin 3.0.1… I got the following error when I tried to run a build with the Plug in:

14:18:12.102  Fetching analysis configuration settings...
14:18:12.164 Failed to request and parse 'http://sonar-corp-p1:8999/projects/api/server/version': Version string portion was too short or too long.
Unhandled Exception: System.ArgumentException: Version string portion was too short or too long.
at System.Version.VersionResult.SetFailure(ParseFailureKind failure, String argument)
at System.Version.TryParseVersion(String version, VersionResult& result)
at System.Version.Parse(String input)
at System.Version..ctor(String version)
at SonarQube.TeamBuild.PreProcessor.SonarWebService.<>c__DisplayClass15_0.<DownloadServerVersion>b__0()
at SonarQube.TeamBuild.PreProcessor.SonarWebService.DoLogExceptions[T](Func`1 op, String url)
at SonarQube.TeamBuild.PreProcessor.SonarWebService.DownloadServerVersion()
at SonarQube.TeamBuild.PreProcessor.SonarWebService.GetServerVersion()
at SonarQube.TeamBuild.PreProcessor.SonarWebService.GetProperties(String projectKey, String projectBranch)
at SonarQube.TeamBuild.PreProcessor.TeamBuildPreProcessor.FetchArgumentsAndRulesets(ISonarQubeServer server, ProcessedArgs args, TeamBuildSettings settings, IDictionary`2& serverSettings, List`1& analyzersSettings)
at SonarQube.TeamBuild.PreProcessor.TeamBuildPreProcessor.DoExecute(ProcessedArgs localSettings)
at SonarQube.TeamBuild.PreProcessor.TeamBuildPreProcessor.Execute(String[] args)
at SonarQube.Bootstrapper.BootstrapperClass.PreProcess()
at SonarQube.Bootstrapper.BootstrapperClass.Execute()
at SonarQube.Bootstrapper.Program.Execute(String[] args, ILogger logger)
at SonarQube.Bootstrapper.Program.Main(String[] args)
at SonarQube.Old.Bootstrapper.Program.Main(String[] args)
Unexpected exit code received from batch file: 255

Any Ideas?

(Colin Mueller) #2


I am going to guess that perhaps you or somebody else entered http://sonar-corp-p1:8999/projects/ as the endpoint url, when really http://sonar-corp-p1:8999 would be the correct server URL to use.


(Patrick Delaney) #3

Good Idea I’ll check that when I get to the office. What about the Version error?

(Colin Mueller) #4


The URL being hit based on the endpoint URL provided is probably returning a 404 or other server error, rather than the version of your SonarQube server. Correcting the endpoint URL will hit the right Web API. :slight_smile:

Try visiting http://sonar-corp-p1:8999/api/server/version to see what I mean.


(Patrick Delaney) #5

I corrected the URL and now it’s all WORKING! Thanks again