Expected /etc/resolv.conf to point to the IP address of the RPi on which Pi-hole is running, since I am using Pi-hole for DNS.
Actual Behaviour:
The /etc/resolv.conf now points to my router 192.168.2.1, which gives me "Temporary failure unresolving..." errors. If I manually edit /etc/resolv.conf to correct it to 192.168.2.251, things work again until I need to reboot, after which the problematic state returns.
Pi-hole no longer changes the nameserver assigned to the Pi (in /etc/resolv.conf). The existing nameserver settings for the Pi-hole host are respected and unchanged.
Setting 127.0.0.1 was causing headaches for many users when trying to upgrade or download something on the Pi-hole machine in absence of Pi-hole (i.e. when shutdown, crashed, intentionally stopped or failed on an upgrade).
It is not necessary to interfere with resolv.conf for correct operation of Pi-hole, since only incoming DNS requests originating from the local machine will use a nameserver provided with it.
Pi-hole will work flawflessly without setting such an entry.
In your case, you have configured 127.0.0.1 as one of your three DNS servers as Pi-hole's upstream, which will enforce using the DNS server defined in resolv.conf.
You should be able to get back to normal by simply removing that 127.0.0.1 entry from Upstream DNS Servers in Pi-hole's Settings | DNS.
Thanks @Bucking_Horn for the welcome and your answer! Also, thanks to you and all those who have worked to make this excellent resource.
I understand your comments, and the new approach in 5.0 makes a lot of sense; however, I think the PIHOLE_DNS_3 setting was a red herring. I had actually added "127.0.0.1" today in an effort to fix the "Temporary failure in name resolution" situation. After again removing it, my problem remains.
So, I now need to rephrase my problem in the following way: Even with Pi-hole working flawlessly for clients on other nodes on my LAN, how do I get proper DNS functionality when I need it on the node on which Pi-hole is running? Specifically, I am getting "Temporary failure in name resolution" when for example trying "ping google.com" on the Pi-hole's node. Similarly, I get DNS failures when trying to maintain that node using "sudo apt update" etc.
My router currently is manually set up to point to 192.168.2.251, the node where Pi-hole is running. If I revert my router to set the DNS automatically, I can again get DNS queries to work on the node where Pi-hole is running. Is there a way to have such queries from the same Pi-hole node also use Pi-hole's DNS functionality in the same way that other nodes on the LAN can?
Thanks @jfb, here is the token: https://tricorder.pi-hole.net/txjphnsf28 To keep things operational, for the moment I have set my router to handle DNS queries sent to it automatically, so no longer redirecting to the node on which Pi-hole is running. Let me know if you'd like me to revert to the desired router configuration before generating the debug log.
Raspbian uses dhcpcd5 for IP addressing. Check /etc/dhcpcd.conf and see what nameservers are configured, or if you are using a DHCP lease to assign the Pi-hole's IP.
The Pi is using the router as the nameserver. If you do not want to have the router as the nameserver (and it appears you do not), and you want the Pi to use Pi-hole as the nameserver, then change this to 127.0.0.1
Thanks @jfb, that appears to have done the trick. As long as /etc/dhcpcd.conf remains unchanged, I should be good to go now. Appreciate the quick help, from you and the others!