Search code examples
azure-devopssonarqube

I get the following error when i try to connect sonarqube with azure devops build pipeline


[error][SQ] API GET '/api/server/version' failed, error was:
{ "code": "ECONNREFUSED", "errno": "ECONNREFUSED",
"syscall":"connect","address":"127.0.0.1","port":9000 }

I have configured sonarqube and it's running fine on localhost.


Solution

  • You may need to run your build pipeline on your on-premise agent in order to integrate with your local sonarque server. For cloud hosted agent cannot access local your SQ server with address 127.0.0.1:9000.

    It is easy to install and configure self-hosted agents, please check the microsoft official detailed guidance here.

    Please check the exercise 2 here for detailed steps to integrate build pipeline with SonarQube .

    However you can also follow the detailed steps in exercise 1 here to create a sonarque server hosted on azure. Azure hosted SQ server works with both on-premise agents and microsoft-hosted agents.