Status - DNS service not running but it actually runs

pihole -r

I tried repair. I deeted it all including dependencies and re-installed from scratch.

It wont show enabled.

It does however block ads ...

service pihole-FTL start

Tried that. No effect.

New debug token:

uqgmh1zwz6

Pi-hole Version vDev (FTLDNS, v3.2.1-138-g295ac49) Web Interface Version vDev (FTLDNS, v3.2.1-80-g517fa24) FTL Version vDev (FTLDNS, vDev-a26da52)

Oh, you're running FTLDNS. pihole-FTL takes the place of dnsmasq. Can you make sure:

systemctl status dnsmasq
systemctl stop dnsmasq
systemctl disable dnsmasq
service start pihole-FTL

and also flush your browser cache for any anomalies:

dnsmasq

● dnsmasq.service - dnsmasq - A lightweight DHCP and caching DNS server
Loaded: loaded (/lib/systemd/system/dnsmasq.service; disabled; vendor preset: enabled)
Drop-In: /run/systemd/generator/dnsmasq.service.d
└─50-dnsmasq-$named.conf, 50-insserv.conf-$named.conf
Active: inactive (dead)

Mar 29 18:01:16 MezelBFG10kL systemd[1]: Stopped dnsmasq - A lightweight DHCP and caching DNS server.
Mar 29 18:02:21 MezelBFG10kL systemd[1]: Stopped dnsmasq - A lightweight DHCP and caching DNS server.
Mar 29 18:02:44 MezelBFG10kL systemd[1]: Stopped dnsmasq - A lightweight DHCP and caching DNS server.
Mar 29 18:03:53 MezelBFG10kL systemd[1]: Stopped dnsmasq - A lightweight DHCP and caching DNS server.
Mar 29 18:04:13 MezelBFG10kL systemd[1]: Stopped dnsmasq - A lightweight DHCP and caching DNS server.
Mar 29 18:04:13 MezelBFG10kL systemd[1]: Starting dnsmasq - A lightweight DHCP and caching DNS server...
Mar 29 18:04:13 MezelBFG10kL dnsmasq[10685]: dnsmasq: syntax check OK.
Mar 29 18:04:13 MezelBFG10kL systemd[1]: Started dnsmasq - A lightweight DHCP and caching DNS server.
Mar 30 10:44:06 MezelBFG10kL systemd[1]: Stopping dnsmasq - A lightweight DHCP and caching DNS server...
Mar 30 10:44:06 MezelBFG10kL systemd[1]: Stopped dnsmasq - A lightweight DHCP and caching DNS server.

FTL

● pihole-FTL.service - LSB: pihole-FTL daemon
Loaded: loaded (/etc/init.d/pihole-FTL; bad; vendor preset: enabled)
Active: active (exited) since Fri 2018-03-30 10:44:08 MDT; 4min 0s ago
Docs: man:systemd-sysv-generator(8)

Mar 30 10:44:08 MezelBFG10kL systemd[1]: Starting LSB: pihole-FTL daemon...
Mar 30 10:44:08 MezelBFG10kL pihole-FTL[8991]: Not running
Mar 30 10:44:08 MezelBFG10kL pihole-FTL[8991]: chown: cannot access '/etc/pihole/dhcp.leases': No such file or directory
Mar 30 10:44:08 MezelBFG10kL pihole-FTL[8991]: FTL started!
Mar 30 10:44:08 MezelBFG10kL systemd[1]: Started LSB: pihole-FTL daemon.

Everything looks OK when running the commands and checking dnsmasq and FTL.

One thing that I noticed.

Regardless of the version that I install (master or dev) the installer always shows:

image

pihole status returns:
image

pihole restardns
image
however runnung pihole status shows the above state.

it happens in both dev and master versions.

This is a nuclear option, but I'm just curious if it will work or not.

sudo systemctl stop dnsmasq
sudo service stop pihole-FTL
sudo rm -rf /var/www/html/admin
sudo git clone https://github.com/pi-hole/AdminLTE.git /var/www/html/admin
sudo rm -rf /etc/.pihole
sudo git clone https://github.com/pi-hole/pi-hole.git  /etc/.pihole
cd /var/www/html/admin
echo "FTLDNS" | sudo tee /etc/pihole/ftlbranch
pihole checkout core FTLDNS
pihole checkout web FTLDNS

sudo service pihole-FTL stop :slight_smile:

And that, behaved exactly the same:

image

It installs corectly though.

dnsmasq is dead and FTL is active:

image

however:

and


the DNS queries DO go through the pihole:

If you run this in your terminal:

if (echo > /dev/tcp/localhost/53) >/dev/null 2>&1; then echo "DNS service is running"; else echo "DNS service is NOT running"; fi;

what does it print?

Thanks @DL6ER, I was just about to ping you for some assistance.

I don’t have /tcp/ under dev so this will return that is NOT running.

53 is open

Starting Nmap 7.01 ( https://nmap.org ) at 2018-03-31 07:56 MDT
Nmap scan report for MezelBFG10kL (127.0.0.1)
Host is up (0.00016s latency).
PORT STATE SERVICE
53/tcp open domain

Nmap done: 1 IP address (1 host up) scanned in 0.04 seconds

Have you actually tried it? /dev/{tcp,udp} are only bash internals and do not really exist on the file system... see also

/dev/tcp/host/port
If host is a valid hostname or Internet address, and port is an integer port number or service name, Bash attempts to open the corresponding TCP socket.

/dev/udp/host/port
If host is a valid hostname or Internet address, and port is an integer port number or service name, Bash attempts to open the corresponding UDP socket.

I modified /etc/hosts and changed the 127.0.0.1 to the actual hostname and removed “localhost”

I changed it back. All works as expected

I'm not sure why this would solve things...

I run 2 other pi-holes.
/etc/hosts files on both are modifie to have 127.0.01 to translate into the hostname.

But those are raspberries. This one is ubuntu.

1 Like

Oh yes, if your system doesn't even know how to translate localhost, then it is clear that our test fails. I have not tried this, but would

127.0.0.1 host.name
127.0.0.1 localhost

help? In my imagination this might return the host.name for reverse queries (as it is the first one in the list) while still also describing what localhost should point at.

I did try it but unfortunately (even if it makes sense from a logical standpoint) it does not work. It returns to the same behavior where “Dns service is not running” shows up

I left localhost as localhost.

It might affect (if changed) other stuff that depends on “localhost” too.

Maybe i can change the code to query 127.0.0.1 instead of localhost

127.0.0.1 will always be the loopback