nslookup reported “can't resolve '(null)': Name does not resolve” though it successfully resolved the DNS names

后端 未结 1 1275
长情又很酷
长情又很酷 2021-02-19 04:52

I am on ubuntu, and I am running a docker default bridge network. I have containerized versions of zookeeper, kafka, and an app that I wrote that talks to kafka.

I do a

相关标签:
1条回答
  • 2021-02-19 05:10

    This is a bug/oddity in nslookup. The "can't resolve" message is actually about the DNS server in use, not the site you are trying to look up.

    For example this query (which tells nslookup to lookup google.com using the 8.8.8.8 DNS server) has no error message:

    nslookup google.com 8.8.8.8
    Server:    8.8.8.8
    Address 1: 8.8.8.8 dns.google
    
    Name:      google.com
    Address 1: 172.217.164.110 sfo03s18-in-f14.1e100.net
    Address 2: 2607:f8b0:4005:80b::200e sfo03s18-in-x0e.1e100.net
    

    But this query (in which the DNS server is "null") does show the "error":

    UAP-AC-LR1-BZ.v4.0.42# nslookup google.com
    nslookup: can't resolve '(null)': Name does not resolve
    
    Name:      google.com
    Address 1: 172.217.164.110 sfo03s18-in-f14.1e100.net
    Address 2: 2607:f8b0:4005:80b::200e sfo03s18-in-x0e.1e100.net
    

    Admittedly this is misleading/confusing, and really should be fixed in nslookup.

    0 讨论(0)
提交回复
热议问题