调试 DNS 问题
我遇到了 DNS 问题,至少有几个客户根本无法访问我们的网站,chrome 只是报告“此网页不可用”(通过 http 或 https),但 DNS 和网络配置不是我的强项。
http://www.downforeveryoneorjustme.com/ 说它已经启动了,我知道它对我们的一些人有效客户,因为我有显示他们登录的分析,但我担心这个问题有多普遍。
我的所有 DNS 设置/CNAME/SSL 内容已经到位几周了,所以我认为这不应该是 DNS 传播问题。
如何在无法访问受影响的机器/网络的情况下调试此问题? 我很乐意要求我的客户运行一些 shell 命令并向我发送结果(但我显然不这样做)不想太麻烦他们)但我不确定哪些命令最有用。
更新 针对下面@lenary的回答,chrome中的具体错误是:
Error 105 (net::ERR_NAME_NOT_RESOLVED)
I am having a DNS issue with at least a couple of customers being unable to hit our website at all with chrome just reporting "This webpage is not available" (both over http or https), but DNS and network config is not my strong suit.
http://www.downforeveryoneorjustme.com/ says that it's up, and I know it works for some of our customers as I have the analytics that shows them logging in, but I am worried about how widespread the issue is.
All my DNS settings/CNAMEs/SSL stuff have been in place for a few weeks now, so I don't think it should be a DNS propagation issue.
How do I go about debugging this issue without access to the machines/networks that are affected? I am happy to ask my customers to run a few shell commands and send me the results (but I obviously don't want to hassle them too much) but I am not sure which commands would be the most useful.
Update
In response to @lenary's answer below, the specific error in chrome is:
Error 105 (net::ERR_NAME_NOT_RESOLVED)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
那么,首先,如何使用
host
。这是一个与调试 DNS 的工具一样好的工具,只是它的输出比dig
更容易阅读和理解(两者可以完成相同的工作)。要查询您的 dns 记录在您的端是什么样子,请执行以下操作(以 lenary.co.uk 为例):
这可以帮助调试内容。如果您在 www 子域上使用 CNAME,它会告诉您它的别名。 “有地址”仅意味着它是 A 记录。
这是第一步。如果它对您有用,请立即检查世界各地的一些主要 DNS 服务器(您可能需要研究它们的 IP/主机名)。
要检查特定服务器,请执行以下操作(我选择 8.8.8.8,由 google 运行的 dns 服务器)。我还使用
-t
指定了我要查找的记录类型,因此输出不那么冗长。您可能希望主域使用 A,而子域(例如“www”)则使用 CNAME。这应该允许您检查足够的服务器以验证信息是否正确。
So, first off, how to use
host
. This is as good a tool as any for debugging DNS, only its output is much easier to read and understand thandig
(both can do the same job).To query what your dns records look like at your end, do the following (with lenary.co.uk as an example):
This can help debug stuff. If you use a CNAME on the www subdomain it will tell you where it's aliased to. "has address" just means it's an A record.
That's the first step. If it's working for you, now check a few major DNS servers around the world (you may have to research IPs/hostnames for them).
To check at a specific server, do the following (I chose 8.8.8.8, a dns server run by google). I also specified the type of record i was looking for using
-t <type>
so the output is less verbose. You probably want A for your main domain and CNAME for subdomains like "www".That should allow you to check against enough servers to verify the information is correct.
可能还值得检查一下他们到底遇到了什么错误。 “此网页不可用”似乎是 Chrome 可能遇到的相当多(至少 4 个)网络错误的错误消息,其中只有 1 个与 DNS 相关。
也许可以将人们指向这里:http:// www.google.com/support/chrome/bin/answer.py?hl=en-GB&answer=117805 或尝试进一步诊断,包括错误号/常量(常量是指类似
net::ERR_FAILED
。It might also be worth checking exactly what error they get. "This webpage is not available" seems to be the error message for quite a few (at least 4) networking errors that chrome might encounter, of which only 1 relates to DNS.
Maybe point people here: http://www.google.com/support/chrome/bin/answer.py?hl=en-GB&answer=117805 or try and get further diagnosis including an error number/constant (by constant i mean something like
net::ERR_FAILED
.如果您安装了
dig
(在 Linux 和 OS X 机器上很常见),您需要首先检查您域的 A 记录的 IP 地址:如果您想强制通过您的名称服务器进行查询,请添加一个
@
标志:If you have
dig
installed (common on linux and OS X boxes) you'd want to first check the IP addresses for your domain's A records:If you want to force the query through your name server, add an
@
flag: