Pihole update to 4.3 knocked out my entire network HELP

Expected Behaviour:

Pihole should be up and running latest version 4.3

Actual Behaviour:

Pihole had an issue updating earlier. Debug token: h4m20wn2lq. I tried a shutdown and then was going to do a -r for repair. After shutdown and startup it seems that the pihole is unable to connect to internet (assuming bc FTL is down). Entire network is down bc pihole serves as DHCP.

HELP please.

Debug Token:

Unable to add new token after restarting

I was able to edit my dhcpcd.conf file and add google dns server temporarily so I could get to the internet on the Pi.

I have disabled DHCP and handed that back to the router to get the network back up.

Still having issues with FTL even after running Pihole -r (repair). I rebooted and still have issues saying FTL is not working.

New debug token: t3r6vxm2ti

Really hoping I don't have to install from scratch.

Post output for below three:

/usr/bin/pihole-FTL -v

sudo service pihole-FTL restart

journalctl --no-pager -u pihole-FTL

And if pihole -r repair is spewing errors or warnings, post them too please ?

Tried another repair before the running output for your items. Everything looked OK. Here is output from repair.

[i] Existing PHP installation detected : PHP version 7.0.33-0+deb9u3
[i] Repair option selected
[✓] Disk space check
[✓] Update local cache of available packages

[✓] Checking apt-get for upgraded packages... 23 updates available
[i] It is recommended to update your OS after installing the Pi-hole!

[i] Installer Dependency checks...
[✓] Checking for apt-utils
[✓] Checking for dialog
[✓] Checking for debconf
[✓] Checking for dhcpcd5
[✓] Checking for git
[✓] Checking for iproute2
[✓] Checking for whiptail

[i] Performing reconfiguration, skipping download of local repos
[✓] Resetting repository within /etc/.pihole...
[✓] Resetting repository within /var/www/html/admin...
[i] Main Dependency checks...
[✓] Checking for cron
[✓] Checking for curl
[✓] Checking for dnsutils
[✓] Checking for iputils-ping
[✓] Checking for lsof
[✓] Checking for netcat
[✓] Checking for psmisc
[✓] Checking for sudo
[✓] Checking for unzip
[✓] Checking for wget
[✓] Checking for idn2
[✓] Checking for sqlite3
[✓] Checking for libcap2-bin
[✓] Checking for dns-root-data
[✓] Checking for resolvconf
[✓] Checking for libcap2
[✓] Checking for lighttpd
[✓] Checking for php7.0-common
[✓] Checking for php7.0-cgi
[✓] Checking for php7.0-sqlite3

[✓] Enabling lighttpd service to start on reboot...

[i] FTL Checks...

[✓] Detected ARM-hf architecture (armv7+)
[i] Checking for existing FTL binary...
[i] Latest FTL Binary already installed (v4.3). Confirming Checksum...
[i] Checksum correct. No need to download!
[✓] Checking for user 'pihole'
[✓] Installing scripts from /etc/.pihole

[i] Installing configs from /etc/.pihole...
[i] Existing dnsmasq.conf found... it is not a Pi-hole file, leaving alone!
[✓] Copying 01-pihole.conf to /etc/dnsmasq.d/01-pihole.conf

[i] Installing blocking page...
[✓] Creating directory for blocking page, and copying files
[✗] Backing up index.lighttpd.html
No default index.lighttpd.html file found... not backing up

[✓] Installing sudoer file

[✓] Installing latest Cron script

[✓] Installing latest logrotate script
[i] Backing up /etc/dnsmasq.conf to /etc/dnsmasq.conf.old
[✓] man pages installed and database updated
[i] Testing if systemd-resolved is enabled
[i] Systemd-resolved is not enabled
[✓] Restarting lighttpd service...
[✓] Enabling lighttpd service to start on reboot...
[i] Restarting services...

> pi@rpi : ~ $ pihole -up

[i] Checking for updates...
[i] Pi-hole Core: up to date
[i] Web Interface: up to date
[i] FTL: up to date
[✓] Everything is up to date!

pi@rpi : ~ $ pihole -v
Pi-hole version is v4.3 (Latest: v4.3)
AdminLTE version is v4.3 (Latest: v4.3)
FTL version is v4.3 (Latest: v4.3)

pi@rpi : ~ $ pihole status
[✗] DNS service is NOT running

pi@rpi : ~ $ pihole enable
[i] Blocking already enabled, nothing to do

pi@rpi : ~ $ /usr/bin/pihole-FTL -v
v4.3

pi@rpi : ~ $ sudo service pihole-FTL restart
Job for pihole-FTL.service failed because the control process exited with error code.
See "systemctl status pihole-FTL.service" and "journalctl -xe" for details.

pi@rpi : ~ $ systemctl status pihole-FTL.service
pihole-FTL.service
Loaded: loaded (/etc/init.d/pihole-FTL; generated; vendor preset: enabled)
Active: failed (Result: exit-code) since Mon 2019-05-20 17:20:33 EDT; 4min 35
Docs: man:systemd-sysv-generator(8)
Process: 5593 ExecStart=/etc/init.d/pihole-FTL start (code=exited, status=203/
May 20 17:20:33 rpi systemd[1]: Starting pihole-FTL.service...
May 20 17:20:33 rpi systemd[1]: pihole-FTL.service: Control process exited, code
May 20 17:20:33 rpi systemd[1]: Failed to start pihole-FTL.service.
May 20 17:20:33 rpi systemd[1]: pihole-FTL.service: Unit entered failed state.
May 20 17:20:33 rpi systemd[1]: pihole-FTL.service: Failed with result 'exit-cod
lines 1-11/11 (END)

pi@rpi : ~ $ journalctl -xe
-- Support: Debian -- User Support
-- Unit pihole-FTL.service has begun starting up.
May 20 17:20:33 rpi systemd[5593]: pihole-FTL.service: Failed at step EXEC spawn
-- Subject: Process /etc/init.d/pihole-FTL could not be executed
-- Defined-By: systemd
-- Support: Debian -- User Support
-- The process /etc/init.d/pihole-FTL could not be executed and failed.
-- The error number returned by this process is 8.
May 20 17:20:33 rpi systemd[1]: pihole-FTL.service: Control process exited, code
May 20 17:20:33 rpi systemd[1]: Failed to start pihole-FTL.service.
-- Subject: Unit pihole-FTL.service has failed
-- Defined-By: systemd
-- Support: Debian -- User Support
-- Unit pihole-FTL.service has failed.
-- The result is failed.
May 20 17:20:33 rpi systemd[1]: pihole-FTL.service: Unit entered failed state.
May 20 17:20:33 rpi systemd[1]: pihole-FTL.service: Failed with result 'exit-cod
May 20 17:20:33 rpi sudo[5584]: pam_unix(sudo:session): session closed for user
lines 2904-2926/2926 (END)

pi@rpi : ~ $ journalctl --no-pager -u pihole-FTL
-- Logs begin at Thu 2016-11-03 13:16:43 EDT, end at Mon 2019-05-20 17:20:33 EDT. --
May 20 01:38:47 rpi systemd[1]: Starting pihole-FTL.service...
May 20 01:38:48 rpi systemd[1]: pihole-FTL.service: Control process exited, code=exited status=203
May 20 01:38:48 rpi systemd[1]: Failed to start pihole-FTL.service.
May 20 01:38:48 rpi systemd[1]: pihole-FTL.service: Unit entered failed state.
May 20 01:38:48 rpi systemd[1]: pihole-FTL.service: Failed with result 'exit-code'.
May 20 17:20:33 rpi systemd[1]: Starting pihole-FTL.service...
May 20 17:20:33 rpi systemd[1]: pihole-FTL.service: Control process exited, code=exited status=203
May 20 17:20:33 rpi systemd[1]: Failed to start pihole-FTL.service.
May 20 17:20:33 rpi systemd[1]: pihole-FTL.service: Unit entered failed state.
May 20 17:20:33 rpi systemd[1]: pihole-FTL.service: Failed with result 'exit-code'.

stat /etc/init.d/pihole-FTL

sudo bash /etc/init.d/pihole-FTL status

???

1 Like

pi@rpi:~ $ stat /etc/init.d/pihole-FTL
File: /etc/init.d/pihole-FTL
Size: 2753 Blocks: 8 IO Block: 4096 regular file
Device: b302h/45826d Inode: 1434 Links: 1
Access: (0755/-rwxr-xr-x) Uid: ( 0/ root) Gid: ( 0/ root)
Access: 2019-05-19 08:54:10.345578958 -0400
Modify: 2019-05-19 08:54:10.345578958 -0400
Change: 2019-05-19 08:54:10.345578958 -0400
Birth: -

pi@rpi : ~ $ sudo bash /etc/init.d/pihole-FTL status

/etc/init.d/pihole-FTL: line 1: $'\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\37377\377\377\377\377\377\377\377\377\377': command not found

File size and permissions look ok but that last one should look like below:

pi@noads:~ $ sudo bash /etc/init.d/pihole-FTL status
[ ok ] pihole-FTL is running

Might indicate filesystem corruption.
Can you cat the file ?

pi@noads:~ $ head /etc/init.d/pihole-FTL
#!/bin/bash
### BEGIN INIT INFO
# Provides:          pihole-FTL
# Required-Start:    $remote_fs $syslog
# Required-Stop:     $remote_fs $syslog
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: pihole-FTL daemon
# Description:       Enable service provided by pihole-FTL daemon
### END INIT INFO

pi@rpi : ~ $ cat /etc/init.d/pihole-FTL

'?????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????'

cat or head doesnt make difference.
Do they show you any ?

head /etc/init.d/pihole-FTL

Sorry output was cutoff. It just shows a bunch of ? marks.

That doesnt look good.
Try see if you can restore the file with below two:

curl -s https://raw.githubusercontent.com/pi-hole/pi-hole/master/advanced/Templates/pihole-FTL.service | sudo tee /etc/init.d/pihole-FTL

sudo chmod +x /etc/init.d/pihole-FTL

Does she display bash code now with below one ?

head /etc/init.d/pihole-FTL

EDIT: Last minute edit, I added the -s argument for the curl command

pi@rpi:~ $ curl -s https://raw.githubusercontent.com/pi-hole/pi-hole/master/advanced/Templates/pihole-FTL.service | sudo tee /etc/init.d/pihole-FTL
#!/bin/bash
BEGIN INIT INFO
Provides: pihole-FTL
Required-Start: $remote_fs $syslog
Required-Stop: $remote_fs $syslog
Default-Start: 2 3 4 5
Default-Stop: 0 1 6
Short-Description: pihole-FTL daemon
Description: Enable service provided by pihole-FTL daemon
END INIT INFO

FTLUSER=pihole
PIDFILE=/var/run/pihole-FTL.pid

get_pid() {
pidof "pihole-FTL"
}

is_running() {
ps "$(get_pid)" > /dev/null 2>&1
}

Start the service
start() {
if is_running; then
echo "pihole-FTL is already running"
else
# Touch files to ensure they exist (create if non-existing, preserve if existing)
touch /var/log/pihole-FTL.log /var/log/pihole.log
touch /run/pihole-FTL.pid /run/pihole-FTL.port
touch /etc/pihole/dhcp.leases
mkdir -p /var/run/pihole
mkdir -p /var/log/pihole
chown pihole:pihole /var/run/pihole /var/log/pihole
# Remove possible leftovers from previous pihole-FTL processes
rm -f /dev/shm/FTL-* 2> /dev/null
rm /var/run/pihole/FTL.sock 2> /dev/null
# Ensure that permissions are set so that pihole-FTL can edit all necessary files
chown pihole:pihole /run/pihole-FTL.pid /run/pihole-FTL.port
chown pihole:pihole /etc/pihole /etc/pihole/dhcp.leases 2> /dev/null
chown pihole:pihole /var/log/pihole-FTL.log /var/log/pihole.log
chmod 0644 /var/log/pihole-FTL.log /run/pihole-FTL.pid /run/pihole-FTL.port /var/log/pihole.log
echo "nameserver 127.0.0.1" | /sbin/resolvconf -a lo.piholeFTL
if setcap CAP_NET_BIND_SERVICE,CAP_NET_RAW,CAP_NET_ADMIN+eip "$(which pihole-FTL)"; then
su -s /bin/sh -c "/usr/bin/pihole-FTL" "$FTLUSER"
else
echo "Warning: Starting pihole-FTL as root because setting capabilities is not supported on this system"
pihole-FTL
fi
echo
fi
}

Stop the service
stop() {
if is_running; then
/sbin/resolvconf -d lo.piholeFTL
kill "$(get_pid)"
for i in {1..5}; do
if ! is_running; then
break
fi

  echo -n "."
  sleep 1
done
echo

if is_running; then
  echo "Not stopped; may still be shutting down or shutdown may have failed, killing now"
  kill -9 "$(get_pid)"
  exit 1
else
  echo "Stopped"
fi

else
echo "Not running"
fi
echo
}

Indicate the service status
status() {
if is_running; then
echo "[ ok ] pihole-FTL is running"
exit 0
else
echo "[ ] pihole-FTL is not running"
exit 1
fi
}

main logic ###
case "$1" in
stop)
stop
;;
status)
status
;;
start|restart|reload|condrestart)
stop
start
;;
*)
echo $"Usage: $0 {start|stop|restart|reload|status}"
exit 1
esac

exit 0

Then I did chmod

Then ran

pi@rpi:~ $ head /etc/init.d/pihole-FTL
#!/bin/bash
BEGIN INIT INFO
Provides: pihole-FTL
Required-Start: $remote_fs $syslog
Required-Stop: $remote_fs $syslog
Default-Start: 2 3 4 5
Default-Stop: 0 1 6
Short-Description: pihole-FTL daemon
Description: Enable service provided by pihole-FTL daemon
END INIT INFO

Looking good now! :grinning:

Although DNS still isn't running.

sudo service pihole-FTL restart

pihole status

journalctl --no-pager -u pihole-FTL

I actually restarted the entire pi and DNS seems to be up now.

pi@rpi : ~ $ journalctl --no-pager -u pihole-FTL
-- Logs begin at Thu 2016-11-03 13:16:43 EDT, end at Mon 2019-05-20 18:55:15 EDT. --
May 20 18:54:25 rpi systemd[1]: Starting LSB: pihole-FTL daemon...
May 20 18:54:25 rpi pihole-FTL[410]: Not running
May 20 18:54:36 rpi su[654]: Successful su for pihole by root
May 20 18:54:36 rpi su[654]: + ??? root:pihole
May 20 18:54:36 rpi su[654]: pam_unix(su:session): session opened for user pihole by (uid=0)
May 20 18:54:37 rpi pihole-FTL[410]: FTL started!
May 20 18:54:37 rpi systemd[1]: Started LSB: pihole-FTL daemon.

pi@rpi : ~ $ pihole status
[✓] DNS service is running
[✓] Pi-hole blocking is Enabled

Something else weird that is happening, when I ssh into the pi, I get this.

Am not touching this :smiley:
Sounds like something awful happened to the filesystem.
Could be power related when running on an SBC.

I think everything is good now with the exception of the initial SSH into the machine. I'll do some research on that and see if I can figure that out.

All these problems started as soon as I tried to update to 4.3 from 4.2.3

I will disable DHCP on router and enable on Pi and give it a shot.

In the event that I need to start from scratch, what does reconfigure option do under pihole -r?

It allows you to reconfigure all the options you had when running the initial installer.

Looks like the web interface still has a bunch of weird symbols so I think I'll try the reconfigure. If that doesn't work then I can start over fresh.

Is there a way I can export all settings including block list / whitelist / DHCP naming?

Use teleporter:

http://pi.hole/admin/settings.php?tab=teleporter

EDIT: Make sure to refresh web browser content (CTRL-F5).

Admin page has a lot of garbled characters and the export button doesn't do anything. I dont think export backs up DHCP custom labels, does it?

Edit: Is there a command line I can run to export?