调试 DNS 问题

发布于 2024-11-26 23:27:59 字数 559 浏览 0 评论 0原文

我遇到了 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

东京女 2024-12-03 23:27:59

那么,首先,如何使用host。这是一个与调试 DNS 的工具一样好的工具,只是它的输出比 dig 更容易阅读和理解(两者可以完成相同的工作)。

要查询您的 dns 记录在您的端是什么样子,请执行以下操作(以 lenary.co.uk 为例):

$ host lenary.co.uk
lenary.co.uk has address 207.97.227.245
lenary.co.uk mail is handled by 20 ASPMX4.GOOGLEMAIL.COM.
lenary.co.uk mail is handled by 20 ASPMX5.GOOGLEMAIL.COM.
lenary.co.uk mail is handled by 0 aspmx.l.google.COM.
lenary.co.uk mail is handled by 10 ALT1.aspmx.l.google.COM.
lenary.co.uk mail is handled by 10 ALT2.aspmx.l.google.COM.
lenary.co.uk mail is handled by 20 ASPMX2.GOOGLEMAIL.COM.
lenary.co.uk mail is handled by 20 ASPMX3.GOOGLEMAIL.COM.

这可以帮助调试内容。如果您在 www 子域上使用 CNAME,它会告诉您它的别名。 “有地址”仅意味着它是 A 记录。

这是第一步。如果它对您有用,请立即检查世界各地的一些主要 DNS 服务器(您可能需要研究它们的 IP/主机名)。

要检查特定服务器,请执行以下操作(我选择 8.8.8.8,由 google 运行的 dns 服务器)。我还使用 -t 指定了我要查找的记录类型,因此输出不那么冗长。您可能希望主域使用 A,而子域(例如“www”)则使用 CNAME。

$ host -t A lenary.co.uk 8.8.8.8
Using domain server:
Name: 8.8.8.8
Address: 8.8.8.8#53
Aliases: 

lenary.co.uk has address 207.97.227.245

这应该允许您检查足够的服务器以验证信息是否正确。

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 than dig (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):

$ host lenary.co.uk
lenary.co.uk has address 207.97.227.245
lenary.co.uk mail is handled by 20 ASPMX4.GOOGLEMAIL.COM.
lenary.co.uk mail is handled by 20 ASPMX5.GOOGLEMAIL.COM.
lenary.co.uk mail is handled by 0 aspmx.l.google.COM.
lenary.co.uk mail is handled by 10 ALT1.aspmx.l.google.COM.
lenary.co.uk mail is handled by 10 ALT2.aspmx.l.google.COM.
lenary.co.uk mail is handled by 20 ASPMX2.GOOGLEMAIL.COM.
lenary.co.uk mail is handled by 20 ASPMX3.GOOGLEMAIL.COM.

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".

$ host -t A lenary.co.uk 8.8.8.8
Using domain server:
Name: 8.8.8.8
Address: 8.8.8.8#53
Aliases: 

lenary.co.uk has address 207.97.227.245

That should allow you to check against enough servers to verify the information is correct.

青衫负雪 2024-12-03 23:27:59

可能还值得检查一下他们到底遇到了什么错误。 “此网页不可用”似乎是 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.

傾旎 2024-12-03 23:27:59

如果您安装了 dig(在 Linux 和 OS X 机器上很常见),您需要首先检查您域的 A 记录的 IP 地址:

dig A yourdomain.com +noall +answer

如果您想强制通过您的名称服务器进行查询,请添加一个 @ 标志:

dig @your.ns.ip yourdomain.com +noall +answer

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:

dig A yourdomain.com +noall +answer

If you want to force the query through your name server, add an @ flag:

dig @your.ns.ip yourdomain.com +noall +answer
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文