Ubuntu 服务器出错:服务器返回错误 NXDOMAIN

Ubuntu 服务器出错:服务器返回错误 NXDOMAIN

我正在运行 Ubuntu 服务器(18.04.1),几天以来我在系统日志中看到了这些消息:

systemd-resolved[1059]: Server returned error NXDOMAIN, mitigating potential DNS violation DVE-2018-0001, retrying transaction with reduced feature level UDP.

收到这些消息时,我无法从外部世界访问我的服务器,只能从我的内部局域网访问。需要几分钟的时间,然后才能再次从其域名访问服务器。

系统日志的输出:

11/5/18
1:51:02.000 PM  
Nov  5 13:51:02 server systemd-resolved[1059]: message repeated 12 times: [ Server returned error NXDOMAIN, mitigating potential DNS violation DVE-2018-0001, retrying transaction with reduced feature level UDP.]
host =  server source = /var/log/syslog sourcetype =    syslog
11/5/18
1:50:59.000 PM  
Nov  5 13:50:59 server systemd-resolved[1059]: Server returned error NXDOMAIN, mitigating potential DNS violation DVE-2018-0001, retrying transaction with reduced feature level UDP.
host =  server source = /var/log/syslog sourcetype =    syslog
11/5/18
1:50:39.000 PM  
Nov  5 13:50:39 server snapd[1255]: stateengine.go:102: state ensure error: Get https://api.snapcraft.io/api/v1/snaps/sections: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)
host =  server source = /var/log/syslog sourcetype =    syslog
11/5/18
1:44:20.000 PM  
Nov  5 13:44:20 server systemd-resolved[1059]: message repeated 5 times: [ Server returned error NXDOMAIN, mitigating potential DNS violation DVE-2018-0001, retrying transaction with reduced feature level UDP.]
host =  server source = /var/log/syslog sourcetype =    syslog
11/5/18
1:44:20.000 PM  
Nov  5 13:44:20 server systemd-resolved[1059]: Server returned error NXDOMAIN, mitigating potential DNS violation DVE-2018-0001, retrying transaction with reduced feature level UDP.
host =  server source = /var/log/syslog sourcetype =    syslog
11/5/18
1:15:24.000 PM  
Nov  5 13:15:24 server systemd-resolved[1059]: Server returned error NXDOMAIN, mitigating potential DNS violation DVE-2018-0001, retrying transaction with reduced feature level UDP.
host =  server source = /var/log/syslog sourcetype =    syslog
11/5/18
1:15:24.000 PM  
Nov  5 13:15:24 server systemd-resolved[1059]: Server returned error NXDOMAIN, mitigating potential DNS violation DVE-2018-0001, retrying transaction with reduced feature level UDP.
host =  server source = /var/log/syslog sourcetype =    syslog
11/5/18
1:07:27.000 PM  
Nov  5 13:07:27 server systemd-resolved[1059]: message repeated 5 times: [ Server returned error NXDOMAIN, mitigating potential DNS violation DVE-2018-0001, retrying transaction with reduced feature level UDP.]
host =  server source = /var/log/syslog sourcetype =    syslog
11/5/18
1:07:27.000 PM  
Nov  5 13:07:27 server systemd-resolved[1059]: Server returned error NXDOMAIN, mitigating potential DNS violation DVE-2018-0001, retrying transaction with reduced feature level UDP.
host =  server source = /var/log/syslog sourcetype =    syslog
11/5/18
12:49:57.000 PM 
Nov  5 12:49:57 server systemd-resolved[1059]: message repeated 12 times: [ Server returned error NXDOMAIN, mitigating potential DNS violation DVE-2018-0001, retrying transaction with reduced feature level UDP.]

我无法通过 Google 搜索此错误信息找到正确的答案。

谁能帮我?

答案1

这就是 systemd 的工作方式:如果systemd-resolve尝试解析无法解析的域,则会记录该消息,您可以忽略该消息。可能还有其他错误情况会导致发出此警告。

使用不存在的 Internet 或 Intranet 域名时,会发生 NXDOMAIN 错误。其名称的意思是“不存在的域”。如果无法使用 DNS 解析域名,则会发生称为 NXDOMAIN 的情况。例如,使用不存在的 nslookup名称进行调用可能会返回 的错误 Host whatever.com not found: 3(NXDOMAIN)

可能导致此问题的一种情况是,当 DNS 记录在主权威名称服务器上更新时,可能需要一些时间才能传播到全球的递归 DNS 服务器,而这取决于 DNS 记录的生存时间 (TTL)。

另一种情况可能是您尝试访问的服务器已离线。

就您的情况而言,我认为 NXDOMAIN 错误是症状,而不是导致您失去与域的连接的原因。这种情况会随着时间的推移自行解决,这一事实进一步证实了它与您的 DNS 设置有关的理论。也许清除计算机和浏览器上的 DNS 缓存可能会有所帮助。

您可能会在 http://cachecheck.opendns.com 输入不存在的域名时。此工具可能有助于分析问题。

在此处输入图片描述

答案2

我也遇到过上述问题,但我已经找到了解决方案并修复了

解决方案:

sudo 取消链接 /etc/resolv.conf

sudo ln -s /run/systemd/resolve/resolv.conf /etc/resolv.conf

sudo systemctl 重启 systemd-resolved

sudo systemctl status systemd-resolved

答案3

这可能是一个错误systemd-已解决和/或 securelogin.arubanetworks.com DNS 欺骗/捕获和/或两者。

从数据包捕获来看,将 EDNS0 DO(DNSSEC OK)位设置为零的 DNS 查询会得到 NXDOMAIN 的响应。

最初这是 Ubuntu 错误跟踪器上的报告错误 #1727237 “systemd-resolved 未找到域”:错误:systemd 包:Ubuntu

请执行下列操作:

$ sudo rm /etc/resolv.conf
$ sudo ln -s /run/resolvconf/resolv.conf /etc/resolv.conf
$ sudo systemctl restart resolvconf

参考:Ubuntu 18.04 systemd 解析错误 NXDOMAIN - 咨询 Ubuntu

答案4

我也遇到过这种情况。我通过编辑/etc/rsyslog.d/01-blocklist.conf并添加以下行来隐藏该消息:

:msg,contains,"DVE-2018-0001" ~

相关内容