简体   繁体   English

如何解决 AWS Route 53 中的错误 - 导入区域文件错误:多个不同的 TTL 值?

[英]How to resolve error in AWS Route 53 - import zone file error : Multiple Distinct TTL values?

I am trying to import a zone file from Linode in to Amazon Route 53and I get the following error我正在尝试将区域文件从 Linode 导入到 Amazon Route 53,但出现以下错误

Error parsing zone file: One resource cannot have multiple distinct TTL values

I know what it is trying to say, but I cannot find any where in the file the TTL values which are duplicates.我知道它想说什么,但我无法在文件中的任何地方找到重复的 TTL 值。 Any hint is appreciated.任何提示表示赞赏。

Thanks.谢谢。

I was getting the same error importing a zone file from DNSimple into Route 53. My problem was that I had multiple TXT records for the same domain, and those TXT records had different TTL values.我在将区域文件从 DNSimple 导入 Route 53 时遇到了同样的错误。我的问题是同一域有多个 TXT 记录,而这些 TXT 记录具有不同的 TTL 值。 In Route 53, records of the same type (TXT, MX, CNAME, etc) for the same domain or subdomain get grouped together in a "record set" with one TTL value, so my zone file was breaking it.在 Route 53 中,相同域或子域的相同类型(TXT、MX、CNAME 等)的记录被组合在一个“记录集”中,具有一个 TTL 值,因此我的区域文件破坏了它。 As soon as I changed them all to the same TTL, the zone file could be imported.一旦我将它们全部更改为相同的 TTL,就可以导入区域文件。

I went through the zone file by eliminating sections and trying to import it.我通过删除部分并尝试导入它来浏览区域文件。 Finally figured out the section that was giving me the grief.终于弄清楚了让我悲伤的部分。 The MX records shown below are exactly as imported from Linode.下面显示的 MX 记录与从 Linode 导入的完全一样。

@       3600    MX  1   ASPMX.L.GOOGLE.COM.
@       3600    MX  5   ALT1.ASPMX.L.GOOGLE.COM.
@           MX  5   ALT2.ASPMX.L.GOOGLE.COM.
@           MX  10  ASPMX2.GOOGLEMAIL.COM.
@           MX  10  ASPMX3.GOOGLEMAIL.COM.

If I remove 3600 from the first two lines, I was able to import the file.如果我从前两行中删除 3600,我就能够导入该文件。 Not sure why Linode gives out this file.不知道为什么 Linode 会给出这个文件。 So MX records now look like this when I import them.因此,当我导入 MX 记录时,它们现在看起来像这样。

@           MX  1   ASPMX.L.GOOGLE.COM.
@           MX  5   ALT1.ASPMX.L.GOOGLE.COM.
@           MX  5   ALT2.ASPMX.L.GOOGLE.COM.
@           MX  10  ASPMX2.GOOGLEMAIL.COM.
@           MX  10  ASPMX3.GOOGLEMAIL.COM.

I had follwed step by step guide from http://blog.domenech.org/2014/12/how-to-transfer-your-dns-configuration-to-aws-route-53.html .我已经按照http://blog.domenech.org/2014/12/how-to-transfer-your-dns-configuration-to-aws-route-53.html中的分步指南进行操作。

The guideance did perfectly well.该指南做得非常好。 The point to be noted is that I need to udpate TTL value for each entry with one number so that, Route53 can group some value to a single entry, for me it was txt record for spf .需要注意的一点是,我需要用一个数字为每个条目更新 TTL 值,这样Route53就可以将一些值分组到一个条目中,对我来说它是spftxt 记录

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM