Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ping: google.com: Temporary failure in name resolution [closed]

ping: google.com: Temporary failure in name resolution 

This problem is what's happing when trying to ping a domain instead of a IP, at this moment in the resolve.conf it has the 127.0.0.57 IP, tried adding this

nameserver 8.8.8.8 

and it fixed the problem on the short term, im going to be running a daemon that need to contact my domain control panel. so I need a long term solution. If anyone has a solution to this issue it could be awesome.

like image 355
Nicolai Jacobsen Avatar asked Dec 08 '18 21:12

Nicolai Jacobsen


People also ask

What is name resolution failure?

This is usually a name resolution error and shows that your DNS server cannot resolve the domain names into their respective IP addresses. This can present a grave challenge as you will not be able to update, upgrade, or even install any software packages on your Linux system.

Can Digital Domain name resolution failed?

Every server needs IP of DNS servers to which they can send their DNS queries. So if IPs of DNS servers are not configured then your server doesn't know how to resolve domain names to IP Address thus you will end up getting temporary failure in name resolution.


1 Answers

I've faced the exactly same problem but I've fixed it with another approache.

Using Ubuntu 18.04, first disable systemd-resolved service.

sudo systemctl disable systemd-resolved.service

Stop the service

sudo systemctl stop systemd-resolved.service

Then, remove the link to /run/systemd/resolve/stub-resolv.conf in /etc/resolv.conf

sudo rm /etc/resolv.conf

Add a manually created resolv.conf in /etc/

sudo vim /etc/resolv.conf

Add your prefered DNS server there

nameserver 208.67.222.222

I've tested this with success.

like image 53
André M. Faria Avatar answered Sep 22 '22 04:09

André M. Faria