1

I have a Pi running a version of raspbian 64bit.

It works on my home network and my previous hotel network. However, different week, different hotel and my pi starts kicking up this error: Temporary failure in name resolution.

I boot, log in, ping google.com fine. Then I try to do something a little more stressful with the network and boom. Errors. Killing the app still doesn't allow me to ping out.

It is the same network as which my tablet is on (which I am using to write this). This seemingly doesn't get any errors - I can stream Netflix on it. Also using fing to perform a speed check is fine from my mobile.

Is there a checklist of things I can do to reinforce the connection to be more resilient?

Update: Would giving myself a fixed up address help? I see that I am usually assigned 10.0.1.33 so if I manually give myself that address what would I use for the internal router. I did a traceroute but that only returned external IP addresses. Is there a way of finding the router IP?

graham.reeds
  • 179
  • 1
  • 1
  • 7

3 Answers3

3

I don't know if the issue that I had is identical to your issue, but I was struggling with similar issues whenever a sudo call was made. I would get a message stating:

sudo: unable to resolve host *myhostname*. Temporary failure in name resolution

Turns out that even though I had changed the hostname of my device using raspi-config, the hosts file still had a reference to the old name raspberrypi.

I did the following:

sudo nano /etc/hosts

And looked for the line starting with 127.0.1.1 and changed this from rapberrypi to the correct hostname. After making this change my network connection was finally stable.

BruceHill
  • 141
  • 3
0

I had the same problem when I set up an static IP so I changed the DNS. I resolve adding to /etc/dhcpcd.conf the google dns. static domain_name_servers=8.8.8.8.

0

Try setting up your RPi to use Google DNS (8.8.8.8, see here) instead of whatever the network suggests.

Dmitry Grigoryev
  • 28,277
  • 6
  • 54
  • 147