Skip to content

C-ARES not being enabled, cannot use authority based dns uri #667

@neogeno

Description

@neogeno

Problem description

I am able to connect to my GRPC service written in GO normally if I use an IP address. I then switched to using a domain and it also works correct. Finally I created a new domain that for some reason can only be queried by some nameservers so I wanted to specify that when connecting so that I can skip my ISP's DNS server.

I understand this is supported using the C-ARES resolver with the format "dns://" to specify a name server authority but the connection fails now with an error about dns uri's not being supported. It seems no matter what i do it is still using the built in default getaddrinfo() C based resolver. How do I make dns URI's work?

Reproduction steps

  1. npm install grpc (grpc-native-core) or build from source in node project directory. I tried also to change 'GRPC_ARES=1' in binding.gyp file as well but to no avail
  2. in NodeJS source, add process.env.GRPC_DNS_RESOLVER = 'ares'; var grpc = require('grpc');
  3. When connecting to a GRPC service specify hostname in the format "dns://205.251.195.125/[hostname:port]

Environment

  • OS name : Mac OS Mojave 10.14.1
  • Node version : TRIED ON BOTH: grpc@1.17.0 AND grpc@1.16.x
  • Node installation method : npm
  • Package name and version grpc@1.17.0-dev
E1204 16:12:56.903283000 4570682816 dns_resolver.cc:313]               authority based dns uri's not supported
E1204 16:12:56.903681000 4570682816 channel.cc:95]                     channel stack builder failed: {"created":"@1543911176.903664000","description":"resolver creation failed","file":"../deps/grpc/src/core/ext/filters/client_channel/client_channel.cc","file_line":853}
{ Error: 2 UNKNOWN: lame client channel
   at Object.exports.createStatusError (/Users/patrickchugh/Dropbox/Dev/nodejs/grpc-node/packages/grpc-native-core/src/common.js:91:15)
   at Object.onReceiveStatus (/Users/patrickchugh/Dropbox/Dev/nodejs/grpc-node/packages/grpc-native-core/src/client_interceptors.js:1204:28)
   at InterceptingListener._callNext (/Users/patrickchugh/Dropbox/Dev/nodejs/grpc-node/packages/grpc-native-core/src/client_interceptors.js:568:42)
   at InterceptingListener.onReceiveStatus (/Users/patrickchugh/Dropbox/Dev/nodejs/grpc-node/packages/grpc-native-core/src/client_interceptors.js:618:8)
   at callback (/Users/patrickchugh/Dropbox/Dev/nodejs/grpc-node/packages/grpc-native-core/src/client_interceptors.js:845:24)
 code: 2,
 metadata: Metadata { _internal_repr: {} },
 details: 'lame client channel' }```

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions