Route 53 alias record not working?

▼魔方 西西 提交于 2021-02-10 05:13:33

问题


I previously had a website working on AWS. It was created & registered with AWS. It was setup in the hosted zone and point to an EC2 instance. Everything was working fine.

I got "smart" and created a load balancer, which pointed to the EC2 instance, and then I deleted the previous hosted zone record (and associated recordset) and re-added the hosted zone record which would point to the load balancer.

After much googling I determined I needed to add an "A" record, make it an alias and point it to the load balancer. All good so far.

Then I went to access the website in browser and Im getting ERR_NAME_NOT_RESOLVED. I waited hours for DNS servers to update and still no luck. Flushed DNS cache and no luck.

Ive changed multiple other things - tried www in front of name in recordset, tried a ptr record which pointed to load balancer DNS name, and even tried to sync the dns server names between the domain record and the hosted zone record. Still no luck. Same error.

Ive performed "nslookup debug" and honestly dont know what Im looking at.

C:\Users\sam>nslookup -debug abc.com

Got answer: HEADER: opcode = QUERY, id = 1, rcode = NOERROR header flags: response, auth. answer, want recursion, recursion avail. questions = 1, answers = 1, authority records = 0, additional = 0

QUESTIONS:
    1.1.168.192.in-addr.arpa, type = PTR, class = IN
ANSWERS:
->  1.1.168.192.in-addr.arpa
    name = xyz
    ttl = 0 (0 secs)

Server: xyz Address: 192.168.1.1


Got answer: HEADER: opcode = QUERY, id = 2, rcode = SERVFAIL header flags: response, want recursion, recursion avail. questions = 1, answers = 0, authority records = 0, additional = 0

QUESTIONS:
    abc.com, type = A, class = IN

------------

Got answer: HEADER: opcode = QUERY, id = 3, rcode = SERVFAIL header flags: response, want recursion, recursion avail. questions = 1, answers = 0, authority records = 0, additional = 0

QUESTIONS:
    abc.com, type = AAAA, class = IN

------------

Got answer: HEADER: opcode = QUERY, id = 4, rcode = SERVFAIL header flags: response, want recursion, recursion avail. questions = 1, answers = 0, authority records = 0, additional = 0

QUESTIONS:
    abc.com, type = A, class = IN

------------

Got answer: HEADER: opcode = QUERY, id = 5, rcode = SERVFAIL header flags: response, want recursion, recursion avail. questions = 1, answers = 0, authority records = 0, additional = 0

QUESTIONS:
    abc.com, type = AAAA, class = IN

*** xyzcan't find abc.com: Server failed

Im sure its something dumb. But Ive spent too much time on this and cant think anymore.

What did I do wrong?

Thanks for your help.


回答1:


even tried to sync the dns server names between the domain record and the hosted zone record.

If that was necessary, then it sounds like at some point you deleted and recreated the hosted zone... which does not work the way you may have anticipated.

The simplest way out of that, is this:

Leaving the existing zone exactly as it is, create a new hosted zone with the same domain. (Yes, this works).

Note the four name servers assigned for the new hosted zone.

Go to the domain record (the registrar component of Route 53, not the hosted zone component) and change the 4 name servers to match those assigned to your new hosted zone.

In the new hosted zone, create a new A record, hostname box empty, Alias = Yes, and select the ELB name.

Once it's working, delete the old hosted zone.



来源:https://stackoverflow.com/questions/31130362/route-53-alias-record-not-working

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!