Azure DevOps Pipeline for Sonarqube with MsBuild is failing on Prepare Analysis Configuration // [SQ] API GET '/api/server/version' failed, error was: {"code":"ENOTFOUND"

Task : Prepare Analysis Configuration
Version : 4.11.0

Error Log :  ==============================================================================
2020-09-29T10:25:21.4301053Z Task         : Prepare Analysis Configuration
2020-09-29T10:25:21.4301379Z Description  : Prepare SonarQube analysis configuration
2020-09-29T10:25:21.4301628Z Version      : 4.11.0
2020-09-29T10:25:21.4301840Z Author       : sonarsource
2020-09-29T10:25:21.4302281Z Help         : Version: 4.11.0. [More Information](http://redirect.sonarsource.com/doc/install-configure-scanner-tfs-ts.html)
2020-09-29T10:25:21.4302741Z ==============================================================================
2020-09-29T10:25:21.4890707Z ##[debug]Using node path: C:\agents\2.175.2\externals\node\bin\node.exe
2020-09-29T10:25:21.9954050Z ##[debug]agent.TempDirectory=D:\a\_temp
2020-09-29T10:25:21.9991785Z ##[debug]loading inputs and endpoints
2020-09-29T10:25:22.0076740Z ##[debug]loading ENDPOINT_AUTH_7c57737d-6001-42cc-8e61-11b15e496ce4
2020-09-29T10:25:22.0088151Z ##[debug]loading ENDPOINT_AUTH_PARAMETER_7c57737d-6001-42cc-8e61-11b15e496ce4_USERNAME
2020-09-29T10:25:22.0094714Z ##[debug]loading ENDPOINT_AUTH_PARAMETER_SYSTEMVSSCONNECTION_ACCESSTOKEN
2020-09-29T10:25:22.0097178Z ##[debug]loading ENDPOINT_AUTH_SCHEME_7c57737d-6001-42cc-8e61-11b15e496ce4
2020-09-29T10:25:22.0100275Z ##[debug]loading ENDPOINT_AUTH_SCHEME_SYSTEMVSSCONNECTION
2020-09-29T10:25:22.0103101Z ##[debug]loading ENDPOINT_AUTH_SYSTEMVSSCONNECTION
2020-09-29T10:25:22.0107965Z ##[debug]loading INPUT_CLIPROJECTVERSION
2020-09-29T10:25:22.0109343Z ##[debug]loading INPUT_CLISOURCES
2020-09-29T10:25:22.0111588Z ##[debug]loading INPUT_CONFIGFILE
2020-09-29T10:25:22.0114843Z ##[debug]loading INPUT_CONFIGMODE
2020-09-29T10:25:22.0170874Z ##[debug]loading INPUT_EXTRAPROPERTIES
2020-09-29T10:25:22.0171638Z ##[debug]loading INPUT_PROJECTKEY
2020-09-29T10:25:22.0172026Z ##[debug]loading INPUT_PROJECTNAME
2020-09-29T10:25:22.0172371Z ##[debug]loading INPUT_PROJECTVERSION
2020-09-29T10:25:22.0172686Z ##[debug]loading INPUT_SCANNERMODE
2020-09-29T10:25:22.0173015Z ##[debug]loading INPUT_SONARQUBE
2020-09-29T10:25:22.0173325Z ##[debug]loaded 16
2020-09-29T10:25:22.0204098Z ##[debug]Agent.ProxyUrl=undefined
2020-09-29T10:25:22.0207702Z ##[debug]Agent.CAInfo=undefined
2020-09-29T10:25:22.0208710Z ##[debug]Agent.ClientCert=undefined
2020-09-29T10:25:22.0209832Z ##[debug]Agent.SkipCertValidation=undefined
2020-09-29T10:25:22.9801680Z ##[debug]SonarQube=7c57737d-6001-42cc-8e61-11b15e496ce4
2020-09-29T10:25:22.9803600Z ##[debug]7c57737d-6001-42cc-8e61-11b15e496ce4=https://sonar.test-domain.com/
2020-09-29T10:25:22.9804164Z ##[debug]7c57737d-6001-42cc-8e61-11b15e496ce4 auth param apitoken = null
2020-09-29T10:25:22.9810824Z ##[debug]7c57737d-6001-42cc-8e61-11b15e496ce4 auth param username = ***
2020-09-29T10:25:22.9814265Z ##[debug]7c57737d-6001-42cc-8e61-11b15e496ce4 auth param password = null
2020-09-29T10:25:22.9814652Z ##[debug]organization=null
2020-09-29T10:25:22.9834312Z ##[debug]scannerMode=MSBuild
2020-09-29T10:25:22.9834860Z ##[debug]projectKey=testsonardatalayer
2020-09-29T10:25:22.9841544Z ##[debug]projectName=testsonardatalayer
020-09-29T10:25:22.9844955Z ##[debug]projectVersion=1.0
2020-09-29T10:25:22.9845561Z ##[debug]organization=null
2020-09-29T10:25:22.9852676Z ##[debug][SQ] API GET: '/api/server/version' with query "undefined"
2020-09-29T10:25:23.0980689Z ##[debug][SQ] API GET '/api/server/version' failed, error was: {"code":"ENOTFOUND","errno":"ENOTFOUND","syscall":"getaddrinfo","hostname":"sonar.test-domain.com","host":"sonar.test-domain.com","port":443}
2020-09-29T10:25:23.1004631Z ##[debug]task result: Failed

Hi,

Welcome to the community!

One of the first things that happens in analysis is a call to the server to get some basic information. It looks like that call failed. You need to make sure SonarQube is accessible from your analysis machine. You might want to ping your network folks.

 
HTH,
Ann