Changed from development back to master branch and Error

The issue I am facing:

I was asked to switch to the Development branch in this thread...

https://discourse.pi-hole.net/t/an-hour-gap-in-activity-after-reboot/55576/5

Today I thought it was time to switch back to the Master branch so ran pihole checkout ftl master and now I have the error that DNS service not running...

This is from the 'Settings' tab

There was a problem applying your settings.
 Debugging information:
 PHP error (2): fsockopen(): unable to connect to 127.0.0.1:4711 (Connection refused) in /var/www/html/admin/scripts/pi-hole/php/FTL.php:43

I've generated a debug.log but the pi cannot connect to the internet up load.

I had a working system and ran pihole checkout ftl master and now its offline, unable to resolve any address. It was running 'unbound' before if that makes a difference?

Is there anymore info I can supply to help resolve? Can I upload the debug any other way?

What does Pi-hole report as status?

pihole status

This is the output

$ pihole status
  [✗] DNS service is NOT running
sudo: unable to resolve host rpi-45: Temporary failure in name resolution
  [✗] DNS service is NOT running

Does restarting Pi-hole's DNS server still execute?

pihole restartdns

Afterwards, check Pi-hole's and pihole-FTL service status once restarted:

sudo systemctl status --full --no-pager pihole-FTL.service

Also, what's the output of

cat /etc/resolv.conf
pi@rpi-45:~ $ pihole restartdns
sudo: unable to resolve host rpi-45: Temporary failure in name resolution
  [✓] Restarting DNS server
pi@rpi-45:~ $ sudo systemctl status --full --no-pager pihole-FTL.service
sudo: unable to resolve host rpi-45: Temporary failure in name resolution
● 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; 32s 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.
pi@rpi-45:~ $

pi@rpi-45:~ $ cat /etc/resolv.conf

Generated by resolvconf

domain local.lan
nameserver 127.0.0.1
pi@rpi-45:~ $

Ok, let's try to temporarily reset the nameserver to bypass your localhost Pi-Hole.

sudo nano /etc/resolv.conf

Edit the nameserver line to nameserver 9.9.9.9 or your preferred third party DNS service, save and exit.

Run

pihole -d

and upload the debug log.

Thank you...

Your debug token is: https://tricorder.pi-hole.net/g5bpCnDI/

The checkout to master does seem to have been only partially successful:

*** [ DIAGNOSING ]: Core version
[i] Core: v5.10 (https://discourse.pi-hole.net/t/how-do-i-update-pi-hole/249)
[i] Remotes: origin	https://github.com/pi-hole/pi-hole.git (fetch)
             origin	https://github.com/pi-hole/pi-hole.git (push)
[i] Branch: master
[i] Commit: v5.10-0-g853f6b7

*** [ DIAGNOSING ]: Web version
[i] Web: v5.12 (https://discourse.pi-hole.net/t/how-do-i-update-pi-hole/249)
[i] Remotes: origin	https://github.com/pi-hole/AdminLTE.git (fetch)
             origin	https://github.com/pi-hole/AdminLTE.git (push)
[i] Branch: master
[i] Commit: v5.12-0-g6c320a4

*** [ DIAGNOSING ]: FTL version
[✓] FTL: v5.16.1 (https://discourse.pi-hole.net/t/how-do-i-update-pi-hole/249)

Current versions should be v5.11.4, v5.13 and v5.16.1.

With that nameserver by-pass still in place, could you try to checkout master again?

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.

I do have gravity sync from here

https://github.com/vmstan/gravity-sync

Could that be an issue?

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

pihole version

I ran those commands and hostname..

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

Those versions are not the latest, should I try to update?

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:

sudo bash -x pihole checkout ftl master

I checked the 'hosts' file and rpi-45 had been changed to 'raspberrypi' I changed it back now

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



127.0.1.1 rpi-45

And it stops the complaint about host name

pi@rpi-45:~ $ pihole checkout ftl master
  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"
  [i] Downloading and Installing FTL...curl: (6) Could not resolve host: github.com
  [✗] Downloading and Installing FTL
  Error: URL https://github.com/pi-hole/ftl/releases/latest/download/pihole-FTL-armv7-linux-gnueabihf not found
pi@rpi-45:~ $ sudo bash -x pihole checkout ftl master
+ readonly PI_HOLE_SCRIPT_DIR=/opt/pihole
+ PI_HOLE_SCRIPT_DIR=/opt/pihole
+ setupVars=/etc/pihole/setupVars.conf
+ PI_HOLE_BIN_DIR=/usr/local/bin
+ readonly FTL_PID_FILE=/run/pihole-FTL.pid
+ FTL_PID_FILE=/run/pihole-FTL.pid
+ readonly colfile=/opt/pihole/COL_TABLE
+ colfile=/opt/pihole/COL_TABLE
+ source /opt/pihole/COL_TABLE
++ [[ -t 1 ]]
+++ tput colors
++ [[ 8 -ge 8 ]]
++ COL_BOLD=''
++ COL_ULINE=''
++ COL_NC=''
++ COL_GRAY=''
++ COL_RED=''
++ COL_GREEN=''
++ COL_YELLOW=''
++ COL_BLUE=''
++ COL_PURPLE=''
++ COL_CYAN=''
++ COL_WHITE=''
++ COL_BLACK=''
++ COL_LIGHT_BLUE=''
++ COL_LIGHT_GREEN=''
++ COL_LIGHT_CYAN=''
++ COL_LIGHT_RED=''
++ COL_URG_RED=''
++ COL_LIGHT_PURPLE=''
++ COL_BROWN=''
++ COL_LIGHT_GRAY=''
++ COL_DARK_GRAY=''
++ TICK='[✓]'
++ CROSS='[✗]'
++ INFO='[i]'
++ QST='[?]'
++ DONE=' done!'
++ OVER='\r'
+ utilsfile=/opt/pihole/utils.sh
+ source /opt/pihole/utils.sh
+ [[ 3 = 0 ]]
+ case "${1}" in
+ [[ ! 0 -eq 0 ]]
+ case "${1}" in
+ piholeCheckoutFunc checkout ftl master
+ [[ ftl == \-\h ]]
+ [[ ftl == \-\-\h\e\l\p ]]
+ source /opt/pihole/piholeCheckout.sh
++ readonly PI_HOLE_FILES_DIR=/etc/.pihole
++ PI_HOLE_FILES_DIR=/etc/.pihole
++ PH_TEST=true
++ source '/etc/.pihole/automated install/basic-install.sh'
+++ set -e
+++ export PATH+=:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
+++ PATH+=:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
++++ cat
+++ DNS_SERVERS='Google (ECS, DNSSEC);8.8.8.8;8.8.4.4;2001:4860:4860:0:0:0:0:8888;2001:4860:4860:0:0:0:0:8844
OpenDNS (ECS, DNSSEC);208.67.222.222;208.67.220.220;2620:119:35::35;2620:119:53::53
Level3;4.2.2.1;4.2.2.2;;
Comodo;8.26.56.26;8.20.247.20;;
DNS.WATCH (DNSSEC);84.200.69.80;84.200.70.40;2001:1608:10:25:0:0:1c04:b12f;2001:1608:10:25:0:0:9249:d69b
Quad9 (filtered, DNSSEC);9.9.9.9;149.112.112.112;2620:fe::fe;2620:fe::9
Quad9 (unfiltered, no DNSSEC);9.9.9.10;149.112.112.10;2620:fe::10;2620:fe::fe:10
Quad9 (filtered, ECS, DNSSEC);9.9.9.11;149.112.112.11;2620:fe::11;2620:fe::fe:11
Cloudflare (DNSSEC);1.1.1.1;1.0.0.1;2606:4700:4700::1111;2606:4700:4700::1001'
+++ installLogLoc=/etc/pihole/install.log
+++ setupVars=/etc/pihole/setupVars.conf
+++ lighttpdConfig=/etc/lighttpd/lighttpd.conf
+++ coltable=/opt/pihole/COL_TABLE
+++ webroot=/var/www/html
+++ webInterfaceGitUrl=https://github.com/pi-hole/AdminLTE.git
+++ webInterfaceDir=/var/www/html/admin
+++ piholeGitUrl=https://github.com/pi-hole/pi-hole.git
+++ PI_HOLE_LOCAL_REPO=/etc/.pihole
+++ PI_HOLE_FILES=(chronometer list piholeDebug piholeLogFlush setupLCD update version gravity uninstall webpage)
+++ PI_HOLE_INSTALL_DIR=/opt/pihole
+++ PI_HOLE_CONFIG_DIR=/etc/pihole
+++ PI_HOLE_BIN_DIR=/usr/local/bin
+++ PI_HOLE_BLOCKPAGE_DIR=/var/www/html/pihole
+++ '[' -z '' ']'
+++ useUpdateVars=false
+++ adlistFile=/etc/pihole/adlists.list
+++ IPV4_ADDRESS=
+++ IPV6_ADDRESS=
+++ QUERY_LOGGING=true
+++ INSTALL_WEB_INTERFACE=true
+++ PRIVACY_LEVEL=0
+++ CACHE_SIZE=10000
+++ '[' -z root ']'
+++ r=20
+++ c=70
+++ reconfigure=false
+++ runUnattended=false
+++ INSTALL_WEB_SERVER=true
+++ for var in "$@"
+++ case "$var" in
+++ for var in "$@"
+++ case "$var" in
+++ for var in "$@"
+++ case "$var" in
+++ [[ -f /opt/pihole/COL_TABLE ]]
+++ source /opt/pihole/COL_TABLE
++++ [[ -t 1 ]]
+++++ tput colors
++++ [[ 8 -ge 8 ]]
++++ COL_BOLD=''
++++ COL_ULINE=''
++++ COL_NC=''
++++ COL_GRAY=''
++++ COL_RED=''
++++ COL_GREEN=''
++++ COL_YELLOW=''
++++ COL_BLUE=''
++++ COL_PURPLE=''
++++ COL_CYAN=''
++++ COL_WHITE=''
++++ COL_BLACK=''
++++ COL_LIGHT_BLUE=''
++++ COL_LIGHT_GREEN=''
++++ COL_LIGHT_CYAN=''
++++ COL_LIGHT_RED=''
++++ COL_URG_RED=''
++++ COL_LIGHT_PURPLE=''
++++ COL_BROWN=''
++++ COL_LIGHT_GRAY=''
++++ COL_DARK_GRAY=''
++++ TICK='[✓]'
++++ CROSS='[✗]'
++++ INFO='[i]'
++++ QST='[?]'
++++ DONE=' done!'
++++ OVER='\r'
+++ [[ true != true ]]
++ source /etc/pihole/setupVars.conf
+++ WEBPASSWORD=3cb84ce4f264a56a682bc983a91097218912365948556a51a75955021289cd19
+++ BLOCKING_ENABLED=true
+++ ADMIN_EMAIL=
+++ WEBUIBOXEDLAYOUT=boxed
+++ WEBTHEME=default-darker
+++ DNSSEC=true
+++ REV_SERVER=true
+++ REV_SERVER_CIDR=192.168.1.0/24
+++ REV_SERVER_TARGET=192.168.1.1
+++ REV_SERVER_DOMAIN=local.lan
+++ PIHOLE_INTERFACE=eth0
+++ IPV4_ADDRESS=192.168.1.45/24
+++ IPV6_ADDRESS=2a00:23c5:d934:de00:dfd2:2918:bc16:5915
+++ QUERY_LOGGING=true
+++ INSTALL_WEB_SERVER=true
+++ INSTALL_WEB_INTERFACE=true
+++ LIGHTTPD_ENABLED=true
+++ CACHE_SIZE=10000
+++ DNS_FQDN_REQUIRED=true
+++ DNS_BOGUS_PRIV=true
+++ DNSMASQ_LISTENING=local
+++ PIHOLE_DNS_1=9.9.9.9
+++ PIHOLE_DNS_2=149.112.112.112
+ shift
+ checkout ftl master
+ local corebranches
+ local webbranches
+ local funcOutput
++ get_binary_name
++ local machine
+++ uname -m
++ machine=armv7l
++ local l_binary
++ local 'str=Detecting processor'
++ printf '  %b %s...' '[i]' 'Detecting processor'
++ [[ armv7l == \a\r\m* ]]
++ local rev
+++ uname -m
+++ sed 's/[^0-9]//g;'
++ rev=7
++ local lib
+++ grep -E '^\s*/lib'
+++ awk '{ print $1 }'
++++ which sh
+++ ldd /usr/bin/sh
++ lib=/lib/ld-linux-armhf.so.3
++ [[ /lib/ld-linux-armhf.so.3 == \/\l\i\b\/\l\d\-\l\i\n\u\x\-\a\a\r\c\h\6\4\.\s\o\.\1 ]]
++ [[ /lib/ld-linux-armhf.so.3 == \/\l\i\b\/\l\d\-\l\i\n\u\x\-\a\r\m\h\f\.\s\o\.\3 ]]
++ [[ 7 -gt 7 ]]
++ [[ 7 -eq 7 ]]
++ printf '%b  %b Detected ARMv7 processor (with hard-float support)\n' '\r' '[✓]'
++ l_binary=pihole-FTL-armv7-linux-gnueabihf
++ echo pihole-FTL-armv7-linux-gnueabihf
  [✓] Detected ARMv7 processor (with hard-float support)
pihole-FTL-armv7-linux-gnueabihf'
+ local binary
+ binary=pihole-FTL-armv7-linux-gnueabihf
+ set -f
+ is_repo /etc/.pihole
+ local directory=/etc/.pihole
+ local rc
+ [[ -d /etc/.pihole ]]
+ pushd /etc/.pihole
+ git status --short
+ popd
+ return 0
+ [[ true == \t\r\u\e ]]
+ is_repo /var/www/html/admin
+ local directory=/var/www/html/admin
+ local rc
+ [[ -d /var/www/html/admin ]]
+ pushd /var/www/html/admin
+ git status --short
+ popd
+ return 0
+ [[ -z ftl ]]
+ warning1
+ echo '  Please note that changing branches severely alters your Pi-hole subsystems'
  Please note that changing branches severely alters your Pi-hole subsystems
+ echo '  Features that work on the master branch, may not on a development branch'
  Features that work on the master branch, may not on a development branch
+ echo -e '  This feature is NOT supported unless a Pi-hole developer explicitly asks!'
  This feature is NOT supported unless a Pi-hole developer explicitly asks!
+ read -r -p '  Have you read and understood this? [y/N] ' response
  Have you read and understood this? [y/N] y
+ case "${response}" in
+ echo ''

+ return 0
+ [[ ftl == \d\e\v ]]
+ [[ ftl == \m\a\s\t\e\r ]]
+ [[ ftl == \c\o\r\e ]]
+ [[ ftl == \w\e\b ]]
+ [[ ftl == \f\t\l ]]
+ local path
+ local oldbranch
+ path=master/pihole-FTL-armv7-linux-gnueabihf
++ pihole-FTL -b
+ oldbranch=master
+ check_download_exists master/pihole-FTL-armv7-linux-gnueabihf
++ curl --head --silent https://ftl.pi-hole.net/master/pihole-FTL-armv7-linux-gnueabihf
++ head -n 1
+ status=
+ grep -q 404
+ return 0
+ echo '  [✓] Branch master exists'
  [✓] Branch master exists
+ echo master
+ chmod 644 /etc/pihole/ftlbranch
+ echo -e '  [i] Switching to branch: "master" from "master"'
  [i] Switching to branch: "master" from "master"
+ FTLinstall pihole-FTL-armv7-linux-gnueabihf
+ local 'str=Downloading and Installing FTL'
+ printf '  %b %s...' '[i]' 'Downloading and Installing FTL'
  [i] Downloading and Installing FTL...++ mktemp -d
+ pushd /tmp/tmp.PRmZf7uwme
+ install -T -m 0755 /etc/.pihole/advanced/Templates/pihole-FTL.service /etc/init.d/pihole-FTL
+ local ftlBranch
+ local url
+ [[ -f /etc/pihole/ftlbranch ]]
+ ftlBranch=master
+ local binary
+ binary=pihole-FTL-armv7-linux-gnueabihf
+ [[ master == \m\a\s\t\e\r ]]
+ url=https://github.com/pi-hole/ftl/releases/latest/download
+ curl -sSL --fail https://github.com/pi-hole/ftl/releases/latest/download/pihole-FTL-armv7-linux-gnueabihf -o pihole-FTL-armv7-linux-gnueabihf
curl: (6) Could not resolve host: github.com
+ popd
+ printf '%b  %b %s\n' '\r' '[✗]' 'Downloading and Installing FTL'
  [✗] Downloading and Installing FTL
+ printf '  %bError: URL %s/%s not found%b\n' '' https://github.com/pi-hole/ftl/releases/latest/download pihole-FTL-armv7-linux-gnueabihf ''
  Error: URL https://github.com/pi-hole/ftl/releases/latest/download/pihole-FTL-armv7-linux-gnueabihf not found
+ return 1

Please change nameserver in /etc/resolv.conf to 8.8.8.8 and run pihole -up

What's the output of

which pihole-FTL
dig github.com

Success!

Update Complete!

  Current Pi-hole version is v5.11.4
  Current AdminLTE version is v5.13
  Current FTL version is v5.16.1

Dashboard working and no errors!

pi@rpi-45:~ $ which pihole-FTL
/usr/bin/pihole-FTL
pi@rpi-45:~ $
pi@rpi-45:~ $ dig github.com

; <<>> DiG 9.16.27-Raspbian <<>> github.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 61562
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 512
;; QUESTION SECTION:
;github.com.                    IN      A

;; ANSWER SECTION:
github.com.             60      IN      A       140.82.121.3

;; Query time: 19 msec
;; SERVER: 8.8.8.8#53(8.8.8.8)
;; WHEN: Tue Aug 09 12:39:24 BST 2022
;; MSG SIZE  rcvd: 55