FTL is offline after update to 4.0

v4-0

#21

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


#22

@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:


#23

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


#24
chown pihole:pihole /var/lib/misc/dnsmasq.leases
chown: changing ownership of '/var/lib/misc/dnsmasq.leases': Operation not permitted

#25
grep -v '#\|^$' -R /etc/dnsmasq
grep: /etc/dnsmasq: No such file or directory

#26

Try running the command via sudo


#27

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.*


FTL offline and pihole not blocking ads
No DNS resolution after apt-get upgrade (openhabian)
#28

I uninstall RaspAP and now no internet connection :frowning:
so i have to reinstall from stretch iso again :sob:
I will try to install pihole first and second RasAP

thx for your assistance and hopefully it works afterwards


#29

Dont give up … your that close and almost an expert now :wink:


#30

never … :wink:
step by step ,
I will buy a raspberry in addition to try independently from the fully working version 3.3.1


#31

Complete new installation

  • pihole first --> works
  • second wifi AP --> fail --> no network connection
    other way
  • wifi AP first --> works
  • pihole second --> fail: Error: unable to get latest release location from GitHub --> FTL offline

I have no idea where the solution is.

Edit: Wifi AP and bridge installed from here:


#32

Make sure dnsmasq is not started at boot as pihole-FTL is taking over that part:

sudo systemctl stop dnsmasq

sudo systemctl disable dnsmasq

Confirm 127.0.0.1 is configured as nameserver in below file for the next step:

cat /etc/resolv.conf

Change nameserver in file /etc/resolv.conf from 127.0.0.1 into 8.8.8.8:

sudo sed -i 's/127.0.0.1/8.8.8.8/' /etc/resolv.conf

Repair Pi-hole install:

pihole -r

Check status:

sudo systemctl status pihole-FTL -l

Probably you will experience same error as before in the status output but now you know you can try this:


#33

Output :
grep -v '#\|^$' -R /etc/dnsmasq.* /etc/dnsmasq.conf: dhcp-range=192.168.4.20,192.168.4.200,255.255.255.0,24h /etc/dnsmasq.conf:conf-dir=/etc/dnsmasq.d /etc/dnsmasq.conf.orig:dhcp-mac=set:client_is_a_pi,B8:27:EB:*:*:* /etc/dnsmasq.conf.orig:dhcp-reply-delay=tag:client_is_a_pi,2 /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=77.109.148.137 /etc/dnsmasq.d/01-pihole.conf:server=146.185.167.43 /etc/dnsmasq.d/01-pihole.conf:interface=eth0

All the steps are done.
Unfortunately FTL is still offline

sudo systemctl status pihole-FTL -l ● pihole-FTL.service - LSB: pihole-FTL daemon Loaded: loaded (/etc/init.d/pihole-FTL; generated; vendor preset: enabled) Active: active (exited) since Thu 2018-08-23 22:31:32 CEST; 12min ago Docs: man:systemd-sysv-generator(8) Process: 437 ExecStart=/etc/init.d/pihole-FTL start (code=exited, status=0/SUCCESS) CGroup: /system.slice/pihole-FTL.service

Aug 23 22:31:28 matrix-revolutions systemd[1]: Starting LSB: pihole-FTL daemon... Aug 23 22:31:28 matrix-revolutions pihole-FTL[437]: Not running Aug 23 22:31:29 matrix-revolutions pihole-FTL[437]: chown: Zugriff auf '/etc/pihole/dhcp.leases' nicht möglich: Datei Aug 23 22:31:29 matrix-revolutions pihole-FTL[437]: /etc/resolvconf/update.d/libc: Warning: /etc/resolv.conf is not a Aug 23 22:31:29 matrix-revolutions su[569]: Successful su for pihole by root Aug 23 22:31:29 matrix-revolutions su[569]: + ??? root:pihole Aug 23 22:31:29 matrix-revolutions su[569]: pam_unix(su:session): session opened for user pihole by (uid=0) Aug 23 22:31:32 matrix-revolutions pihole-FTL[437]: dnsmasq: failed to bind DHCP server socket: Address already in us Aug 23 22:31:32 matrix-revolutions systemd[1]: Started LSB: pihole-FTL daemon.


#34

Can you run below one and post results here to see which daemon/program binded to that socket (IP + port 67 UDP) before pihole-FTL was able to:

sudo netstat -nltup | grep 'Proto\|:53 \|:67 \|:80 \|:471'

If you find the daemon thats listening on port 67 UDP, you can try google how to stop and disable it for Linux systemd systems.

And restart:

sudo systemctl restart pihole-FTL

sudo systemctl status pihole-FTL -l

Below is how it should look:

pi@noads:~ $ sudo netstat -nltup | grep 'Proto\|:53 \|:67 \|:80 \|:471'
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0 127.0.0.1:4711          0.0.0.0:*               LISTEN      20855/pihole-FTL
tcp        0      0 0.0.0.0:80              0.0.0.0:*               LISTEN      8101/lighttpd
tcp        0      0 0.0.0.0:53              0.0.0.0:*               LISTEN      20855/pihole-FTL
tcp6       0      0 ::1:4711                :::*                    LISTEN      20855/pihole-FTL
tcp6       0      0 :::80                   :::*                    LISTEN      8101/lighttpd
tcp6       0      0 :::53                   :::*                    LISTEN      20855/pihole-FTL
udp        0      0 0.0.0.0:53              0.0.0.0:*                           20855/pihole-FTL
udp        0      0 0.0.0.0:67              0.0.0.0:*                           20855/pihole-FTL
udp6       0      0 :::53                   :::*                                20855/pihole-FTL

#35

udp 0 0 0.0.0.0:67 0.0.0.0:* 4697/dnsmasq
I don’t know what to do ,
sorry I’m a newbie


#36

Whats output for:

sudo systemctl status dnsmasq -l

Did you run below ones to make sure dnsmasq doesnt get started ?

sudo systemctl stop dnsmasq

sudo systemctl disable dnsmasq


#37

wow after restart FTL is working
but …
no blocking no queries … :frowning:


#38

First get ride of above setting as it doesnt belong to Pi-hole and might conflict with other Pi-hole settings.
Edit the file /etc/dnsmasq.conf and remove or hash out the dhcp-range= line.

Restart FTL and check again:

sudo systemctl restart pihole-FTL

sudo systemctl status pihole-FTL -l

Next setup the routers DHCP server settings like described on below FAQ (methode 1 or 2):

Or if settings lacking or not exposed on the router, configure Pi-hole to do DHCP for your network instead of the router:

Testing DNS resolution and blocking can be done with below one on one of your client PC’s (Linux, Windows or Mac):

nslookup pi.hole <PIHOLE_IP_ADDRESS>

Below an example from one of my clients with 10.0.0.2 being my Pi-hole IP:

C:\>nslookup pi.hole 10.0.0.2
Server:  noads.dehakkelaar.nl
Address:  10.0.0.2

Name:    pi.hole
Address:  10.0.0.2

Or a naughty domain getting redirected to 0.0.0.0:

C:\>nslookup doubleclick.com 10.0.0.2
Server:  noads.dehakkelaar.nl
Address:  10.0.0.2

Name:    doubleclick.com
Addresses:  ::
          0.0.0.0

Above nsloolups should generate stats on the Pi-hole web GUI.


#39

Solved by new installation of Stretch, RasAP and Pihole with additional following commands:
pihole -r #Repair
sudo touch /var/lib/misc/dnsmasq.leases
sudo chown pihole:pihole /var/lib/misc/dnsmasq.leases
reboot

Many thanks for your help :slight_smile:


#40

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