0

I have an Azure DevOps pipeline that runs on a self-hosted build agent behind a firewall. The pipeline creates some files and publishes them as artifacts using the "PublishPipelineArtifact" task. However, after the artifact is published, I receive a warning that the "ApplicationInsightsTelemetrySender" failed to track events due to a "Name or service not known" error when attempting to connect to "dc.services.visualstudio.com:443".

I am using Azure DevOps version and a self-hosted build agent behind a firewall. I have already tried disabling Application Insights and checking my firewall settings, but the error still occurs.

- task: PublishPipelineArtifact@1
  condition: always()
  name: "PublishLZRInvoicingArtifacts"
  inputs:
    targetPath: $(System.DefaultWorkingDirectory)/ManagedServices/reports
    artifact: reports
    Warning, ApplicationInsightsTelemetrySender failed to TrackEvent(DedupUpload.UploadAsync) System.Net.Http.HttpRequestException: Name or service not known (dc.services.visualstudio.com:443)
     ...
    Warning, ApplicationInsightsTelemetrySender failed to TrackEvent(PipelineArtifact.UploadAsync) System.Net.Http.HttpRequestException: Name or service not known (dc.services.visualstudio.com:443)

all the urls from the link are added to the firewall: https://learn.microsoft.com/en-us/azure/devops/pipelines/agents/v2-windows?view=azure-devops#im-running-a-firewall-and-my-code-is-in-azure-repos-what-urls-does-the-agent-need-to-communicate-with

when i run a nslookup in the pipeline, it seems like the dns is failing, but i am not sure what to do about it:

dc.services.visualstudio.com    canonical name = dc.applicationinsights.microsoft.com.
dc.applicationinsights.microsoft.com    canonical name = dc.applicationinsights.azure.com.
dc.applicationinsights.azure.com    canonical name = global.in.ai.monitor.azure.com.
global.in.ai.monitor.azure.com  canonical name = global.in.ai.privatelink.monitor.azure.com.
** server can't find global.in.ai.privatelink.monitor.azure.com: NXDOMAIN

What could be causing this error, and how can I resolve it?

Nadia Hansen
  • 697
  • 2
  • 6
  • 16

1 Answers1

0

Could you be having a private DNS zone for Azure Monitor privatelink.monitor.azure.com linked to either your vnet hub or the spoke where your self-hosted Azure DevOps Agents is connected?

Please see Microsofts documentation on this: Azure Monitor private links rely on your DNS

Pay specially attention to the following note:

Because Azure Monitor uses some shared endpoints (meaning endpoints that aren't resource specific), setting up a private link even for a single resource changes the DNS configuration that affects traffic to all resources. In other words, traffic to all workspaces or components is affected by a single private link setup.

tlfzhylj
  • 1
  • 3