We use VSTS and we are now trying to analize solutions with SonarQube. We are running SonarQube version: 6.7.4.38452
I was following all suggested steps to analize, but in the SonarQube first step I’am getting this error:
Phase: Prepare SonarQube analysis configuration -->Version 4.*
[SQ] API GET '/api/server/version' failed, error was: {"code":"ETIMEDOUT","errno":"ETIMEDOUT","syscall":"connect","address":"XXX.XX.XXX.XXX","port":9000}
Where XXX.XX.XXX.XXX is our external IP address for SonarQube server running in port 9000.
Similarly to other past threads, it looks like you’re hitting a connectivity issue, independent from SonarQube itself (the error comes from the underlying stacks).
Did you try this from the VSTS agent itself ? If not I would suggest to first simply check if the VSTS agent does have connectivity to that IP address or not.
You are right. It was connectivity issue.
In VSTS phase I was traying to put the external URL for our SonarQube Server, instead the address for the agent is an internal IP.
Changing the VSTS phase URL address to an internal SonarQube Server URL solve the problem.
In order to get it work, you have to install an on-premise version of TFS (2017+ is supported) / Azure DevOps Server, then install the SonarQube extension then configure your build pipeline with it.
Yes I’m not able to access my sonarQube instance(hosted on Azure VM) http://10.x.x.x:9000/ from local machine. This service connection I’m accessing from project VSTS pipeline.
Which build agent are you using ? a Microsoft-Hosted or one that you have installed by yourself ? Weird that your IP is a private one whereas your are on an Azure VM (or at least you have a private network inside it)