After reboot of PI3, pihole is always 'disabled'

PIhole V5 installed on a standard raspbian PI 3. set as DHCP and DNS. A FTTH router is set as gateway with DHCP disabled. I have a few DHCP reservations (NAS, PI2, PI3, APs)

After a power cut-off, PI3 start with PIHOLE running in disabled mode. DNS service not running, FTL offline. sending a reboot command through ssh also leads to the same situation.
Looks like DHCP is not active either, as I have to connect to the network by assigning manually a IP on a laptop to be able to log to the admin console, update gravity, and then it works fine.

I suppose that this is not standard, and the system should be able to support reboot. Didn't find anything like that on this forum, and the logs are not fully clear for me.

thanks

Debug Token:

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

/edit. typos

After a reboot, any errors in

sudo journalctl -u pihole-FTL.service -b

/var/log/pihole-FTL.log ?

sudo reboot
...
pi@pi3:~ $ sudo journalctl -u pihole-FTL.service -b
-- Logs begin at Sat 2020-05-23 11:02:57 BST, end at Sat 2020-05-23 11:05:28 BST. --
-- No entries --

no errors in /var/log/pihole-FTL.log when I manually run the gravity upgrade

after gravity upgrade in the web interface:
-- Logs begin at Sat 2020-05-23 11:02:57 BST, end at Sat 2020-05-23 11:09:04 BST. --
mai 23 11:08:16 pi3 systemd[1]: Starting LSB: pihole-FTL daemon...
mai 23 11:08:16 pi3 pihole-FTL[3345]: Not running
mai 23 11:08:16 pi3 su[3371]: (to pihole) root on none
mai 23 11:08:16 pi3 su[3371]: pam_unix(su:session): session opened for user pihole by (uid=0)
mai 23 11:08:17 pi3 pihole-FTL[3345]: FTL started!
mai 23 11:08:17 pi3 su[3371]: pam_unix(su:session): session closed for user pihole
mai 23 11:08:17 pi3 systemd[1]: Started LSB: pihole-FTL daemon.

Pi-hole does launch on boot, but if the Pi experienced a sudden loss of power there is the potential for file corruption on the SD card, or more commonly, the Pi loses track of time - there is not onboard clock on that device.

From your debug log:

The local web version has been altered. Are these changes for Apache?

*** [ DIAGNOSING ]: Web version
[i] Web: v5.0 (https://discourse.pi-hole.net/t/how-do-i-update-pi-hole/249)
[i] Branch: master
[i] Commit: v5.0-0-gb86e4a3-dirty
[i] Status:  M .github/ISSUE_TEMPLATE.md
             M .github/PULL_REQUEST_TEMPLATE.md
             M .github/workflows/test.yml
             M .gitignore
            ---

Let's take a look at the processes running on ports used by Pi-hole and common add-ons:

sudo netstat -nltup | grep 'Proto\|:53 \|:5053 \|:5353 \|:5335 \|:8953 \|:67 \|:80 \|:471'

and at the pihole-FTL service status:

sudo service pihole-FTL status

Jeedom is also running on the same Raspberry.

1: reboot of the pi

 pi@pi3:~ $ sudo netstat -nltup | grep 'Proto\|:53 \|:5053 \|:5353 \|:5335 \|:8953 \|:67 \|:80 \|:471'
 Proto Recv-Q Send-Q Adresse locale          Adresse distante        Etat        PID/Program name    
 tcp6       0      0 :::80                   :::*                    LISTEN      675/apache2         
 udp   119744      0 0.0.0.0:5353            0.0.0.0:*                           1311/python3        
 udp   119744      0 0.0.0.0:5353            0.0.0.0:*                           1311/python3        
 udp        0      0 0.0.0.0:5353            0.0.0.0:*                           1311/python3        
 udp        0      0 0.0.0.0:5353            0.0.0.0:*                           298/avahi-daemon: r 
 udp6       0      0 :::5353                 :::*                                298/avahi-daemon: r

and

pi@pi3:~ $ sudo service pihole-FTL status
● pihole-FTL.service - LSB: pihole-FTL daemon
   Loaded: loaded (/etc/init.d/pihole-FTL; generated)
   Active: inactive (dead)
     Docs: man:systemd-sysv-generator(8)

if I go to the web admin console, and press ENABLE, it does nothing, FTL is still offline
if I do a gravity update, it's ok, and here's the result of same commands:

 pi@pi3:~ $ sudo netstat -nltup | grep 'Proto\|:53 \|:5053 \|:5353 \|:5335 \|:8953 \|:67 \|:80 \|:471'
 Proto Recv-Q Send-Q Adresse locale          Adresse distante        Etat        PID/Program name    
 tcp        0      0 127.0.0.1:4711          0.0.0.0:*               LISTEN      3396/pihole-FTL     
 tcp        0      0 0.0.0.0:53              0.0.0.0:*               LISTEN      3396/pihole-FTL     
 tcp6       0      0 ::1:4711                :::*                    LISTEN      3396/pihole-FTL     
 tcp6       0      0 :::80                   :::*                    LISTEN      676/apache2         
 tcp6       0      0 :::53                   :::*                    LISTEN      3396/pihole-FTL     
 udp   166272      0 0.0.0.0:5353            0.0.0.0:*                           1392/python3        
 udp   166272      0 0.0.0.0:5353            0.0.0.0:*                           1392/python3        
 udp        0      0 0.0.0.0:5353            0.0.0.0:*                           1392/python3        
 udp        0      0 0.0.0.0:5353            0.0.0.0:*                           333/avahi-daemon: r 
 udp        0      0 0.0.0.0:53              0.0.0.0:*                           3396/pihole-FTL     
 udp6       0      0 :::5353                 :::*                                333/avahi-daemon: r 
 udp6       0      0 :::53                   :::*                                3396/pihole-FTL

and

 pi@pi3:~ $ sudo service pihole-FTL status
 ● pihole-FTL.service - LSB: pihole-FTL daemon
    Loaded: loaded (/etc/init.d/pihole-FTL; generated)
    Active: active (exited) since Sat 2020-05-23 14:44:55 BST; 2min 21s ago
      Docs: man:systemd-sysv-generator(8)
   Process: 3071 ExecStart=/etc/init.d/pihole-FTL start (code=exited, status=0/SUCCESS)
 
 mai 23 14:44:55 pi3 systemd[1]: Starting LSB: pihole-FTL daemon...
 mai 23 14:44:55 pi3 pihole-FTL[3071]: Not running
 mai 23 14:44:55 pi3 su[3096]: (to pihole) root on none
 mai 23 14:44:55 pi3 su[3096]: pam_unix(su:session): session opened for user pihole by (uid=0)
 mai 23 14:44:55 pi3 pihole-FTL[3071]: FTL started!
 mai 23 14:44:55 pi3 su[3096]: pam_unix(su:session): session closed for user pihole
 mai 23 14:44:55 pi3 systemd[1]: Started LSB: pihole-FTL daemon.

I am not familiar with the Jeedom software. Have you ever been able to run Pi-hole alongside that software?

No experience at all :slight_smile:
I installed pi Hole last week. it was running fine, until I had this power cutoff. this happens from time to time. I didn't expect this to be an issue, even if the raspberry boots up far quicker than the nas or even the router.
I don't understand why pi-hole just don't start on boot

I don't see anything in your debug log to account for this, but your recent power cut that intitiated this problem leads me to believe that something is amiss on the SD card.

Run pihole -r and select "repair" and see if this resolves the problem.

there's no issue with the sd card, as the system runs on a ssd. jeedom is not recommended on a sd card.
tried the repair of PI-Hole, and guess what, after a reboot, the system is back up and running !
I guess some step of the initial install failed thus I didn't noticed it.
anyway, thanks a lot, I now have a reliable system. :slight_smile: