Failed to restart pihole-FTL.service

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

Expected Behaviour:

Pi-Hole admin page should load (but doesn't).

Actual Behaviour:

When going to the admin page, I keep getting this error: [ERROR]: Unable to parse results from queryads.php: Unhandled error message (). I have performed three "clean" installs, and they all end up this way. Also, I noticed that the FTL service will not run: [ERROR]: Failed to restart pihole-FTL.service: Unit pihole-FTL.service failed to load: No such file or directory.

Debug Token:

ktc76swmao

What is the output of these commands?

sudo service dnsmasq status
sudo service pihole-FTL status
pihole -g
pihole -q github.com

Also, when using the query ads functionality you can only search the block lists for domains, not IP addresses.

Hi Mcat12,
Here you go:

sudo service dnsmasq status 
# sudo service dnsmasq status
* dnsmasq.service - dnsmasq - A lightweight DHCP and caching DNS server
  Loaded: loaded (/lib/systemd/system/dnsmasq.service; enabled)
 Drop-In: /run/systemd/generator/dnsmasq.service.d
          `-50-dnsmasq-$named.conf, 50-insserv.conf-$named.conf
  Active: failed (Result: exit-code) since Fri 2018-01-19 17:35:58 CST; 2 days ago
 Process: 2692 ExecStart=/etc/init.d/dnsmasq systemd-exec (code=exited, status=2)
 Process: 2690 ExecStartPre=/usr/sbin/dnsmasq --test (code=exited, status=0/SUCCESS)

sudo service pihole-FTL status
# sudo service pihole-FTL status
* pihole-FTL.service
  Loaded: not-found (Reason: No such file or directory)
  Active: inactive (dead)

pihole -g
# pihole -g
 [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: No changes detected

 [i] Target: sysctl.org (hosts)
 [✓] Status: No changes detected

 [i] Target: zeustracker.abuse.ch (blocklist.php?download=domainblocklist)
 [✓] Status: No changes detected

 [i] Target: s3.amazonaws.com (simple_tracking.txt)
 [✓] Status: No changes detected

 [i] Target: s3.amazonaws.com (simple_ad.txt)
 [✓] Status: No changes detected

 [i] Target: hosts-file.net (ad_servers.txt)
 [✓] Status: No changes detected

 [✓] Consolidating blocklists
 [✓] Extracting domains from blocklists
 [i] Number of domains being pulled in by gravity: 132849
 [✓] Removing duplicate domains
 [i] Number of unique domains trapped in the Event Horizon: 109727

 [i] Number of blocklist source domains being added to the whitelist: 6
 [i] Number of whitelisted domains: 6
 [✓] Parsing domains into hosts format
 [✓] Cleaning up stray matter
 [✗] Job for dnsmasq.service failed. See 'systemctl status dnsmasq.service' and 'journalctl -xn' for details.
pihole-FTL: no process found

 [✓] DNS service is running
 [✓] Pi-hole blocking is Enabled

# systemctl status dnsmasq.service
* dnsmasq.service - dnsmasq - A lightweight DHCP and caching DNS server
  Loaded: loaded (/lib/systemd/system/dnsmasq.service; enabled)
 Drop-In: /run/systemd/generator/dnsmasq.service.d
          `-50-dnsmasq-$named.conf, 50-insserv.conf-$named.conf
  Active: failed (Result: exit-code) since Mon 2018-01-22 16:06:54 CST; 1min 26s ago
 Process: 17521 ExecStart=/etc/init.d/dnsmasq systemd-exec (code=exited, status=2)
 Process: 17517 ExecStartPre=/usr/sbin/dnsmasq --test (code=exited, status=0/SUCCESS)

pihole -q github.co
# pihole -g github.co
 [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: No changes detected

 [i] Target: sysctl.org (hosts)
 [✓] Status: No changes detected

 [i] Target: zeustracker.abuse.ch (blocklist.php?download=domainblocklist)
 [✓] Status: No changes detected

 [i] Target: s3.amazonaws.com (simple_tracking.txt)
 [✓] Status: No changes detected

 [i] Target: s3.amazonaws.com (simple_ad.txt)
 [✓] Status: No changes detected

 [i] Target: hosts-file.net (ad_servers.txt)
 [✓] Status: No changes detected

 [✓] Consolidating blocklists
 [✓] Extracting domains from blocklists
 [i] Number of domains being pulled in by gravity: 132849
 [✓] Removing duplicate domains
 [i] Number of unique domains trapped in the Event Horizon: 109727

 [i] Number of blocklist source domains being added to the whitelist: 6
 [i] Number of whitelisted domains: 6
 [✓] Parsing domains into hosts format
 [✓] Cleaning up stray matter
 [✗] Job for dnsmasq.service failed. See 'systemctl status dnsmasq.service' and 'journalctl -xn' for details.
pihole-FTL: no process found

 [✓] DNS service is running
 [✓] Pi-hole blocking is Enabled

The last command is supposed to be pihole -q github.com

Does anything change after running pihole -r to repair? (share the output)

Oops,
Sorry about that. Let's try it again:

# pihole -q github.com
grep: blacklist.txt: No such file or directory
 Match found in list.6.hosts-file.net.domains:
   collector-cdn.github.com
   pivotal.github.com

# pihole -r

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


  [✓] Root user check
  [i] Repair option selected
  [✓] Disk space check

  [✓] Update local cache of available packages

  [✓] Checking apt-get for upgraded packages... up to date!

  [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 dnsmasq
  [✓] Checking for dnsutils
  [✓] Checking for iputils-ping
  [✓] Checking for lsof
  [✓] Checking for netcat
  [✓] Checking for sudo
  [✓] Checking for unzip
  [✓] Checking for wget
  [✓] Checking for idn2
  [✓] Checking for lighttpd
  [✓] Checking for php5-common
  [✓] Checking for php5-cgi
  [✓] Checking for php5-sqlite

  [✓] 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] Creating log and changing owner to dnsmasq... log already exists!

  [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 (v2.13.2). Confirming Checksum...
  [i] Checksum correct. No need to download!
  [i] Restarting services...

  [i] Starting dnsmasq service...

Just curious if you were able to determine what is wrong?

Thanks!
Jon

Try these commands:

sudo rm /usr/bin/pihole-FTL
pihole -r
1 Like

Did that and now I get this error when trying to access the admin page:

[ERROR]: Unable to parse results from queryads.php: Unhandled error message ()

Run pihole -d for a debug token.

Done...

Your debug token is: zkpnl7kjbt

Are you using lighttpd as web browser for providing the admin page?

Yes I am; however, I had to change the port to 8080 to avoid a conflict.

Ah, I think the asynchronous script calls expect the API to be always on port 80, I'm not sure if they can handle a non-standard scenario like yours. Maybe @Mcat12 can confirm this.

edit: I just changed my lighttpd installation to port 8080 and restarted the server. I can successfully open the dashboard on http://pi.hole:8080/admin and can also use all functionality, including "Find Ad Domain In Lists"

Can you make a new debug token? (they expire after 48 hours).

Sorry about that... I'll do it when I get home tonight.

Here is the new debug token:

Your debug token is: wdwqntbe4d

What are the contents of this file (if it exists): /var/log/pihole-FTL.log

Unfortunately, there is no pihole-FTL.log

If you're on Stretch (not Jessie), then try updating to Pi-hole 3.3.

Uninstalled old install and installed v3.3, changed the port to 8080, still getting:

[ERROR] There are no domain lists generated lists within /etc/pihole/! Please update gravity by running pihole -g, or repair Pi-hole using pihole -r.