FTL is offline after update to 4.0

I have managed to create a debug token:
1y9eixc22u

Looks for me that dnsmasq is still running. After upgrade to V4 dnsmasq is implemented in FTLDNS.

Check to see if dnsmasq is running with

sudo systemctl status dnsmasq

It should say


If dnsmasq is active you need to stop it and restart FTLDNS in order for the DNS resolution to work properly.

sudo systemctl stop dnsmasq
sudo systemctl restart pihole-FTL.service

Once you have done this, you need to find out why dnsmasq is starting.

If you don’t use dnsmasq in your own setup, it is safe to uninstall it if you so chose to do so.

sudo apt remove dnsmasq however since it’s a dependency of Network Manager, it MIGHT be re-installed if your environment is set-up for auto updates and it will break FTLDNS again. (C to ramset)

Thank you for your quick reply.

Yes dnsmasq was still running (I don't know why), but uninstalling it did the trick. Thank you again! :slight_smile:

EDIT: I have updated my father's system (same config as mine, dedicated Rpi2 with Raspian Stretch Lite) and I have got the same error (so I removed dnsmasq there as well and everything is working now). I have also updated the pihole at my workplace, which is slightly different (Rpi3 instead of 2) and it is working without any extra magic. Do you think this error message has to do something with Rpi2?

Hello should I start a new thread to receive support? It does not seem my inability to generate a debug log or token? Please see my comments above.

3 posts were split to a new topic: Wifi Bridge With Dnsmasq

seems removing dnsmasq doesn't fix the issue (Pi B+ / 512MB RAM).

had to reinstall (uninstall and install).

phew.

also no solution for me

The output of "sudo systemctl status pihole-FTL.service":

pihole-FTL.service - LSB: pihole-FTL daemon
Loaded: loaded (/etc/init.d/pihole-FTL; generated; vendor preset: enabled)
Active: active (exited) since Tue 2018-08-14 21:53:38 CEST; 7min ago
Docs: man:systemd-sysv-generator(8)
Process: 356 ExecStart=/etc/init.d/pihole-FTL start (code=exited, status=0/SUC
CGroup: /system.slice/pihole-FTL.service

Aug 14 21:53:26 matrix-sever systemd[1]: Starting LSB: pihole-FTL daemon...
Aug 14 21:53:26 matrix-sever pihole-FTL[356]: Not running
Aug 14 21:53:27 matrix-sever pihole-FTL[356]: chown: cannot access '/etc/pihole/
Aug 14 21:53:38 matrix-sever su[1142]: Successful su for pihole by root
Aug 14 21:53:38 matrix-sever su[1142]: + ??? root:pihole
Aug 14 21:53:38 matrix-sever su[1142]: pam_unix(su:session): session opened for
Aug 14 21:53:38 matrix-sever pihole-FTL[356]: dnsmasq: cannot open or create lea
Aug 14 21:53:38 matrix-sever systemd[1]: Started LSB: pihole-FTL daemon.
lines 1-15/15 (END)

In order to upload a debug in your situation please try the following steps

  1. sudo nano /etc/resolv.conf
  2. change 127.0.0.1 to 9.9.9.9
  3. save
  4. run pihole -d

@mon_dieu Please try

sudo touch /etc/pihole/dhcp.leases
sudo service pihole-FTL restart

After complete new installation with Stretch, RaspAP and pihole
FTL offline
then
sudo touch /etc/pihole/dhcp.leases
sudo service pihole-FTL restart:
Failed to restart pihole-FTL.sevice: Unit pihole-FTL.service not found

Does the file

/etc/init.d/pihole-FTL

exist?

The file

/etc/init.d/pihole-FTL

doesn't exist.

Also
/usr/bin/pihole-FTL
doesn’t exist.

Output pihole -v
Pi-hole version is v4.0 (Latest: v4.0) AdminLTE version is v4.0 (Latest: v4.0) /opt/pihole/version.sh: line 19: pihole-FTL: command not found Latest FTL version is v4.0

Your installation is somehow broken, can you run pihole -r once again and post any suspiciously looking output (i.e., if it crashes)

@mon_dieu,
Can you confirm same output for the status command as in the other thread ?

If so, the pihole-FTL binary probably cant access that file anymore as its running with user "pihole" privileges now instead of root privies like dnsmasq did before the Pi-hole version 4 update.
And that file is not part of the normal basic Pi-hole install.

grep -v '#\|^$' -R /etc/dnsmasq.*

?

EDIT: Owh first get it to work again with pihole -r like @DL6ER instructed :wink:

EDIT2: I just read this bit that you could try:

after pihole -r DNS service not running and FTL offline
Output:
[i] Existing PHP installation detected : PHP version 7.0.30-0+deb9u1
[i] Repair option selected
[✓] Disk space check

[✓] Update local cache of available packages

[✓] Checking apt-get for upgraded packages... 7 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 bc
[✓] 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 lighttpd
[✓] Checking for php7.0-common
[✓] Checking for php7.0-cgi
[✓] Checking for php7.0-sqlite3

[✓] Enabling lighttpd service to start on reboot
[✓] 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] FTL Checks...
[✓] Detected ARM-hf architecture (armv7+)
[i] Checking for existing FTL binary...
[✓] Downloading and Installing FTL
[i] FTL can now resolve DNS Queries without dnsmasq running separately
[✓] Stopping dnsmasq service...
[✓] Disabling dnsmasq service

[✓] man pages installed and database updated
[i] Systemd-resolved is not enabled
[✓] Starting lighttpd service
[✓] Enabling lighttpd service to start on reboot
[i] Restarting services...
[✓] Starting pihole-FTL service
[✓] Enabling pihole-FTL service to start on reboot
[✓] Deleting existing list cache
[✗] DNS service is not running
[✓] Starting DNS service
[✗] DNS resolution is not available

chown pihole:pihole /var/lib/misc/dnsmasq.leases
chown: changing ownership of '/var/lib/misc/dnsmasq.leases': Operation not permitted
grep -v '#\|^$' -R /etc/dnsmasq
grep: /etc/dnsmasq: No such file or directory

Try running the command via sudo

First confirm if you still have same status error:

If so, you can try change ownership of that file like @technicalpyro previously posted (with sudo this time):

sudo touch /var/lib/misc/dnsmasq.leases

sudo chown pihole:pihole /var/lib/misc/dnsmasq.leases

Restart:

sudo systemctl restart pihole-FTL

And check again:

sudo systemctl status pihole-FTL -l

Source of that dnsmasq.leases file is probably revealed if you run below one (dont skip the .*):

grep -v '#\|^$' -R /etc/dnsmasq.*