Admin page shows FTL Offline | Unable to start, cannot access dhcp.leases

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

Expected Behaviour:

When running SSH sudo service pihole-FTL restart
the FTL should show as 'FTL Active' or 'FTL Online' in the admin dashboard

Actual Behaviour:

When running SSH sudo service pihole-FTL restart
SSH shows:
Stopped
chown: cannot access '/etc/pihole/dhcp.lease' : No such file or directory
FTL Started!
Admin page shows 'FTL Offline'

Running on LG G7 via 'Linux Deploy' & Debian

Debug Token:

vdadklt48x

sudo touch etc/pihole/dhcp.lease
sudo service pihole~FTL restart

No luck

@localhost:~$ sudo touch etc/pihole/dhcp.lease
touch: cannot touch 'etc/pihole/dhcp.lease': No such file or directory

Found a post stating that it needs a manual install; so used the following
wget -O basic-install.sh https://install.pi-hole.net
sudo bash basic-install.sh

Now doing a 'sudo service pihole-FTL restart'
shows:
Stopped
FTL started!

however the admin page still shows that it is offline?

What is the output of these commands from the Pi-Hole host terminal?

pihole status

echo ">stats" | nc localhost 4711

See below for output - looks like even though its showing offline in the admin portal - it appears to be running?

@localhost:~$ pihole status
  [βœ“] DNS service is running
  [βœ“] Pi-hole blocking is Enabled

@localhost:~$ echo ">stats" | nc localhost 4711
domains_being_blocked 126334
dns_queries_today 464
ads_blocked_today 215
ads_percentage_today 46.336208
unique_domains 105
queries_forwarded 157
queries_cached 92
clients_ever_seen 4
unique_clients 4
dns_queries_all_types 685
reply_NODATA 9
reply_NXDOMAIN 68
reply_CNAME 69
reply_IP 274
status enabled
---EOM---

Yes. Pi-Hole appears to be running and resolving DNS. When you do an internet request on a connected client (I assume there is more than one), are you seeing traffic from that client in the query log?

thats the thing, query log appears to be stuck at 'Processing...' and I'm getting just loading symbols on the main dashboard... appears the web interface isn't able to pull the info...

Did you try refresh the browser with CTRL-F5 ?

Clear browser cache ?

Tried another browser ?

Cleared cache, different browser, no effect.

Appears to have something to do with dnsmasq...

"Service dnsmasq status"

returns
"-bash: service: command not found"

Firewall active ?

sudo iptables -L -n

EDIT: Ohw and try run repair:

pihole -r

Ohw 2, open another bash window and tail the logs with:

tailf /var/log/pihole.log

This is normal with Pi-Hole V4. The code for dnsmasq is included in pihole-FTL and dnsmasq no longer runs as a separate process.

https://docs.pi-hole.net/ftldns/dns-resolver/

1 Like

kk, thank you, sorry just getting into this and old posts and v's are confusing me lol

made me think dnsmasq also because this happend on install
Imgur

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

?

Might need to edit out personal details!

@localhost:/var/run/pihole$ sudo 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=wlan0

Looks good.

Did you check firewall and tried running repair ?

sudo iptables -L -n

@localhost:/var/run/pihole$ sudo iptables -L -n
Chain INPUT (policy ACCEPT)
target     prot opt source               destination
bw_INPUT   all  --  0.0.0.0/0            0.0.0.0/0
fw_INPUT   all  --  0.0.0.0/0            0.0.0.0/0

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination
oem_fwd    all  --  0.0.0.0/0            0.0.0.0/0
fw_FORWARD  all  --  0.0.0.0/0            0.0.0.0/0
bw_FORWARD  all  --  0.0.0.0/0            0.0.0.0/0
natctrl_FORWARD  all  --  0.0.0.0/0            0.0.0.0/0

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination
mark       all  --  0.0.0.0/0            0.0.0.0/0
ACCEPT     all  --  0.0.0.0/0            0.0.0.0/0
voice_protection  all  --  0.0.0.0/0            0.0.0.0/0
oem_out    all  --  0.0.0.0/0            0.0.0.0/0
fw_OUTPUT  all  --  0.0.0.0/0            0.0.0.0/0
bw_OUTPUT  all  --  0.0.0.0/0            0.0.0.0/0
st_filter_OUTPUT  all  --  0.0.0.0/0            0.0.0.0/0

Chain bw_FORWARD (1 references)
target     prot opt source               destination

Chain bw_INPUT (1 references)
target     prot opt source               destination
           all  --  0.0.0.0/0            0.0.0.0/0           UNKNOWN match `quota2'
           all  --  0.0.0.0/0            0.0.0.0/0            owner socket exists

Chain bw_OUTPUT (1 references)
target     prot opt source               destination
           all  --  0.0.0.0/0            0.0.0.0/0           UNKNOWN match `quota2'
           all  --  0.0.0.0/0            0.0.0.0/0            owner socket exists

Chain bw_costly_shared (0 references)
target     prot opt source               destination
bw_penalty_box  all  --  0.0.0.0/0            0.0.0.0/0

Chain bw_happy_box (0 references)
target     prot opt source               destination

Chain bw_penalty_box (1 references)
target     prot opt source               destination

Chain fail (0 references)
target     prot opt source               destination
REJECT     all  --  0.0.0.0/0            0.0.0.0/0            reject-with icmp-host-unreachable

Chain firewall (1 references)
target     prot opt source               destination
mobile     all  --  0.0.0.0/0            0.0.0.0/0
mobile     all  --  0.0.0.0/0            0.0.0.0/0
mobile     all  --  0.0.0.0/0            0.0.0.0/0
mobile     all  --  0.0.0.0/0            0.0.0.0/0
mobile     all  --  0.0.0.0/0            0.0.0.0/0
mobile     all  --  0.0.0.0/0            0.0.0.0/0
mobile     all  --  0.0.0.0/0            0.0.0.0/0
mobile     all  --  0.0.0.0/0            0.0.0.0/0
mobile     all  --  0.0.0.0/0            0.0.0.0/0
mobile     all  --  0.0.0.0/0            0.0.0.0/0
wifi       all  --  0.0.0.0/0            0.0.0.0/0
wifi       all  --  0.0.0.0/0            0.0.0.0/0
wifi       all  --  0.0.0.0/0            0.0.0.0/0
wifi       all  --  0.0.0.0/0            0.0.0.0/0
wifi       all  --  0.0.0.0/0            0.0.0.0/0
wifi       all  --  0.0.0.0/0            0.0.0.0/0

Chain fw_FORWARD (1 references)
target     prot opt source               destination

Chain fw_INPUT (1 references)
target     prot opt source               destination

Chain fw_OUTPUT (1 references)
target     prot opt source               destination

Chain host (1 references)
target     prot opt source               destination
firewall   all  --  0.0.0.0/0            0.0.0.0/0

Chain mark (1 references)
target     prot opt source               destination
host       all  --  0.0.0.0/0            0.0.0.0/0

Chain mobile (10 references)
target     prot opt source               destination

Chain natctrl_FORWARD (1 references)
target     prot opt source               destination
DROP       all  --  0.0.0.0/0            0.0.0.0/0

Chain natctrl_tether_counters (0 references)
target     prot opt source               destination

Chain oem_fwd (1 references)
target     prot opt source               destination

Chain oem_out (1 references)
target     prot opt source               destination

Chain st_filter_OUTPUT (1 references)
target     prot opt source               destination

Chain voice_protection (1 references)
target     prot opt source               destination

Chain wifi (6 references)
target     prot opt source               destination

piehole -r

@localhost:/var/run/pihole$ pihole -r

  [βœ“] Root user check

        .;;,.
        .ccccc:,.
         :cccclll:.      ..,,
          :ccccclll.   ;ooodc
           'ccll:;ll .oooodc
             .;cll.;;looo:.
                 .. ','.
                .',,,,,,'.
              .',,,,,,,,,,.
            .',,,,,,,,,,,,....
          ....''',,,,,,,'.......
        .........  ....  .........
        ..........      ..........
        ..........      ..........
        .........  ....  .........
          ........,,,,,,,'......
            ....',,,,,,,,,,,,.
               .',,,,,,,,,'.
                .',,,,,,'.
                  ..'''.

  [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
        Kernel update detected. If the install fails, please reboot and try again

  [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...
  [i] Latest FTL Binary already installed (v4.0). Confirming Checksum...
  [i] Checksum correct. No need to download!

  [βœ“] 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
  [i] Neutrino emissions detected...
  [βœ“] Pulling blocklist source list into range

  [i] Target: raw.githubusercontent.com (hosts)
  [βœ“] Status: Retrieval successful

  [i] Target: mirror1.malwaredomains.com (justdomains)
  [βœ“] Status: Retrieval successful

  [i] Target: sysctl.org (hosts)
  [βœ“] Status: Retrieval successful

  [i] Target: zeustracker.abuse.ch (blocklist.php?download=domainblocklist)
  [βœ“] Status: Retrieval successful

  [i] Target: s3.amazonaws.com (simple_tracking.txt)
  [βœ“] Status: Retrieval successful

  [i] Target: s3.amazonaws.com (simple_ad.txt)
  [βœ“] Status: Retrieval successful

  [i] Target: hosts-file.net (ad_servers.txt)
  [βœ“] Status: Retrieval successful

  [βœ“] Consolidating blocklists
  [βœ“] Extracting domains from blocklists
  [i] Number of domains being pulled in by gravity: 149252
  [βœ“] Removing duplicate domains
  [i] Number of unique domains trapped in the Event Horizon: 126334
  [i] Nothing to whitelist!
  [i] Number of regex filters: 0
  [βœ“] Parsing domains into hosts format
  [βœ“] Cleaning up stray matter

  [βœ“] Force-reloading DNS service
  [βœ“] DNS service is running
  [βœ“] Pi-hole blocking is Enabled

  [i] The install log is located at: /etc/pihole/install.log
    Update Complete!

  Current Pi-hole version is v4.0
  Current AdminLTE version is v4.0
  Current FTL version is v4.0

Looks like my wife is on her phone
Imgur

Thank you for helping me out I'm completely lost at the moment lol

Can you disable the firewall for diagnosing ?
Am not that proficient with iptables.

EDIT: it used to be simple before with 'service iptables stop' but now it seems you need something like below to do it from bash:

Sure... but... uhhh... how?

Below ones seems to do the trick:

sudo iptables -F
sudo iptables -X
sudo iptables -t nat -F
sudo iptables -t nat -X
sudo iptables -t nat -L -n -v
sudo iptables -t mangle -F
sudo iptables -t mangle -X
sudo iptables -P INPUT ACCEPT
sudo iptables -P OUTPUT ACCEPT
sudo iptables -P FORWARD ACCEPT

Check afterwards with:

pi@noads:~ $ sudo iptables -L -n
Chain INPUT (policy ACCEPT)
target     prot opt source               destination

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination

To restore iptables, just reboot.

Done; however no change, am still getting no data on the web admin page

@localhost:~$ sudo iptables -L -n
Chain INPUT (policy ACCEPT)
target     prot opt source               destination

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination