Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
646 views
in Technique[技术] by (71.8m points)

amazon web services - EC2 instance created with my own AMI with size up to T2.large missing DNS entries

I am having an issue in AWS since last few days. I've built two EC2 instances using my custom AMI one with T2.large and other with T3.medium.

I can ssh to both instances but I can't ping google or any other URL from T2 instance where as it works in T3 isntance.

both instances are on same VPC, subnet, SG and and built using same AMI.

T2 Insatance:
$ cat /etc/resolv.conf
# Generated by NetworkManager
search eu-west-2.compute.internal

[centos@ip-172-31-40-142 ~]$ curl google.com
curl: (6) Could not resolve host: google.com; Unknown error

T3 Instance:
[centos@ip-172-31-21-112 ~]$ cat /etc/resolv.conf
# Generated by NetworkManager
search eu-west-2.compute.internal
nameserver 172.31.0.2

> [centos@ip-172-31-21-112 ~]$ curl google.com <HTML><HEAD><meta
> http-equiv="content-type" content="text/html;charset=utf-8">
> <TITLE>301 Moved</TITLE></HEAD><BODY> <H1>301 Moved</H1> The document
> has moved <A HREF="http://www.google.com/">here</A>. </BODY></HTML>

I've built a third instance with another AMI and T2 size and it works as normal. The only major difference I can see is cloud-init. New AMI has cloud-init 19.4 and old AMI has 18.5

Thanks,

question from:https://stackoverflow.com/questions/65910131/ec2-instance-created-with-my-own-ami-with-size-up-to-t2-large-missing-dns-entrie

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...