Azure DNS 疑难解答指南Azure DNS troubleshooting guide

此文介绍有关 Azure DNS 常见问题的疑难解答信息。This article provides troubleshooting information for common Azure DNS questions.

无法创建 DNS 区域I can't create a DNS zone

若要解决常见问题,请尝试下面的一个或多个步骤:To resolve common issues, try one or more of the following steps:

  1. 查看 Azure DNS 审核日志以确定失败原因。Review the Azure DNS audit logs to determine the failure reason.
  2. 每个 DNS 区域名称在其资源组中必须唯一。Each DNS zone name must be unique within its resource group. 即,一个资源组中不能具有名称相同的两个 DNS 区域。That is, two DNS zones with the same name can't share a resource group. 请尝试使用不同的区域名称,或采用不同的资源组。Try using a different zone name, or a different resource group.
  3. 可能会显示一个错误“已达到或超过订阅 {订阅 id} 中的区域的最大数量。”You may see an error "You have reached or exceeded the maximum number of zones in subscription {subscription id}." 请使用其他 Azure 订阅,删除一些区域,或者联系 Azure 支持部门以提高订阅限制。Either use a different Azure subscription, delete some zones, or contact Azure Support to raise your subscription limit.
  4. 可能会显示一个错误“区域‘{区域名称}’不可用。”You may see an error "The zone '{zone name}' is not available." 此错误意味着 Azure DNS 无法为此 DNS 区域分配名称服务器。This error means that Azure DNS was unable to allocate name servers for this DNS zone. 请尝试使用不同的区域名称。Try using a different zone name. 或者,如果是该域名的所有者,可联系 Azure 支持部门分配名称服务器。Or, if you are the domain name owner you can contact Azure support to allocate name servers for you.

无法创建 DNS 记录I can't create a DNS record

若要解决常见问题,请尝试下面的一个或多个步骤:To resolve common issues, try one or more of the following steps:

  1. 查看 Azure DNS 审核日志以确定失败原因。Review the Azure DNS audit logs to determine the failure reason.
  2. 该记录集是否已存在?Does the record set exist already? Azure DNS 使用记录集 管理记录,记录集是具有相同名称和类型的记录的集合。Azure DNS manages records using record sets, which are the collection of records of the same name and the same type. 如果已存在名称和类型相同的记录,那么在添加另一此类记录时,应编辑现有记录集。If a record with the same name and type already exists, then to add another such record you should edit the existing record set.
  3. 希望在 DNS 区域顶点处(该区域的“根”)尝试创建记录?Are you trying to create a record at the DNS zone apex (the ‘root’ of the zone)? 如果是这样,DNS 约定会使用“@”字符作为记录名称。If so, the DNS convention is to use the ‘@’ character as the record name. 另请注意,DNS 标准不允许在区域顶点创建 CNAME 记录。Also note that the DNS standards don't permit CNAME records at the zone apex.
  4. 是否存在 CNAME 冲突?Do you have a CNAME conflict? DNS 标准不允许创建与其他类型记录的名称相同的 CNAME 记录。The DNS standards don't allow a CNAME record with the same name as a record of any other type. 如果已存在 CNAME 记录,则无法创建具有相同名称的其他类型的记录。If you have an existing CNAME, creating a record with the same name of a different type fails. 同样,如果创建的 CNAME 记录与现有其他类型记录的名称相匹配,则无法创建 CNAME 记录。Likewise, creating a CNAME fails if the name matches an existing record of a different type. 可通过删除另一条记录或选用不同的记录名称来解决此冲突。Remove the conflict by removing the other record or choosing a different record name.
  5. 是否已达到 DNS 区域中允许的记录集数量上限?Have you reached the limit on the number of record sets permitted in a DNS zone? 在 Azure 门户中此区域的“属性”下,显示有当前记录集数和最大记录集数。The current number of record sets and the maximum number of record sets are shown in the Azure portal, under the 'Properties' for the zone. 如果已达此限制,则可删除一些记录集或联系 Azure 支持来提高此区域的记录集上限,并重试。If you've reached this limit, then either delete some record sets or contact Azure Support to raise your record set limit for this zone, then try again.

无法解析 DNS 记录I can't resolve my DNS record

DNS 名称解析是一个多步骤过程,该过程失败存在多种原因。DNS name resolution is a multi-step process, which can fail for many reasons. 以下步骤有助于调查为何无法在 Azure DNS 托管的区域对 DNS 记录进行 DNS 解析。The following steps help you investigate why DNS resolution is failing for a DNS record in a zone hosted in Azure DNS.

  1. 确保已在 Azure DNS 中正确配置 DNS 记录。Confirm that the DNS records have been configured correctly in Azure DNS. 在 Azure 门户中查看 DNS 记录,检查区域名称、记录名称和记录类型是否正确。Review the DNS records in the Azure portal, checking that the zone name, record name, and record type are correct.
  2. 确保可在 Azure DNS 名称服务器上正确解析 DNS 记录。Confirm that the DNS records resolve correctly on the Azure DNS name servers.
    • 如果从本地电脑查询 DNS,可能会发现缓存结果未反映名称服务器当前的状态。If you make DNS queries from your local PC, you may see cached results that don’t reflect the current state of the name servers. 此外,企业网络通常使用 DNS 代理服务器,这些服务器会阻止 DNS 查询定向到特定名称服务器。Also, corporate networks often use DNS proxy servers, which prevent DNS queries from being directed to specific name servers. 若要避免这些问题,请使用基于 Web 的名称解析服务,例如 digwebinterfaceTo avoid these problems, use a web-based name resolution service such as digwebinterface.
    • 请务必为 DNS 区域指定正确的名称服务器,如 Azure 门户中所示。Be sure to specify the correct name servers for your DNS zone, as shown in the Azure portal.
    • 检查 DNS 名称是否正确(必须指定完全限定的名称,包括区域名称),以及记录类型是否正确Check that the DNS name is correct (you have to specify the fully qualified name, including the zone name) and the record type is correct
  3. 确保 DNS 域名已正确委托给 Azure DNS 名称服务器Confirm that the DNS domain name has been correctly delegated to the Azure DNS name servers. 存在许多提供 DNS 委托验证的第三方网站There are a many 3rd-party web sites that offer DNS delegation validation. 这是区域 委派测试,因此应只输入 DNS 区域名称,而不是完全限定的记录名称。This test is a zone delegation test, so you should only enter the DNS zone name and not the fully qualified record name.
  4. 完成上述步骤后,现在应可以正确解析 DNS 记录。Having completed the above, your DNS record should now resolve correctly. 若要进行验证,可再次使用 digwebinterface,这次请使用默认名称服务器设置。To verify, you can again use digwebinterface, this time using the default name server settings.

如何为 SRV 记录指定“服务”和“协议”?How do I specify the ‘service’ and ‘protocol’ for an SRV record?

Azure DNS 以记录集方式管理记录,记录集是具有相同名称和类型的记录的集合。Azure DNS manages DNS records as record sets—the collection of records with the same name and the same type. 对于 SRV 记录集,需将“服务”和“协议”指定为记录集名称的一部分。For an SRV record set, the 'service' and 'protocol' need to be specified as part of the record set name. 对于记录集中的每条记录,需单独指定其他 SRV 参数(“priority”、“weight”、“port”和“target”)。The other SRV parameters ('priority', 'weight', 'port' and 'target') are specified separately for each record in the record set.

示例 SRV 记录名称 (service name 'sip', protocol 'tcp'):Example SRV record names (service name 'sip', protocol 'tcp'):

  • _sip._tcp(在区域顶点创建一个记录集)_sip._tcp (creates a record set at the zone apex)
  • _sip._tcp.sipservice(创建名为“sipservice”的记录集)_sip._tcp.sipservice (creates a record set named 'sipservice')

后续步骤Next steps