An exception occurred during a WebClient request

dotnet
network_error

(Nikitha Appana) #1

SonarQube version : 7.3
Sonarscanner for MSBuild : 4.0.2

I am trying to run Sonarscanner for MSbuild using Teamcity and during the begin step I get the following error. My Sonarqube service is running with LocalAccount. This is an upgrade from an earlier version, The project died out and I recently started it with the old database. I successfully upgraded the version and the database to SQLServer 2017.

Failed to request and parse 'jdbc:sqlserver://csny01snr001;databaseName=Sonar/api/server/version': An exception occurred during a WebClient request.*
Unhandled Exception: System.Net.WebException: An exception occurred during a WebClient request. ---> System.NotSupportedException: The URI prefix is not recognized.*
at System.Net.WebRequest.Create(Uri requestUri, Boolean useUriBase)*
at System.Net.WebRequest.Create(Uri requestUri)*
at System.Net.WebClient.GetWebRequest(Uri address)*
at System.Net.WebClient.DownloadDataInternal(Uri address, WebRequest& request)*
* --- End of inner exception stack trace ---*
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.<>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)*
Process exited with code 255*

(Duncan Pocklington) #2

Check the value you are specifying for sonar.host.url. It looks like a database connection string rather than a URL.

It is no longer necessary to specify the database connection details when analysing (since SonarQube v5.2). Now you just need to provide the server URL (and credentials, unless anonymous access is allowed).


(Nikitha Appana) #3

Thank you, This fixed the issue


(Nikitha Appana) #4

How can I determine what should be the Xmx value? Do you have any calculation to the size of the project vs the Xmx value?


(Nicolas Bontoux) #5

Hi,

For separate question please raise topics, otherwise it’s hard for everybody to track discussions and contribute effectively. Before you raise a specific topic though, I strongly suggest browsing existing discussions on this topic, notably: