2
votes

I am trying to run sonarqube analysis with Ci build. I have added the tasks ‘Prepare analysis on Sonarqube’ and ‘Run Code Analysis’ in my vsts build definition . I am getting the below error upon queuing the build:

[SQ] API GET ‘/api/server/version’ failed, error was: {“code”:“ENOTFOUND”,“errno”:“ENOTFOUND”,“syscall”:“getaddrinfo”,“hostname”:“sonarqube.sssss.com”,“host”:“sonarqube.ssss.com”,“port”:443}

Sonarqube version I’m using is 6.1. Can anyone help me in finding why this issue is occurring .

1
Can you share your build pipeline? - Shayki Abramczyk

1 Answers

2
votes

Issue in integrating sonarqube analysis with Ci build

According to the error message API GET ‘/api/server/version’ failed, it seems your Azure DevOps agent fails to connect to the SonarQube URL.

If you are using Hosted agent, it could not access to your localhost SonarQube server. So, you have to use private agent.

If you are using private but still have this issue, you should confirm your private agent could connect to SonarQube server.

Check the similar thread for some more details.

Hope this helps.