Sonar connection work for Self-hosted agent but not working with Azure Pipelines Agent

Hi All,
I am facing issue in using Sonar Service connection when i use Azure Pipeline agents. Everything works expected if i use selfhosted agent. How can i fix it any hints

Starting: Prepare analysis on SonarQube

Task : Prepare Analysis Configuration
Description : Prepare SonarQube analysis configuration
Version : 6.3.2
Author : sonarsource
Help : More Information

##[warning]Error while executing SonarQube:Prepare task: [SQ] API GET ‘/api/server/version’ failed, error is request to https://sonar.int.xyz.com/api/server/version failed, reason: getaddrinfo ENOTFOUND care-sonar.int.com
##[error][SQ] API GET ‘/api/server/version’ failed, error is request to https://sonar.int.xyz.com/api/server/version failed, reason: getaddrinfo ENOTFOUND sonar.int.xyz.com
Finishing: Prepare analysis on SonarQube

Hi,

Welcome to the community!

This error is telling you that the scanner can’t talk to SonarQube. You should probably start with your network folks.

 
HTH,
Ann

Thanks for replying. I am able to talk to SonarQube. My issue is that How to use the service connection with Azure Pipeline agents and not with hosted agents.

Hi,

Can you share your pipeline configuration?

 
Thx,
Ann

Hi Ann,

What configuration you need ? It seems when i use Azure Pipeline agent they are Linux machine through which the cant talk to Sonar server. But when i use a self hosted window agent machine everything works fine.

I am wondering what is missing : Azure DevOps integration

Hi,

It looks like you need to talk to your network folks.

 
HTH,
Ann