I have a bunch of amazon ec2 instances. Today, for no reason I can determine, three of them became unable to resolve a specific url. When I try curl <url>
, those three instances say "curl: (6) Could not resolve host", while all the other instances are able to resolve the url and return the correct data. It's only that specific url, as well - all other urls work fine.
What could have caused this? I haven't changed anything on any of the instances, so it's not something I did. How do I find out why it happened?
If you’re not using the default VPC, or a VPC created by the VPC wizard, you’ll need to make sure that the
DNS hostname
andDNS resolution
options are enabled.this answer will probably solve your issue, as it did mine. you must fix your hosts file to
or
where my-machine is the host name that appears at the end of the error message.
(e.g. mine was
domX-A2-33-D9-CB-F4-A8
)don't forget to reboot your instance from your management console after you have changed the hosts file. ;)
I have encountered the same issue. This might be the reason of the issue .Disk space full so
/etc/resolve.conf
file gets cleared then Its unable to resolved the hostThis solution works for me.
Clean the fulled spaces
Update the
resolve.conf
from the working ec2 instance of same vpcCheck and compare
/etc/resolv.conf
(for Linux instances) between working and non-working hosts. here is info from my Linux instance:In case of Windows instances, check and compare the output of
ipconfig /all
command for DNS entries between working and non-working hosts. here is info from my windows instance:Here is my checklist of things to verify. Are you 100% sure nobody / nothing changed the following:
Seb