2

I'm using systemd-resolved configured for mDNS. host command takes a long time on .local queries. Example:

$ time host blah.local
;; connection timed out; no servers could be reached


real    0m10.019s
user    0m0.016s
sys     0m0.005s

The above is a bad query (host blah.local does not exist), but the same happens with other queries as well:

$ time host valid.local
valid.local has address 192.168.0.1
;; connection timed out; no servers could be reached


real    0m10.021s
user    0m0.011s
sys     0m0.011s

where it quickly displays the IP of the host and then spends those 10s doing something.

How can I troubleshoot this?

levant pied
  • 231
  • 1
  • 7

1 Answers1

-1

You want to use "host" command to resolve hostnames with ".local" domains ?

I think this wil not work, cuz "host" command is using DNS Server to resolve the requested hostname.

Since "valid.local" doesnt have a DNS-Record , this will fail.

Commands like "ping" uses "/etc/hosts" to resolve the hostname

Vafa
  • 312
  • 1
  • 6
  • 1
    Actually, `host valid.local` resolves fine, just there's a 10s delay after that for some reason that I'm trying to track down. – levant pied Sep 12 '20 at 23:19
  • as I have answered above. "host" command is using DNS-Server and you can only resolve it if you have changed the configuration of "/etc/resolve.conf" . If ypu wnat to know what happens to your request , try strace host valiud.local you can also take a look at similar post: https://unix.stackexchange.com/questions/457166/can-not-resolve-local-domains-internal-to-my-office-lan – Vafa Sep 13 '20 at 22:17