Version string portion was too short or too long. (Parameter 'input')

Versions installed:

  • Sonarqube server 7.9.1.27448 LTS (running on Windows server 2016, MSSQL)
  • Dotnet SonarScanner 4.8.0
  • RHEL 7.6 for scanner machine - OpenJDK 1.8.0_232

I am getting the below error when trying to run this via Jenkins or manually in the workspace. I am able to get that URL fine without issue and can see the version (listed above for sonarqube) so it’s not a simple config issue.

Looking through the code, I can see where it is error’ing but unsure as to why (https://github.com/SonarSource/sonar-scanner-msbuild/blob/4.8.0.12008/src/SonarScanner.MSBuild.PreProcessor/SonarWebService.cs#L296) OR why it is complaining about the “input parameter”

Command I am running:

~/.dotnet/tools/dotnet-sonarscanner begin /k:test /v:latest /d:sonar.verbose=true /d:sonar.host.url=http://cicd-sonardev:9000/ /d:sonar-login=<token> /d:sonar.scanner.dumpToFile=/tmp/sonar.log

Output:

11:34:27.636  Downloading from http://cicd-sonardev:9000/api/server/version...
11:34:27.728  Failed to request and parse 'http://cicd-sonardev:9000/api/server/version': Version string portion was too short or too long. (Parameter 'input')
Unhandled exception. System.ArgumentException: Version string portion was too short or too long. (Parameter 'input')
   at System.Version.ParseVersion(ReadOnlySpan`1 input, Boolean throwOnFailure) in /_/src/System.Private.CoreLib/shared/System/Version.cs:line 341
   at System.Version.Parse(String input) in /_/src/System.Private.CoreLib/shared/System/Version.cs:line 308
   at System.Version..ctor(String version) in /_/src/System.Private.CoreLib/shared/System/Version.cs:line 31
   at SonarScanner.MSBuild.PreProcessor.SonarWebService.<>c__DisplayClass15_0.<DownloadServerVersion>b__0()
   at SonarScanner.MSBuild.PreProcessor.SonarWebService.DoLogExceptions[T](Func`1 op, String url, Action`1 onError)
   at SonarScanner.MSBuild.PreProcessor.SonarWebService.DownloadServerVersion()
   at SonarScanner.MSBuild.PreProcessor.SonarWebService.GetServerVersion()
   at SonarScanner.MSBuild.PreProcessor.SonarWebService.GetProperties(String projectKey, String projectBranch)
   at SonarScanner.MSBuild.PreProcessor.TeamBuildPreProcessor.FetchArgumentsAndRulesets(ISonarQubeServer server, ProcessedArgs args, TeamBuildSettings settings, IDictionary`2& serverSettings, List`1& analyzersSettings)
   at SonarScanner.MSBuild.PreProcessor.TeamBuildPreProcessor.DoExecute(ProcessedArgs localSettings)
   at SonarScanner.MSBuild.PreProcessor.TeamBuildPreProcessor.Execute(String[] args)
   at SonarScanner.MSBuild.BootstrapperClass.PreProcess()
   at SonarScanner.MSBuild.BootstrapperClass.Execute()
   at SonarScanner.MSBuild.Program.Execute(String[] args, ILogger logger)
   at SonarScanner.MSBuild.Program.Execute(String[] args, Boolean showDeprecatedWarning)
   at SonarScanner.MSBuild.Program.Main(String[] args)
Aborted

I tested this with our production system (SSL enabled through IIS and URL Rewrite).
That worked, and is on the same version, etc