Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
untoldone opened this issue Oct 28, 2021 · 1 comment
Open

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

untoldone opened this issue Oct 28, 2021 · 1 comment

Comments

@untoldone
Copy link

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.

@untoldone untoldone changed the title Failed to resolve domains silently within WSL2 Failed to resolve domain/ track silently within WSL2 Oct 28, 2021
@untoldone untoldone changed the title Failed to resolve domain/ track silently within WSL2 Failed to resolve domain/ silently failed to track within WSL2 Oct 28, 2021
@jjjordanmsft
Copy link
Contributor

Thanks for this note. As @jboelter has mentioned, this appears to be related to an upstream issue. The silent failure is unfortunately a side-effect of asynchronous transmission, though I'm glad you were able to detect it from the diagnostic messages.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants