Chris Dzombak

sharing preview • dzombak.com

Pi Reliability over WiFi: 'Temporary failure in name resolution'

Pi Reliability over WiFi: 'Temporary failure in name resolution'

Part of the Raspberry Pi Reliability series.

One Pi I run here at home sits in an outbuilding with less-than-ideal WiFi signal strength. It runs PiAware 1 and BirdNET-Pi, and I specifically haven’t run Ethernet to it to partially mitigate lightning-strike risks, given that it has two exposed antennas at roof level.

This means, unfortunately, that occasionally it has transient network connectivity problems. For some reason (which I haven’t bothered to track down), when this happened I would get emails from several different services like the following:

To: root@surroundings.dzhome
From: piaware@surroundings.dzhome
Subject: *** SECURITY information for surroundings.dzhome ***

surroundings.dzhome : Mar 24 01:01:45 : piaware : unable to resolve host surroundings.dzhome: Temporary failure in name resolution

Rather than figuring out why I am getting those emails (why is this SECURITY information???), I made a quick hack that seems to have fixed the problem, allowing this Pi to resolve its own name even when its WiFi connection is down.

/etc/hosts on this machine looked like this:

127.0.0.1       localhost
::1             localhost ip6-localhost ip6-loopback
ff02::1         ip6-allnodes
ff02::2         ip6-allrouters

127.0.1.1       surroundings

You can guess the hack I chose now, I’m sure. I just edited that last line to read:

127.0.1.1       surroundings surroundings.dzhome

As a side note, I’ve been setting up machines on my LAN with both “pretty” and “static” hostnames. I’m not entirely sure how “correct” this is, but it seems to be working nicely for me so far:

$ hostnamectl
 Static hostname: surroundings.dzhome
 Pretty hostname: surroundings

(Also, yes I know that I shouldn’t be using .dzhome for things on my home network, but it’s a convenient way to have names that are definitely-independent from Tailscale, and I started naming things like that a long time ago, and it would take time and effort to move to .lan even though I definitely want to do that one day, and anyway my local DNS servers know not to leak it.)

  1. Alongside feeders for Plane Finder and FlightRadar24, tar1090, and graphs1090