Centos can ping IP, but cannot ping domains

I have 3 servers with DO(AMS3). Suddenly, three servers at the same time faced the same issue. It seems the servers cannot connect to the outside world. I tried to ping different IP addresses and domains. Here is the result:

ping 8.8.8.8
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
64 bytes from 8.8.8.8: icmpseq=1 ttl=60 time=2.11 ms
64 bytes from 8.8.8.8: icmp
seq=2 ttl=60 time=0.946 ms
64 bytes from 8.8.8.8: icmp_seq=3 ttl=60 time=0.724 ms

ping google.com
ping: google.com: Name or service not known

I searched the DO community. There were suggestions that the file “/etc/resolv.conf” might have issues. Here is my “/etc/resolv.conf” file:

cat /etc/resolv.conf
; Created by cloud-init on instance boot automatically, do not edit.
nameserver 8.8.8.8
nameserver 8.8.4.4

Any help is appreciated.

Read more here: Source link