NLnetLabs / ldns

LDNS is a DNS library that facilitates DNS tool programming
https://nlnetlabs.nl/ldns
BSD 3-Clause "New" or "Revised" License
295 stars 99 forks source link

How to query consul SRV records #103

Closed nbari closed 2 years ago

nbari commented 4 years ago

For getting the service records from consul (https://www.consul.io/docs/agent/dns.html#standard-lookup) normally I could do:

$ dig @10.0.0.2 -p 8600 <service>.service.consul SRV

But I can't find a way to get the records using drill

In some cases I get the warning:

;; WARNING: The answer packet was truncated; you might want to
;; query again with TCP (-t argument), or EDNS0 (-b for buffer size)

but I still can't get the records using option -t or -b

Any ideas?

I have been using as an alternative host, for example:

host -t srv consul.service.consul

Trying this in latest stable FreeBSD 12.1, drill version 1.7.0 (ldns version 1.7.0)

I am trying querying directly the consul server at port 8600 or an unbound with this configuration:

#Allow insecure queries to local resolvers
server:
  do-not-query-localhost: no
  domain-insecure: "consul"

#Add consul as a stub-zone
stub-zone:
  name: "consul"
  stub-addr: 127.0.0.1@8600
wtoorop commented 2 years ago

I don't know. I can query SRV records with drill just fine. It would be helpful if you would have an example accessible for me so I can reproduce

wtoorop commented 2 years ago

Closing because I cannot reproduce. Please reopen if you can help me resolve this further.