FTL v5.16.2 fails if no IPv6 is available

Hi,

Using pihole for about a year now and working fine.
Today had an update for FTL and went ahead as always

  [✓] Update local cache of available packages
  [i] Existing PHP installation detected : PHP version 8.1.2
  [✓] Checking for git
  [✓] Checking for iproute2
  [✓] Checking for dialog
  [✓] Checking for ca-certificates

  [i] Checking for updates...
  [i] Pi-hole Core:     up to date
  [i] Web Interface:    up to date
  [i] FTL:              update available

  [i] FTL out of date, it will be updated by the installer.

  [✓] Root user check

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

  [i] SELinux not detected
  [✓] Update local cache of available packages
  [i] Existing PHP installation detected : PHP version 8.1.2

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

  [i] Checking for / installing Required dependencies for OS Check...
  [✓] Checking for grep
  [✓] Checking for dnsutils

  [✓] Supported OS detected
  [i] Checking for / installing Required dependencies for this install script...
  [✓] Checking for git
  [✓] Checking for iproute2
  [✓] Checking for dialog
  [✓] Checking for ca-certificates

  [i] Performing unattended setup, no dialogs will be displayed
  [i] Performing reconfiguration, skipping download of local repos
  [✓] Resetting repository within /etc/.pihole...
  [✓] Resetting repository within /var/www/html/admin...
  [i] Checking for / installing Required dependencies for Pi-hole software...
  [✓] Checking for cron
  [✓] Checking for curl
  [✓] Checking for iputils-ping
  [✓] Checking for psmisc
  [✓] Checking for sudo
  [✓] Checking for unzip
  [✓] Checking for idn2
  [✓] Checking for libcap2-bin
  [✓] Checking for dns-root-data
  [✓] Checking for libcap2
  [✓] Checking for netcat-openbsd
  [✓] Checking for procps
  [✓] Checking for lighttpd
  [✓] Checking for php8.1-common
  [✓] Checking for php8.1-cgi
  [✓] Checking for php8.1-sqlite3
  [✓] Checking for php8.1-xml
  [✓] Checking for php8.1-intl

  [✓] Enabling lighttpd service to start on reboot...
  [✓] Checking for user 'pihole'

  [i] FTL Checks...

  [✓] Detected x86_64 processor
  [i] Checking for existing FTL binary...
  [✓] Downloading and Installing FTL
  [✓] 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!
  [✓] Installed /etc/dnsmasq.d/01-pihole.conf
  [✓] Installed /etc/dnsmasq.d/06-rfc6761.conf

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

  [✓] Installing sudoer file

  [✓] Installing latest Cron script

  [i] Installing latest logrotate script...
        [i] Existing logrotate file found. No changes made.
  [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...
  [✓] Enabling pihole-FTL service to start on reboot...
  [✓] Restarting pihole-FTL service...
  [✓] Deleting existing list cache
  [i] Neutrino emissions detected...
  [✓] Pulling blocklist source list into range

  [✓] Preparing new gravity database
  [i] Using libz compression

  [i] Target: https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts
  [✗] Status: Connection Refused
  [✗] List download failed: no cached list available

  [i] Target: https://raw.githubusercontent.com/PolishFiltersTeam/KADhosts/master/KADhosts.txt
  [✗] Status: Connection Refused
  [✗] List download failed: no cached list available

  [i] Target: https://adaway.org/hosts.txt
  [✗] Status: Connection Refused
  [✗] List download failed: no cached list available

  [i] Target: https://v.firebog.net/hosts/AdguardDNS.txt
  [✗] Status: Connection Refused
  [✗] List download failed: no cached list available

  [i] Target: https://raw.githubusercontent.com/anudeepND/blacklist/master/adservers.txt
  [✗] Status: Connection Refused
  [✗] List download failed: no cached list available

  [i] Target: https://s3.amazonaws.com/lists.disconnect.me/simple_ad.txt
  [✗] Status: Connection Refused
  [✗] List download failed: no cached list available

  [i] Target: https://v.firebog.net/hosts/Easylist.txt
  [✗] Status: Connection Refused
  [✗] List download failed: no cached list available

  [i] Target: https://pgl.yoyo.org/adservers/serverlist.php?hostformat=hosts&showintro=0&mimetype=plaintext
  [✗] Status: Connection Refused
  [✗] List download failed: no cached list available

  [i] Target: https://v.firebog.net/hosts/Easyprivacy.txt
  [✗] Status: Connection Refused
  [✗] List download failed: no cached list available

  [i] Target: https://v.firebog.net/hosts/Prigent-Ads.txt
  [✗] Status: Connection Refused
  [✗] List download failed: no cached list available

  [i] Target: https://raw.githubusercontent.com/FadeMind/hosts.extras/master/add.2o7Net/hosts
  [✗] Status: Connection Refused
  [✗] List download failed: no cached list available

  [i] Target: https://raw.githubusercontent.com/crazy-max/WindowsSpyBlocker/master/data/hosts/spy.txt
  [✗] Status: Connection Refused
  [✗] List download failed: no cached list available

  [i] Target: https://hostfiles.frogeye.fr/firstparty-trackers-hosts.txt
  [✗] Status: Connection Refused
  [✗] List download failed: no cached list available

  [i] Target: https://urlhaus.abuse.ch/downloads/hostfile/
  [✗] Status: Connection Refused
  [✗] List download failed: no cached list available

  [i] Target: https://raw.githubusercontent.com/FadeMind/hosts.extras/master/add.Risk/hosts
  [✗] Status: Connection Refused
  [✗] List download failed: no cached list available

  [i] Target: https://bitbucket.org/ethanr/dns-blacklists/raw/8575c9f96e5b4a1308f2f12394abd86d0927a4a0/bad_lists/Mandiant_APT1_Report_Appendix_D.txt
  [✗] Status: Connection Refused
  [✗] List download failed: no cached list available

  [i] Target: https://v.firebog.net/hosts/Prigent-Crypto.txt
  [✗] Status: Connection Refused
  [✗] List download failed: no cached list available

  [i] Target: https://s3.amazonaws.com/lists.disconnect.me/simple_malvertising.txt
  [✗] Status: Connection Refused
  [✗] List download failed: no cached list available

  [i] Target: https://raw.githubusercontent.com/DandelionSprout/adfilt/master/Alternate%20versions%20Anti-Malware%20List/AntiMalwareHosts.txt
  [✗] Status: Connection Refused
  [✗] List download failed: no cached list available

  [i] Target: https://v.firebog.net/hosts/static/w3kbl.txt
  [✗] Status: Connection Refused
  [✗] List download failed: no cached list available

  [i] Target: https://raw.githubusercontent.com/bigdargon/hostsVN/master/hosts
  [✗] Status: Connection Refused
  [✗] List download failed: no cached list available

  [i] Target: https://www.github.developerdan.com/hosts/lists/ads-and-tracking-extended.txt
  [✗] Status: Connection Refused
  [✗] List download failed: no cached list available

  [i] Target: https://www.github.developerdan.com/hosts/lists/tracking-aggressive-extended.txt
  [✗] Status: Connection Refused
  [✗] List download failed: no cached list available

  [i] Target: https://www.github.developerdan.com/hosts/lists/amp-hosts-extended.txt
  [✗] Status: Connection Refused
  [✗] List download failed: no cached list available

  [✓] Creating new gravity databases
  [✓] Storing downloaded domains in new gravity database
  [✓] Building tree
  [✓] Swapping databases
  [✓] The old database remains available.
  [i] Number of gravity domains: 0 (0 unique domains)
  [i] Number of exact blacklisted domains: 0
  [i] Number of regex blacklist filters: 1
  [i] Number of exact whitelisted domains: 2
  [i] Number of regex whitelist filters: 0
  [✗] /usr/local/bin/pihole: line 163: kill: (40557) - No such process
  [✓] Cleaning up stray matter
  [✓] Restarting DNS server

  [✓] FTL is listening on port 
     [✓] UDP (IPv4)
     [✓] TCP (IPv4)
     [✗] UDP (IPv6)
     [✗] TCP (IPv6)

  [✓] Pi-hole blocking is enabled

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

  Current Pi-hole version is v5.11.4
  Current AdminLTE version is v5.13
  Current FTL version is v5.16.2

Upperleft corner shows:

DNS service not running

The web interface is accessible and graphs show NaN, under Settings i see:

There was a problem applying your settings.
Debugging information:
PHP error (2): fsockopen(): Unable to connect to 127.0.0.1:4711 (Connection refused) in /var/www/html/admin/scripts/pi-hole/php/FTL.php:44

Second try after a reboot:

 [✓] Update local cache of available packages
  [i] Existing PHP installation detected : PHP version 8.1.2
  [✓] Checking for git
  [✓] Checking for iproute2
  [✓] Checking for dialog
  [✓] Checking for ca-certificates

  [i] Checking for updates...
fatal: unable to access 'https://github.com/pi-hole/pi-hole.git/': Could not resolve host: github.com
  [i] Pi-hole Core:     up to date
fatal: unable to access 'https://github.com/pi-hole/AdminLTE.git/': Could not resolve host: github.com
  [i] Web Interface:    up to date
  [i] FTL:              update available

  [i] FTL out of date, it will be updated by the installer.

  [✓] Root user check

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

  [i] SELinux not detected
  [✓] Update local cache of available packages
  [i] Existing PHP installation detected : PHP version 8.1.2

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

  [i] Checking for / installing Required dependencies for OS Check...
  [✓] Checking for grep
  [✓] Checking for dnsutils

  [✗] Retrieval of supported OS list failed. dig failed with return code 10. 
      Unable to determine if the detected OS (Ubuntu 22.04) is supported
      Possible causes for this include:
        - Firewall blocking certain DNS lookups from Pi-hole device
        - ns1.pi-hole.net being blocked (required to obtain TXT record from versions.pi-hole.net containing supported operating systems)
        - Other internet connectivity issues

      https://docs.pi-hole.net/main/prerequisites/#supported-operating-systems

      If you wish to attempt to continue anyway, you can try one of the following commands to skip this check:

      e.g: If you are seeing this message on a fresh install, you can run:
             curl -sSL https://install.pi-hole.net | sudo PIHOLE_SKIP_OS_CHECK=true bash

           If you are seeing this message after having run pihole -up:
             sudo PIHOLE_SKIP_OS_CHECK=true pihole -r
           (In this case, your previous run of pihole -up will have already updated the local repository)

      It is possible that the installation will still fail at this stage due to an unsupported configuration.
      If that is the case, you can feel free to ask the community on Discourse with the Community Help category:
      https://discourse.pi-hole.net/c/bugs-problems-issues/community-help/


  Unable to complete update, please contact Pi-hole Support

Tried to use the upload debug function but off course it failed.

   * The debug log can be uploaded to tricorder.pi-hole.net for sharing with developers only.
[i] Debug script running in automated mode
    * Using curl for transmission.
    * curl failed, contact Pi-hole support for assistance.
    * Error message: curl: (6) Could not resolve host: tricorder.pi-hole.net

Any help appreciated,
Thanks

Temporarily reset the nameserver for the Pi so it can resolve internet domains.

sudo nano /etc/resolv.conf

Edit nameserver 127.0.0.1 to nameserver 9.9.9.9 or your preferred third party DNS service, save and exit

Run pihole -up

Hi,

Thanks, that makes DNS work.

  [✓] Update local cache of available packages
  [i] Existing PHP installation detected : PHP version 8.1.2
  [✓] Checking for git
  [✓] Checking for iproute2
  [✓] Checking for dialog
  [✓] Checking for ca-certificates

  [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!

However the situation has not changed apart from DNS now working.
Graphs not working.

There was a problem applying your settings.
Debugging information:
PHP error (2): fsockopen(): Unable to connect to 127.0.0.1:4711 (Connection refused) in /var/www/html/admin/scripts/pi-hole/php/FTL.php:44

Line 44:

$socket = @fsockopen($address, $port, $errno, $errstr, 1.0);

Thanks.

Please upload a debug log and post just the token URL that is generated after the log is uploaded by running the following command from the Pi-hole host terminal:

pihole -d

or do it through the Web interface:

Tools > Generate Debug Log

https://tricorder.pi-hole.net/dFjjBEP7/

A post was split to a new topic: Problems with FTL 5.16.2 update

FTL is running but it looks like it could not bind to port 53 nor 4711

*** [ DIAGNOSING ]: Ports in use
    udp:127.0.0.1:5350 is in use by dnscrypt-proxy
[✓] tcp:0.0.0.0:80 is in use by lighttpd
    tcp:0.0.0.0:22 is in use by sshd
    tcp:127.0.0.1:9050 is in use by tor
    tcp:127.0.0.1:5350 is in use by dnscrypt-proxy

However

   [2022-08-18 23:02:29.796 3147M] Successfully accessed setupVars.conf
   [2022-08-18 23:02:29.798 3147M] listening on 0.0.0.0 port 53
   [2022-08-18 23:02:29.814 3147M] listening on :: port 53
   [2022-08-18 23:02:29.819 3151M] PID of FTL process: 3151
   [2022-08-18 23:02:29.819 3151M] Listening on port 4711 for incoming IPv4 telnet connections
   [2022-08-18 23:02:29.826 3151M] Error opening IPv6 telnet socket: Address family not supported by protocol (97)

Some more info:

[sudo] password for pippin: 
Netid              State               Recv-Q              Send-Q                            Local Address:Port                             Peer Address:Port              Process                                              
udp                UNCONN              0                   0                                     127.0.0.1:5350                                  0.0.0.0:*                  users:(("dnscrypt-proxy",pid=620,fd=6))             
tcp                LISTEN              0                   1024                                    0.0.0.0:80                                    0.0.0.0:*                  users:(("lighttpd",pid=742,fd=4))                   
tcp                LISTEN              0                   128                                     0.0.0.0:22                                    0.0.0.0:*                  users:(("sshd",pid=741,fd=3))                       
tcp                LISTEN              0                   4096                                  127.0.0.1:9050                                  0.0.0.0:*                  users:(("tor",pid=668,fd=6))                        
tcp                LISTEN              0                   4096                                  127.0.0.1:5350                                  0.0.0.0:*                  users:(("dnscrypt-proxy",pid=620,fd=7))             
tcp                ESTAB               0                   0                                192.168.60.250:22                             192.168.60.240:54958              users:(("sshd",pid=907,fd=4),("sshd",pid=806,fd=4))

No sign of 4711and 53.....

kirenida post was moved but similar problem with permission...?
My log shows:

   [2022-08-18 19:54:58.772 774M] WARNING: Unable to remove PORT file: Permission denied
   [2022-08-18 19:54:58.773 774M] WARNING: Unable to remove PID file: Permission denied

This should be harmless and does not explain the issue you experience. The fix for this warning is already part of the next Pi-hole version

I think that I'm seeing this problem as well. Question to OP: Is FTL actually running?

When I send

sudo systemctl start pihole-FTL.service

there is no response, like a good little daemon. Then...nothing.

ps ax | grep FTL

comes back with only the query itself.

I just don't think that FTL is running on my system. (At least, I can't prove that it is.) If it's silently failing, then it would, AFAIK, explain everything.

In my log, the last log that I see from the startup process is:

 Started LSB: pihole-FTL daemon

Sending a restart signal inserts a

 Not running

at the beginning at the beginning of the process, which I think supports my idea.

By the way, I just checked my apt log, and Ubuntu pushed a libunbound8 update that I upgraded to just before pihole blew up. I have no idea if it's relevant, but it's worth mentioning.

After a systemctl restart the FTL.log says 53 and 4711 is listened on.
Fact is it is not according to ss and htop.

I'm having the same problem:
I did an update and now get:

 Error
There was a problem applying your settings.
Debugging information:
PHP error (2): fsockopen(): unable to connect to 127.0.0.1:4711 (Connection refused) in /var/www/html/admin/scripts/pi-hole/php/FTL.php:44 

FTL is not running

pi@raspberrypi:~ $ pihole -up
  [✓] Update local cache of available packages
  [i] Existing PHP installation detected : PHP version 7.4.30
  [✓] Checking for git
  [✓] Checking for iproute2
  [✓] Checking for dialog
  [✓] Checking for ca-certificates

  [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@raspberrypi:~ $ ps ax | grep FTL
   1290 pts/0    S+     0:00 grep --color=auto FTL

My debug log:
https://tricorder.pi-hole.net/AEaaY9Ng/

Found this issue on github, enabling ipv6 in /boot/cmdline.txt and restarting seems to fix the issue.

Having this same issue, but following these steps to enable ipv6 isn't resolving it for me yet. I can't confirm that I've gotten IPv6 turned on, since I'm not using it on my network.

1 Like

Ok,

After disabling ipv6 in
sudo nano /etc/default/grub
and doing
sudo update-grub
sudo reboot
it seems to work again.

We found the reason why it's failing when no IPv6 is available. We'll prepare a fix for this.

3 Likes

This worked perfectly on Ubuntu Server 20.04, thanks!

Please try if

pihole checkout ftl fix/no_telnet_is_okay

resolves the issue for you. We still expect an error getting into your log but FTL won't fail hard at this point - but simply accept it cannot serve the API on IPv6.

We can quickly release a v5.16.3 if the fix is confirmed to be sufficient.

I can confirm this has fixed the issue on raspberry pi.