Sonar Cloud timeout in Azure DevOps pipelines

Hi, we use self-hosted agents and our self-hosted agents to run sonarcloud tasks fine but it has stopped working. Basically using azure devops pipelines and self-hosted agents. When running sonarcloud prepare task it is throwing time out and not able to connect. Error appears as below. We have tried clearing any DNS IP’S cached on the servers, but still no luck. I was wondering if sonarcloud is expected to work on the self-hosted servers or is it more pain to whitelist IP’S. I think IP’S for sonarcloud change regularly and not static. Everytime we run it fails and comes with different IP in the error. Any suggestions is much appreciated please. Thank you

##[error][SQ] API GET ‘/api/server/version’ failed, error is connect ETIMEDOUT 52.222.169.52:443

Hey there.

Just to understand if it’s an isolated problem or being faced by multiple users, are you working with the same user as on this thread?

And, I’d like to know:

  • What operating system / version are your self-hosted agents?
  • What version of the Azure DevOps agent is installed?
  • When did the problem start (you said it was working fine before)?

SonarCloud is expected to work on self-hosted servers that have access to the internet. And, you cannot use static IP addresses to allow outbound traffic to SonarCloud (as you mentioned, the IP addresses change regularly).

It would also be useful if you could run a tracert sonarcloud.io or traceroute sonarcloud.io (depending on the OS being used) and paste the results here.

Thanks for getting back to me
I am assuming multiple users are facing similar issue I suppose. I have found some thread too which is similar I suppose ( Timeout issue with Sonar cloud in Azure devops pipeline - SonarCloud - Sonar Community (sonarsource.com)) but didn’t find much help from that one

I will try to answer the questions

Operating system is Windows server 2019
Agent version is 3.227.2
Last time it has worked in august, we are using MS Hosted agent for time being. Tried to resolve this for a while from august and not having much luck with it and hence posted for some help basically.

Finally I have tried tracert sonarcloud.io and attaching results
tracert-Sonarcloud

Any suggestions please, thank you for your time

So it looks like the request dies at 10.66.50.155. What is that address? A router? Some network appliance?

Not sure what IP that is, we have a proxy setup and agents expect to go through the proxy. So I am wondering traceroute test may not be viable in our network?

If traffic is flowing through a proxy, I would reccomend consulting with your network team why the traffic isn’t making it out of your LAN to SonarCloud.