0

I tried to update my home server today, but got an error

$ sudo dnf update
'couldn't resolve host name'

so I tried to ping anything in the internet, and for that I tried www.google.com, but it gives a 'System error' message,

$ ping www.google.com
System error

then tried an IP and works just fine. Googled for some info about the issue but only found 1 person with the same problem, and the problem was a file/link that was corrupt, but mine is just fine so I got stuck there. The server was working fine so I don't know what happened.

  • Have you configured a DNS server? If so, can you ping it? – Raman Sailopal Jan 24 '18 at 15:22
  • i didn't but in the /etc/resolv.conf there is the 208.67.222.222 and my local gateway, the first is unreachable, the second (gateway) works fine – FelBraSil Jan 24 '18 at 15:25
  • /etc/resolv.conf should contain the address of a DNS server that can translate web to IP addresses. Try adding 8.8.8.8 – Raman Sailopal Jan 24 '18 at 15:31
  • added it, restarted the server (reboot) just in case, but i get the same error, it does ping 8.8.8.8 this time, but the other problems remain – FelBraSil Jan 24 '18 at 15:44
  • Add 8.8.8.8 as the first IP address in the resolv.conf. Also try "dig @8.8.8.8 www.google.com" to prove that resolution through 8.8.8.8 works correctly. – Raman Sailopal Jan 24 '18 at 15:52
1

For some reason the default DNS wasn't working fine, changed it to 8.8.8.8 as Raman Sailopal suggested and did a reboot, but later i found out that the DNS was overwritten to the default DNS server, changed it again and now it works fine

  • You should invest time to make your DNS work correctly instead of just blindly putting 8.8.8.8 – Patrick Mevzek Jan 26 '18 at 5:11
  • i should, but sadly i don't have the time by now and i need to solve this quickly, i plan to check what went wrong, maybe my router is the problem since the DNS server is an OpenDNS server as far as i know and it's set up automatically by the system. Also i know that 8.8.8.8 is a google DNS server so its not just 'blindly' putting it, but i get what you are trying to point out, it's not 100% solved – FelBraSil Jan 26 '18 at 16:39
  • 1
    And you are feeding your data to Google... Try 9.9.9.9 for a change :-) But you are still sending your data to someone. When you have time and if you want to learn, install a local resolver. – Patrick Mevzek Jan 26 '18 at 16:41
  • good point, didn't see it that way ... thanks for the suggestion i'll totally try a local resolver as soon as i have the time, and also will try 9.9.9.9, i just read it has some nice features, thanks! – FelBraSil Jan 26 '18 at 16:46
  • 1
    As for resolv.conf being wiped out, see for example access.redhat.com/solutions/7412 or unix.stackexchange.com/a/128223/211833 or unix.stackexchange.com/questions/323446/… – Patrick Mevzek Jan 26 '18 at 16:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.