Lost connection to API after power cycle

Edit: After a power cycle PiHole FTL is not running and clients can't connect to the Internet through the PiHole.

Edit2: The RPi serves PiHole, Domoticz and Dashticz (the last one in a container I believe). No other functions on the device. PiHole is setup as DNS and DHCP server for my network.

Expected Behaviour:

FTL running. Clients getting an IP address from DHCP (configured in Pihole)

Actual Behaviour:

FTL is not running and clients can't get a valid address (all in 169 range)

Debug Token:

8rnjdpiu34

Tried a number of commands after reading a number of threads but can't find a solution. Help is really (really! :slight_smile:) appreciated!

pi@RPi3:~ $ sudo service dnsmasq status
● dnsmasq.service - dnsmasq - A lightweight DHCP and caching DNS server
   Loaded: loaded (/lib/systemd/system/dnsmasq.service; disabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Fri 2019-12-27 13:01:11 CET; 31min ago
  Process: 4571 ExecStart=/etc/init.d/dnsmasq systemd-exec (code=exited, status=2)
  Process: 4568 ExecStartPre=/usr/sbin/dnsmasq --test (code=exited, status=0/SUCCESS)
      CPU: 71ms

Dec 27 13:01:11 RPi3 systemd[1]: Starting dnsmasq - A lightweight DHCP and caching DNS server...
Dec 27 13:01:11 RPi3 dnsmasq[4568]: dnsmasq: syntax check OK.
Dec 27 13:01:11 RPi3 dnsmasq[4571]: dnsmasq: failed to create listening socket for port 53: Address already in use
Dec 27 13:01:11 RPi3 systemd[1]: dnsmasq.service: Control process exited, code=exited status=2
Dec 27 13:01:11 RPi3 systemd[1]: Failed to start dnsmasq - A lightweight DHCP and caching DNS server.
Dec 27 13:01:11 RPi3 systemd[1]: dnsmasq.service: Unit entered failed state.
Dec 27 13:01:11 RPi3 systemd[1]: dnsmasq.service: Failed with result 'exit-code'.

pi@RPi3:~ $ sudo service pihole-FTL status
● pihole-FTL.service - LSB: pihole-FTL daemon
   Loaded: loaded (/etc/init.d/pihole-FTL; generated; vendor preset: enabled)
   Active: active (exited) since Fri 2019-12-27 13:22:58 CET; 10min ago
     Docs: man:systemd-sysv-generator(8)
  Process: 5683 ExecStop=/etc/init.d/pihole-FTL stop (code=exited, status=0/SUCCESS)
  Process: 5689 ExecStart=/etc/init.d/pihole-FTL start (code=exited, status=0/SUCCESS)
      CPU: 249ms

Dec 27 13:22:57 RPi3 systemd[1]: Starting LSB: pihole-FTL daemon...
Dec 27 13:22:57 RPi3 pihole-FTL[5689]: Not running
Dec 27 13:22:58 RPi3 su[5716]: Successful su for pihole by root
Dec 27 13:22:58 RPi3 su[5716]: + ??? root:pihole
Dec 27 13:22:58 RPi3 su[5716]: pam_unix(su:session): session opened for user pihole by (uid=0)
Dec 27 13:22:58 RPi3 pihole-FTL[5689]: dnsmasq: failed to create listening socket for port 53: Address already in use
Dec 27 13:22:58 RPi3 systemd[1]: Started LSB: pihole-FTL daemon.

pi@RPi3:~ $ 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 0.0.0.0:80              0.0.0.0:*               LISTEN      1890/lighttpd       
tcp        0      0 169.254.14.66:53        0.0.0.0:*               LISTEN      499/named           
tcp        0      0 169.254.154.166:53      0.0.0.0:*               LISTEN      499/named           
tcp        0      0 172.17.0.1:53           0.0.0.0:*               LISTEN      499/named           
tcp        0      0 192.168.16.115:53       0.0.0.0:*               LISTEN      499/named           
tcp        0      0 127.0.0.1:53            0.0.0.0:*               LISTEN      499/named           
tcp6       0      0 :::80                   :::*                    LISTEN      1890/lighttpd       
tcp6       0      0 :::53                   :::*                    LISTEN      499/named           
udp        0      0 169.254.14.66:53        0.0.0.0:*                           499/named           
udp        0      0 169.254.154.166:53      0.0.0.0:*                           499/named           
udp        0      0 172.17.0.1:53           0.0.0.0:*                           499/named           
udp        0      0 192.168.16.115:53       0.0.0.0:*                           499/named           
udp        0      0 127.0.0.1:53            0.0.0.0:*                           499/named           
udp6       0      0 :::53                   :::*                                499/named           

pi@RPi3:~ $ sudo service dnsmasq restart
Job for dnsmasq.service failed because the control process exited with error code.
See "systemctl status dnsmasq.service" and "journalctl -xe" for details.

pi@RPi3:~ $ sudo service pihole-FTL restart
pi@RPi3:~ $ [no output is given]

Have rebooted the device but that didn't help.

Also tried sudo pihole -r and ran both options (repair and reconfigure). Both did not solve my issue.

TIA

Greetz,

Sjonnie

EDIT3: Read rest of thread if you have a problem executing the proposed answer

The process "named", which is likely BIND, is running on port 53. You will need to stop and disable that process and restart FTL.

The dnsmasq process should not be running as a separate instance, as dnsmasq is embedded in FTL.

Hi jfb,

Tx for your reply!

Noob question (and for prosperity :slight_smile:): How do I stop bind? I tried to search for it but haven't found an answer (that I understood :frowning:).

EDIT: I tried sudo systemctl stop bind9.service but then DNS service in PiHole is de-activated :thinking:

TIA

Greetz,

Sjonnie

Hi jfb,

Thank you for your continued support!

I believe the solution from the referred thread has not worked for me:

pi@RPi3:~ $ sudo lsof -i :53
COMMAND  PID USER   FD   TYPE DEVICE SIZE/OFF NODE NAME
named   6503 bind   21u  IPv6  40529      0t0  TCP *:domain (LISTEN)
named   6503 bind   22u  IPv4  40533      0t0  TCP localhost:domain (LISTEN)
named   6503 bind   23u  IPv4  40535      0t0  TCP 192.168.16.115:domain (LISTEN)
named   6503 bind   24u  IPv4  40537      0t0  TCP 172.17.0.1:domain (LISTEN)
named   6503 bind   25u  IPv4  40539      0t0  TCP RPi3.local:domain (LISTEN)
named   6503 bind   26u  IPv4  40541      0t0  TCP RPi3.local:domain (LISTEN)
named   6503 bind  512u  IPv6  40528      0t0  UDP *:domain 
named   6503 bind  513u  IPv6  40528      0t0  UDP *:domain 
named   6503 bind  514u  IPv4  40532      0t0  UDP localhost:domain 
named   6503 bind  515u  IPv4  40532      0t0  UDP localhost:domain 
named   6503 bind  516u  IPv4  40534      0t0  UDP 192.168.16.115:domain 
named   6503 bind  517u  IPv4  40534      0t0  UDP 192.168.16.115:domain 
named   6503 bind  518u  IPv4  40536      0t0  UDP 172.17.0.1:domain 
named   6503 bind  519u  IPv4  40536      0t0  UDP 172.17.0.1:domain 
named   6503 bind  520u  IPv4  40538      0t0  UDP RPi3.local:domain 
named   6503 bind  521u  IPv4  40538      0t0  UDP RPi3.local:domain 
named   6503 bind  522u  IPv4  40540      0t0  UDP RPi3.local:domain 
named   6503 bind  523u  IPv4  40540      0t0  UDP RPi3.local:domain 
pi@RPi3:~ $ sudo systemctl disable bind9
Synchronizing state of bind9.service with SysV service script with /lib/systemd/systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install disable bind9
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
	LANGUAGE = (unset),
	LC_ALL = (unset),
	LC_TIME = "nl_NL.UTF-8",
	LC_MONETARY = "nl_NL.UTF-8",
	LC_ADDRESS = "nl_NL.UTF-8",
	LC_TELEPHONE = "nl_NL.UTF-8",
	LC_NAME = "nl_NL.UTF-8",
	LC_MEASUREMENT = "nl_NL.UTF-8",
	LC_IDENTIFICATION = "nl_NL.UTF-8",
	LC_NUMERIC = "nl_NL.UTF-8",
	LC_PAPER = "nl_NL.UTF-8",
	LANG = "en_GB.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to a fallback locale ("en_GB.UTF-8").
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
	LANGUAGE = (unset),
	LC_ALL = (unset),
	LC_TIME = "nl_NL.UTF-8",
	LC_MONETARY = "nl_NL.UTF-8",
	LC_ADDRESS = "nl_NL.UTF-8",
	LC_TELEPHONE = "nl_NL.UTF-8",
	LC_NAME = "nl_NL.UTF-8",
	LC_MEASUREMENT = "nl_NL.UTF-8",
	LC_IDENTIFICATION = "nl_NL.UTF-8",
	LC_NUMERIC = "nl_NL.UTF-8",
	LC_PAPER = "nl_NL.UTF-8",
	LANG = "en_GB.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to a fallback locale ("en_GB.UTF-8").
pi@RPi3:~ $ sudo service pihole-FTL restart

After that the PiHole web interface shows:

Can you make sense of the above?

TIA

Greetz,

Sjonnie

Weirdest thing! I had to reboot the machine after the above given commands and now PiHole seems to be online again :grin:

Tx again!

Greetz,

Sjonnie

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