Dnsmasq fails to start, FTL Offline

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

Expected Behaviour:

[DNS works, FTL works]

Actual Behaviour:

[DNS fails to startup, FTL Fails to startup]

Debug Token:

[xlnphkqz2w]

Additional info:
OS: Raspberry Pi Desktop

Hi everyone,

I am encountering the following errors based off the title of this thread:

DNS: ran sudo service dnsmasq status:

● dnsmasq.service - dnsmasq - A lightweight DHCP and caching DNS server
Loaded: loaded (/lib/systemd/system/dnsmasq.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Sun 2018-01-07 09:27:28 EST; 36min ago
Process: 5631 ExecStartPre=/usr/sbin/dnsmasq --test (code=exited, status=1/FAILURE)

Jan 07 09:27:28 raspberry systemd[1]: Starting dnsmasq - A lightweight DHCP and caching DNS server...
Jan 07 09:27:28 raspberry dnsmasq[5631]: dnsmasq: bad dhcp-range at line 10 of /etc/dnsmasq.d/piserver
Jan 07 09:27:28 raspberry systemd[1]: dnsmasq.service: Control process exited, code=exited status=1
Jan 07 09:27:28 raspberry systemd[1]: Failed to start dnsmasq - A lightweight DHCP and caching DNS server.
Jan 07 09:27:28 raspberry systemd[1]: dnsmasq.service: Unit entered failed state.
Jan 07 09:27:28 raspberry systemd[1]: dnsmasq.service: Failed with result 'exit-code'.

When looking at line 10 of /etc/dnsmasq.d/piserver:

dhcp-range=tag:piserver,,proxy

I'm guessing I have to edit something in /etc/dnsmasq.conf ? I'm just afraid of turning on dhcp server that I don't want.

As for the FTL offline, I have tried what was suggested in similar topics but it doesn't seem to help:
service pihole-FTL restart
systemctl restart pihole-FTL

I realized while doing a pihole -r (which i've done many times now) is that FTL directory doesn't exist, even when i tried to update pihole -u:
pi@raspberry:~ $ pihole -up

[i] Checking for updates...
[i] Pi-hole Core: up to date
/opt/pihole/update.sh: line 82: /usr/bin/pihole-FTL: No such file or directory
[i] FTL: update available

[i] FTL out of date

[i] FTL Checks...
[✓] Detected x86_64 architecture
[i] Checking for existing FTL binary...
/etc/.pihole/automated install/basic-install.sh: line 1870: /usr/bin/pihole-FTL: No such file or directory
[✓] Downloading and Installing FTL

[i] Web Interface: up to date

I've reinstalled the OS as well. I hope someone could point me in the right direction to fix this! :smile:

That dnsmasq config file is not Pi-hole's. If you don't want it, delete it or move it somewhere else.

What is the output of these commands?

ls -lh /usr/bin/pihole-FTL
file /usr/bin/pihole-FTL
uname -a

I have now moved dnsmasq.conf to a different location.

I figured out the FTL issue (i think). I had to compile FTL from source, based off this thread: Pihole installer: /usr/bin/pihole-FTL No such file or directory - #20 by Mcat12

However, here are the results of the commands:

pi@raspberry:~ $ ls -lh /usr/bin/pihole-FTL
-rwxr-xr-x 1 root root 1.3M Jan 7 11:40 /usr/bin/pihole-FTL
pi@raspberry:~ $ file /usr/bin/pihole-FTL
/usr/bin/pihole-FTL: ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux.so.2, for GNU/Linux 2.6.32, BuildID[sha1]=c75e2cd421947c1ded30b0b5e7668c255cafa923, not stripped
pi@raspberry:~ $ uname -a
Linux raspberry 4.9.0-4-amd64 #1 SMP Debian 4.9.65-3+deb9u1 (2017-12-23) x86_64 GNU/Linux

Is your system 32 or 64 bit? Can you run 64 bit programs?

dpkg --print-architecture
i386

Well, that explains why FTL wasn't working, so the thread I linked to before suggests to compile from source.

However, what should I do about the dnsmasq issue? I moved the conf file. I also did a repair yet again but that ended up messing up FTL. I had to recompile from source again and reboot to fix it.

It sounds like you should reinstall your operating system with the correct architecture.

You should move /etc/dnsmasq.d/piserver, not dnsmasq.conf

1 Like

Thanks!! Moving that file fixed the dnsmasq issue. I removed the file you suggsted, and I moved the dnsmasq.conf back to its original location. Pi-Hole is now functioning correctly.
Yes, I could change the OS to 64 bit (i'll have to see if Raspberry Pi 64bit for Desktop exists..) I hope this thread helps someone who is stuck with old 32-bit only architecture. Thanks again!

How come the "uname -m" command returns "x86_64" for you while on any other Raspberry Pi it should return "armv6l" or "armv7l" ?
Can you post the download link of the Debian version you installed ?
Did you install following some HowTo guide somewhere ?

EDIT: 32 bits old ?
The Raspberry Pi still runs on 32 bits if you read down that ARM wiki :wink: