For system, network and cloud administrators
This can happen after a fresh installation of CentOS. The /etc/resolv.conf is looking for a DNS that it can use but after a fresh installation, it usually comes empty. So, if the file has no DNS to look after, then it can not resolve hostnames. This should tell you that the current machine is using the wrong DNS server.