不知道为什么我从nslookup得到两个回复

时间:2017-09-27 20:59:41

标签: linux ubuntu docker dns nslookup

我在ubuntu上,我正在运行一个docker默认网桥。我有容器化版本的zookeeper,kafka,以及我写的一个与kafka对话的应用程序。

我做了:

nslookup kafka

然后在我的应用程序容器中运行/go # nslookup schmafka nslookup: can't resolve '(null)': Name does not resolve Name: schmafka Address 1: 172.20.0.8 docker_kafka_1.docker_default

/go # cat /etc/resolv.conf 
search valhalla.local valhalla v
nameserver 127.0.0.11
options ndots:0

我不明白为什么我得到输出"无法解决'(null)'"然后我得到以后打印出来的预期IP地址。我试图谷歌nslookup和这个输出消息,但我无法弄清楚为什么会发生这种情况。

我的/etc/resolv.conf文件如下所示:

$('a').click(function(){ console.log( $(this).data('type') ) })

1 个答案:

答案 0 :(得分:1)

这是nslookup中的错误/怪癖。 “无法解析”消息实际上是有关正在使用的DNS服务器的信息,而不是您要查找的站点的信息。

例如,此查询(告诉nslookup使用8.8.8.8 DNS服务器查找google.com)没有错误消息:

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

但是此查询(DNS服务器为“ null”)确实显示“错误”:

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

诚然,这是令人误解/令人困惑的,确实应该在nslookup中修复。

相关问题