FTL offline and pihole not blocking ads

Please follow the below template, it will help us to help you!

Expected Behaviour:

FTL should be online in web admin
pihole should be blocking ads

Actual Behaviour:

FTL is NOT online in web admin
pihole is NOT blocking ads

In the webadmin http;//pi.hole/admin, FTL is offline
Also pihole is not blocking ads
The IP of the PC that I am using to browse to websites with ads is 192.168.1.115

I ran the following
http;//pi.hole/admin/api.php
It returned: {"FTLnotrunning":true}

pidof pihole-FTL

Here is some data returned from: pihole -t (note my ip 192.168.1.115, that the computer I browsing from)
02:44:50 dnsmasq[1451]: 434 192.168.1.115/56053 query[A] secure-us.imrworldwide.com from 192.168.1.115
02:44:50 dnsmasq[1451]: 434 192.168.1.115/56053 forwarded secure-us.imrworldwide.com to 8.8.8.8
02:44:50 dnsmasq[1451]: 434 192.168.1.115/56053 forwarded secure-us.imrworldwide.com to 8.8.4.4
02:44:50 dnsmasq[1451]: 435 192.168.1.115/56315 query[A] conversions.adaptv.advertising.com from 192.168.1.115
02:44:50 dnsmasq[1451]: 435 192.168.1.115/56315 forwarded conversions.adaptv.advertising.com to 8.8.8.8
02:44:50 dnsmasq[1451]: 435 192.168.1.115/56315 forwarded conversions.adaptv.advertising.com to 8.8.4.4
02:44:50 dnsmasq[1451]: 436 192.168.1.115/51582 query[A] bis.onlinesyn.com from 192.168.1.115
02:44:50 dnsmasq[1451]: 436 192.168.1.115/51582 forwarded bis.onlinesyn.com to 8.8.4.4
02:44:50 dnsmasq[1451]: 436 192.168.1.115/51582 forwarded bis.onlinesyn.com to 8.8.8.8
02:44:50 dnsmasq[1451]: 437 192.168.1.115/65106 query[A] ad.turn.com from 192.168.1.115
02:44:50 dnsmasq[1451]: 437 192.168.1.115/65106 forwarded ad.turn.com to 8.8.8.8
02:44:50 dnsmasq[1451]: 437 192.168.1.115/65106 forwarded ad.turn.com to 8.8.4.4
02:44:50 dnsmasq[1451]: 438 192.168.1.115/63655 query[A] su.addthis.com from 192.168.1.115
02:44:50 dnsmasq[1451]: 438 192.168.1.115/63655 forwarded su.addthis.com to 8.8.8.8
02:44:50 dnsmasq[1451]: 438 192.168.1.115/63655 forwarded su.addthis.com to 8.8.4.4
02:44:50 dnsmasq[1451]: 435 192.168.1.115/56315 reply conversions.adaptv.advertising.com is
02:44:50 dnsmasq[1451]: 435 192.168.1.115/56315 reply control.adap.tv is
02:44:50 dnsmasq[1451]: 435 192.168.1.115/56315 reply control.adap.tv.akadns.net is
02:44:50 dnsmasq[1451]: 435 192.168.1.115/56315 reply control-wc-local.adap.tv.akadns.net is

Debug Token:

Your debug token is: 10im9jbsdv

If you are on V4, you should NOT have dnsmasq running (and handling your requests).

Because dnsmasq is active and running, FTLDNS cannot start (and handle requests) due to the fact that port 53 is occupied by dnsmasq.

If you don't have a specific reason for dnsmasq to run, you can unisntall it (sudo apt remove dnsmasq).

Try disabling it first:

sudo systemctl stop dnsmasq
sudo systemctl disable dnsmasq

and restart FTLDNS:

sudo systemctl restart pihole-FTL.service

This should work for you :slight_smile:

I generated a new debug token after doing the below: 37i0rxioo2

I tried
sudo systemctl stop dnsmasq
sudo systemctl disable dnsmasq
sudo systemctl restart pihole-FTL.service

and was disconnected from SSH after sudo systemctl restart pihole-FTL.service
When I restarted the pihole unit, dnsmasq was running again, so I uninstalled it and rebooted.
When I did
sudo lsof +M -nPi :53
Nothing is shown

So I reinstalled pihole with (actually it asked me to reconfigure)
sudo curl -sSL https://install.pi-hole.net | bash -x

The last lines of the install said
[✗] DNS service is NOT running

Now when I go to the webadmin
It says both DNS service not running & FTL offline

What is the output of sudo systemctl status pihole-FTL.service ?

Sep 26 17:48:35 beaglebone systemd[1]: Starting LSB: pihole-FTL daemon...
Sep 26 17:48:36 beaglebone pihole-FTL[1030]: Not running
Sep 26 17:48:37 beaglebone pihole-FTL[1030]: chown: cannot access '/etc/pihole/dhcp.leases': No such file or directory
Sep 26 17:48:39 beaglebone pihole-FTL[1030]: /etc/resolvconf/update.d/libc: Warning: /etc/resolv.conf is not a symbolic
Sep 26 17:48:41 beaglebone su[1237]: Successful su for pihole by root
Sep 26 17:48:41 beaglebone su[1237]: + ??? root:pihole
Sep 26 17:48:41 beaglebone su[1237]: pam_unix(su:session): session opened for user pihole by (uid=0)
Sep 26 17:48:44 beaglebone pihole-FTL[1030]: dnsmasq: cannot open or create lease file /var/lib/misc/dnsmasq.leases: Per
Sep 26 17:48:44 beaglebone systemd[1]: Started LSB: pihole-FTL daemon.

After the above, I tried another
sudo lsof +M -nPi :53
Nothing is shown

1 Like

FYI: I unstalled dnsmasq per RamSet's suggestion above

I tried your suggestion:
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

Sep 26 18:32:37 beaglebone systemd[1]: Starting LSB: pihole-FTL daemon...
Sep 26 18:32:37 beaglebone pihole-FTL[4359]: Not running
Sep 26 18:32:37 beaglebone pihole-FTL[4359]: chown: cannot access '/etc/pihole/dhcp.leases': No such file or directory
Sep 26 18:32:37 beaglebone su[4382]: Successful su for pihole by root
Sep 26 18:32:37 beaglebone su[4382]: + ??? root:pihole
Sep 26 18:32:37 beaglebone su[4382]: pam_unix(su:session): session opened for user pihole by (uid=0)
Sep 26 18:32:38 beaglebone pihole-FTL[4359]: FTL started!
Sep 26 18:32:38 beaglebone systemd[1]: Started LSB: pihole-FTL daemon.

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

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

root@beaglebone:~# grep -v '#|^$' -R /etc/dnsmasq.*
/etc/dnsmasq.conf:conf-dir=/etc/dnsmasq.d
/etc/dnsmasq.d/01-pihole.conf:addn-hosts=/etc/pihole/gravity.list
/etc/dnsmasq.d/01-pihole.conf:addn-hosts=/etc/pihole/black.list
/etc/dnsmasq.d/01-pihole.conf:addn-hosts=/etc/pihole/local.list
/etc/dnsmasq.d/01-pihole.conf:localise-queries
/etc/dnsmasq.d/01-pihole.conf:no-resolv
/etc/dnsmasq.d/01-pihole.conf:cache-size=10000
/etc/dnsmasq.d/01-pihole.conf:log-queries=extra
/etc/dnsmasq.d/01-pihole.conf:log-facility=/var/log/pihole.log
/etc/dnsmasq.d/01-pihole.conf:local-ttl=2
/etc/dnsmasq.d/01-pihole.conf:log-async
/etc/dnsmasq.d/01-pihole.conf:server=8.8.8.8
/etc/dnsmasq.d/01-pihole.conf:server=8.8.4.4
/etc/dnsmasq.d/01-pihole.conf:interface=eth0
/etc/dnsmasq.d/SoftAp0:interface=usb0
/etc/dnsmasq.d/SoftAp0:interface=usb1
/etc/dnsmasq.d/SoftAp0:port=53
/etc/dnsmasq.d/SoftAp0:dhcp-authoritative
/etc/dnsmasq.d/SoftAp0:domain-needed
/etc/dnsmasq.d/SoftAp0:bogus-priv
/etc/dnsmasq.d/SoftAp0:expand-hosts
/etc/dnsmasq.d/SoftAp0:dhcp-range=usb0,192.168.7.1,192.168.7.1,2m
/etc/dnsmasq.d/SoftAp0:dhcp-range=usb1,192.168.6.1,192.168.6.1,2m
/etc/dnsmasq.d/SoftAp0:listen-address=127.0.0.1
/etc/dnsmasq.d/SoftAp0:listen-address=192.168.7.2
/etc/dnsmasq.d/SoftAp0:listen-address=192.168.6.2
/etc/dnsmasq.d/SoftAp0:dhcp-option=usb0,3
/etc/dnsmasq.d/SoftAp0:dhcp-option=usb0,6
/etc/dnsmasq.d/SoftAp0:dhcp-option=usb1,3
/etc/dnsmasq.d/SoftAp0:dhcp-option=usb1,6

Working now ?

Where does that SoftAp0 file come from ?
It doesnt belong to Pi-hole.

dpkg -S /etc/dnsmasq.d/SoftAp0

?

dpkg -S /etc/dnsmasq.d/SoftAp0
dpkg-query: no path found matching pattern /etc/dnsmasq.d/SoftAp0

Yeah probably dynamically generated with one of the packages.
But is it working now ?

If not, try move that file to your home folder:
I think its better to move that file out of there as it contains settings that might conflict with Pi-hole:

sudo mv /etc/dnsmasq.d/SoftAp0 ~

And restart:

sudo service pihole-FTL restart

And check status again:

sudo service pihole-FTL status -l

And run a DNS lookup on a Linux, Windows or Mac client PC:

nslookup pi.hole <PIHOLE_IP_ADDRESS>

That did it!

The pihole is working now. FTL is running and Ads are blocked

pihole is now doing DNS: sudo lsof +M -nPi :53

COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
pihole-FT 5117 pihole 6u IPv4 34336 0t0 UDP *:53
pihole-FT 5117 pihole 7u IPv4 34337 0t0 TCP *:53 (LISTEN)
pihole-FT 5117 pihole 8u IPv6 34338 0t0 UDP *:53
pihole-FT 5117 pihole 9u IPv6 34339 0t0 TCP *:53 (LISTEN)

Thanks so much!!!

1 Like

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.