grpc: C-Ares cannot find DNS Servers
What version of gRPC and what language are you using?
C# .Net Standard 2.0 gRPC 1.21.0
What operating system (Linux, Windows,…) and version?
Windows 10 Version 1809
What runtime / compiler are you using (e.g. python version or version of gcc)
vbcs.exe via MSBUILD
What did you do?
If possible, provide a recipe for reproducing the error. Try being specific and include code snippets if helpful.
The client is unable to resolve DNS address of the server unless the GRPC_DNS_RESOLVER environment variable to “native”.
What did you expect to see?
I expected gRPC to work out of the box, I would not need to set the GRPC_DNS_RESOLVER environment variable.
What did you see instead?
C-Ares “Could not contact DNS servers” .
Make sure you include information that can help us debug (full error message, exception listing, stack trace, logs).
Below are the gRPC logs, any help is greatly appreciated!
I0814 18:33:56.089860 0 T:\src\github\grpc\workspace_csharp_ext_windows_x64\src\core\ext\filters\client_channel\resolving_lb_policy.cc:318: resolving_lb=000002315BE67890: resolver transient failure: {"created":"@1565822036.090000000","description":"DNS resolution failed","file":"T:\src\github\grpc\workspace_csharp_ext_windows_x64\src\core\ext\filters\client_channel\resolver\dns\c_ares\dns_resolver_ares.cc","file_line":358,"grpc_status":14,"referenced_errors":[{"created":"@1565822036.088000000","description":"C-ares status is not ARES_SUCCESS: Could not contact DNS servers","file":"T:\src\github\grpc\workspace_csharp_ext_windows_x64\src\core\ext\filters\client_channel\resolver\dns\c_ares\grpc_ares_wrapper.cc","file_line":244,"referenced_errors":[{"created":"@1565822036.088000000","description":"C-ares status is not ARES_SUCCESS: Could not contact DNS servers","file":"T:\src\github\grpc\workspace_csharp_ext_windows_x64\src\core\ext\filters\client_channel\resolver\dns\c_ares\grpc_ares_wrapper.cc","file_line":244}]}]}
Anything else we should know about your project / environment?
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 19 (8 by maintainers)
Note that this error occurs also when incorrectly invoking
new Channel("https://host:port", ...)
instead ofnew Channel("host:port", ...)
A coworker on my team, who doesn’t use GH, had to use
GRPC_DNS_RESOLVER=native
to get the .NET Firebase Admin SDK to connect to his DB instance.Would be nice if there was a more proper fix for this.
i’m experiencing this issue as well.
GRPC_DNS_RESOLVER=native
does make it work.on windows, trying to resolve an A record in an AWS private hosted zone http only.
@apolcyn did you manage to get any progress on that?
We see the same error in Python when gRPC client is pointed to the AWS network loadbalncer, and we pull on of the server instances out of the group: