尝试在 StackExchange 站点上查看帖子中的图像时,我很惊讶地在 Ubuntu 18.04 上的 Chromium 中看到此错误消息:
无法访问此站点
找不到 i.stack.imgur.com的服务器 IP 地址。
DNS_PROBE_FINISHED_NXDOMAIN
为了找出发生了什么,我尝试运行tcpdump
以查看 DNS 请求和响应。我试图重新加载给我错误的图像,这是我看到的 DNS 流量:
# tcpdump -pni any 'port 53'
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on any, link-type LINUX_SLL (Linux cooked), capture size 262144 bytes
20:10:17.618041 IP 127.0.0.1.42714 > 127.0.0.53.53: 3068+ A? i.stack.imgur.com. (35)
20:10:17.618080 IP 127.0.0.1.42714 > 127.0.0.53.53: 23569+ AAAA? i.stack.imgur.com. (35)
20:10:17.618861 IP 127.0.0.53.53 > 127.0.0.1.42714: 3068 13/0/0 CNAME i.stack.imgur.com.cdn.cloudflare.net., A 104.16.0.35, A 104.16.26.34, A 104.16.2.35, A 104.16.30.34, A 104.16.28.34, A 104.16.24.34, A 104.16.25.34, A 104.16.29.34, A 104.16.27.34, A 104.16.3.35, A 104.16.1.35, A 104.16.31.34 (277)
20:10:17.619395 IP 127.0.0.53.53 > 127.0.0.1.42714: 23569| 16/0/0 CNAME i.stack.imgur.com.cdn.cloudflare.net., AAAA 2001:67c:2b0:db32:0:1:6810:1f22, AAAA 2001:67c:2b0:db32:0:1:6810:1b22, AAAA 64:ff9b::6810:23, AAAA 2001:67c:2b0:db32:0:1:6810:223, AAAA 2001:67c:27e4:64::6810:123, AAAA 64:ff9b::6810:1f22, AAAA 2001:67c:27e4:64::6810:1f22, AAAA 2001:67c:27e4:64::6810:223, AAAA 2001:67c:27e4:64::6810:1b22, AAAA 2001:67c:27e4:64::6810:1922, AAAA 2001:67c:2b0:db32:0:1:6810:1d22, AAAA 64:ff9b::6810:123, AAAA 2001:67c:2b0:db32:0:1:6810:1e22, AAAA 64:ff9b::6810:1822, AAAA 2001:67c:2b0:db32:0:1:6810:1822 (505)
如您所见,DNS 解析成功。但是 Chromium 仍然向我显示相同的 NXDOMAIN 错误消息。当查找确实成功时,什么可能导致 Chromium 报告 NXDOMAIN?