pi@rpi-45:~ $ pihole checkout ftl master
sudo: unable to resolve host rpi-45: Name or service not known
Please note that changing branches severely alters your Pi-hole subsystems
Features that work on the master branch, may not on a development branch
This feature is NOT supported unless a Pi-hole developer explicitly asks!
Have you read and understood this? [y/N] y
[✓] Branch master exists
[i] Switching to branch: "master" from "master"
[✓] Downloading and Installing FTL
[✓] Restarting pihole-FTL service...
[✓] Enabling pihole-FTL service to start on reboot...
But still seems the same, so rebooted and no change unfortunately.
A bit more info, I have two piholes, same settings for reliance against failure. I changed the other one from development back master a few weeks ago and this same problem, but instead of asking for help I ended up removing and reinstalling p-hiole, this time I thought I'd see if it could be fixed without.
The last lines of pihole.log are indicating a regular shutdown:
*** [ DIAGNOSING ]: Pi-hole log
-rw-r--r-- 1 pihole pihole 282K Aug 9 10:32 /var/log/pihole.log
Aug 9 10:32:38 dnsmasq[867]: exiting on receipt of SIGTERM
The debug log also shows the pihole-FTL service didn't start:
*** [ DIAGNOSING ]: Pi-hole-FTL full status
● pihole-FTL.service - LSB: pihole-FTL daemon
Loaded: loaded (/etc/init.d/pihole-FTL; generated)
Active: active (exited) since Tue 2022-08-09 11:14:30 BST; 5min ago
Docs: man:systemd-sysv-generator(8)
Process: 26726 ExecStart=/etc/init.d/pihole-FTL start (code=exited, status=0/SUCCESS)
CPU: 108ms
Aug 09 11:14:30 rpi-45 systemd[1]: Starting LSB: pihole-FTL daemon...
Aug 09 11:14:30 rpi-45 pihole-FTL[26726]: Not running
Aug 09 11:14:30 rpi-45 su[26747]: (to pihole) root on none
Aug 09 11:14:30 rpi-45 su[26747]: pam_unix(su:session): session opened for user pihole(uid=999) by (uid=0)
Aug 09 11:14:30 rpi-45 su[26747]: pam_unix(su:session): session closed for user pihole
Aug 09 11:14:30 rpi-45 systemd[1]: Started LSB: pihole-FTL daemon.
If it did, there should be a line like
Aug 09 11:14:30 rpi-45 pihole-FTL[26726]: FTL started!
This would suggest that something is preventing pihole-FTL from not starting at all or stopping it very early, before it would even start logging messages.
I see no indication in your debug log that would allow for an explanation.
You could check for syntax errors in Pi-hole's dnsmasq configuration:
pihole-FTL dnsmasq-test
Also, I wonder what would be causing those rpi-45 complaints?
Are you seeing them any time you run a pihole command, e.g. with
pi@rpi-45:~ $ pihole-FTL dnsmasq-test
dnsmasq: syntax check OK.
pi@rpi-45:~ $ pihole version
Current Pi-hole version is v5.10
Current AdminLTE version is v5.12
Current FTL version is v5.16.1
pi@rpi-45:~ $ hostname
rpi-45
I'm not really familiar with that.
My guess would be it adds its own scripts, rather than altering Pi-hole's own ones.
That does neither confirm nor reject its involvement, however.
It's strange that we're seeing those complaints about your hostname when running some pihole commands.
What's the output of:
Glad it's working now.
What did bring it back to normal?
And to guard against future resolution failures on your PI-hole host:
Did you configure a static IP address on device?
If so:
Since you are running on RPi OS, consider adding a public nameserver to static domain_name_servers after 127.0.0.1 in your /etc/dhcpcd.conf.
This would allow your Pi-hole host to resolve DNS even when Pi-hole should be rendered inoperative for some reason.
I'm not sure what sure what brought it back to normal, I changed the nameservers to 8.8.8.8 and ran the pi-hole update as per your message a few mins back.
The update went ahead and completed and afterwards all the errors were gone.
I will follow your advice above.
Shall I change the nameservers back to 127.0.0.1 now to use unbound again?
The choice of nameserver used for the Pi-hole host device is separate and independent from the upstream DNS servers used by Pi-hole.
If you have Pi-hole configured to use unbound as upstream DNS server, that is what it will use.
The nameserver assignment on the Pi specifies which nameserver that specific device (not Pi-hole) will use. If you set it to 8.8.8.8, the device uses Google for DNS. If you set it to 127.0.0.1, that device will use Pi-hole for DNS, since Pi-hole is running on that device at the loopback address.
Also note that setting the device nameserver to 127.0.0.1 doesn't set that device to use unbound. Unbound is running on port 5335, not 53. The device will use Pi-hole for DNS, and Pi-hole in turn is using unbound for DNS. The device isn't using unbound directly.