I have a simple setup with a single Azure VM running sonarqube, and an NSG attached to the NIC with a public IP. I have been unable to get the NSG inbound rule to work with either Service Tag 'AzureDevOps' or 'AzureCloud'. Everything else in the NSG has been configured at this point to either Any or * other than the destination port 9000.
I tried multiple Service Tags and it keeps giving me the same timeout error:
##[error][SQ] API GET '/api/server/version' failed, error was: {"errno":"ETIMEDOUT","code":"ETIMEDOUT","syscall":"connect","address":"","port":9000}
The only thing that works is to have it open to any source, which is no feasible anymore
##[error][SQ] API GET '/api/server/version' failed, error was: {"errno":"ETIMEDOUT","code":"ETIMEDOUT","syscall":"connect","address":"","port":9000}
To solve this issue, you need to add the correct service tag to the VM NSG rule if you are using Microsoft-hosted Agent.
Refer to the following steps to confirm the service tag:
Step1: Check the Azure DevOps Organization Region in Organization Setting -> Overview -> Region
Step2: Based on the region ,you can go to Azure VM -> Networking -> Find the service tag: Azurecloud.regionname
For example:
Region: Southeast Asia -> Service tag: AzureCloud.southeastasia
On the other hand, if you are using self-hosted agent, you need to manually get the Agent IP and add to NSG rule.