Build failed when adding "Prepare Analysis SonarQube" in Azure DevOps Pipeline

Hi,

I’m using the last version of SonarQube Community and Azure DevOps 2019. I have installed SonarQube extension from the marketplace and then create a new service connection.

But, when I add “Prepare Analysis” in my build I get this error :

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

I’ve already checked that my SonarQube was up and that I can log to this adress : http://localhost:9000

Any help would be appreciated.
Thank you.

Hi @Audrey

Can you make sure that your “localhost” instance is on the same machine that your Azure Devops Server instance ? Otherwise you will be more interested by referencing this SQ instance by its IP address instead, otherwise this is normal that it doesn’t work.

HTH,
Mickaël