Skip to content

Failed to resolve domain/ silently failed to track within WSL2 #56

@untoldone

Description

@untoldone

I haven't been able to completely investigate this / understand the root causes, but I'm opening an issue here in case anyone else hits the same problem as I suspect its a common setup to use Go within WSL2 with Application Insights.

At first, I wasn't seeing any events make it to my Application Insights instance so I had to add a diagnostic listener via NewDiagnosticsMessageListener -- that showed the following message:

Failed to transmit telemetry: Post "https://dc.services.visualstudio.com/v2/track": dial tcp: lookup dc.services.visualstudio.com on 172.30.208.1:53: cannot unmarshal DNS message

When outside the application dig dc.services.visualstudio.com would resolve the domain correctly. While researching this I came across the similar rclone/rclone#4984 in which the project member @ncw created the upstream issue golang/go#44135 (appears to have been automatically closed without research / assignment).

A work around for this issue is to set the environment variable GODEBUG=netdns=cgo when running/ building your application.

I'd be ok if this is seen as not related to this project, but given it seems there's no one pursuing the upstream fix, it will cause this library to fail silently without really giving any hints that the library isn't working which seems a noteworthy usability issue which at a minimum I would think should be documented here given the likelihood of this lib being used with WSL.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions