RPi running pihole (+DHCP), unbound, UFW on Raspbian crashing daily

Expected Behaviour:

RPi runs continuously with pihole (+DHCP), unbound, UFW

Actual Behaviour:

RPi crashes once a day (around about the same time in the afternoon)

Debug Token:

cACg5aSb

Crash logs:

$ journalctl --system | tail -n 10000 | grep -B 15  -i '\-\- Boot'
...
--
Dec 31 15:39:29 raspberrypi wpa_supplicant[509]: wlan0: Trying to associate with SSID 'PLUSNET-T53G'
Dec 31 15:39:29 raspberrypi NetworkManager[549]: <info>  [1704037169.4728] device (wlan0): supplicant interface state: scanning -> associating
Dec 31 15:39:29 raspberrypi NetworkManager[549]: <info>  [1704037169.4730] device (p2p-dev-wlan0): supplicant management interface state: scanning -> associating
Dec 31 15:39:32 raspberrypi wpa_supplicant[509]: wlan0: Associated with 10:d7:b0:4c:44:b8
Dec 31 15:39:32 raspberrypi wpa_supplicant[509]: wlan0: CTRL-EVENT-CONNECTED - Connection to 10:d7:b0:4c:44:b8 completed [id=0 id_str=]
Dec 31 15:39:32 raspberrypi wpa_supplicant[509]: wlan0: CTRL-EVENT-SUBNET-STATUS-UPDATE status=0
Dec 31 15:39:32 raspberrypi wpa_supplicant[509]: wlan0: CTRL-EVENT-REGDOM-CHANGE init=COUNTRY_IE type=COUNTRY alpha2=GB
Dec 31 15:39:32 raspberrypi NetworkManager[549]: <info>  [1704037172.1705] device (wlan0): supplicant interface state: associating -> completed
Dec 31 15:39:32 raspberrypi NetworkManager[549]: <info>  [1704037172.1729] device (wlan0): Activation: (wifi) Stage 2 of 5 (Device Configure) successful. Connected to wireless network "PLUSNET-T53G"
Dec 31 15:39:32 raspberrypi NetworkManager[549]: <info>  [1704037172.1738] device (p2p-dev-wlan0): supplicant management interface state: associating -> completed
Dec 31 15:39:32 raspberrypi NetworkManager[549]: <info>  [1704037172.1762] device (wlan0): state change: config -> ip-config (reason 'none', sys-iface-state: 'managed')
Dec 31 15:39:32 raspberrypi NetworkManager[549]: <info>  [1704037172.1853] dhcp4 (wlan0): activation: beginning transaction (timeout in 45 seconds)
Dec 31 15:39:32 raspberrypi avahi-daemon[414]: Joining mDNS multicast group on interface wlan0.IPv6 with address fe80::9c3:df42:1061:86b.
Dec 31 15:39:32 raspberrypi avahi-daemon[414]: New relevant interface wlan0.IPv6 for mDNS.
Dec 31 15:39:32 raspberrypi avahi-daemon[414]: Registering new address record for fe80::9c3:df42:1061:86b on wlan0.*.
-- Boot 3ff21cc3140242dd842cbacd4070a3c1 --
--
Jan 01 15:47:18 raspberrypi NetworkManager[553]: <warn>  [1704124038.4803] device (wlan0): Activation: failed for connection 'PLUSNET-T53G'
Jan 01 15:47:18 raspberrypi NetworkManager[553]: <info>  [1704124038.4820] device (wlan0): state change: failed -> disconnected (reason 'none', sys-iface-state: 'managed')
Jan 01 15:47:18 raspberrypi avahi-daemon[409]: Withdrawing address record for fe80::9c3:df42:1061:86b on wlan0.
Jan 01 15:47:18 raspberrypi avahi-daemon[409]: Leaving mDNS multicast group on interface wlan0.IPv6 with address fe80::9c3:df42:1061:86b.
Jan 01 15:47:18 raspberrypi avahi-daemon[409]: Interface wlan0.IPv6 no longer relevant for mDNS.
Jan 01 15:47:18 raspberrypi NetworkManager[553]: <info>  [1704124038.5141] dhcp4 (wlan0): canceled DHCP transaction
Jan 01 15:47:18 raspberrypi NetworkManager[553]: <info>  [1704124038.5143] dhcp4 (wlan0): activation: beginning transaction (timeout in 45 seconds)
Jan 01 15:47:18 raspberrypi NetworkManager[553]: <info>  [1704124038.5144] dhcp4 (wlan0): state changed no lease
Jan 01 15:47:18 raspberrypi wpa_supplicant[517]: wlan0: CTRL-EVENT-DISCONNECTED bssid=10:d7:b0:4c:44:b8 reason=3 locally_generated=1
Jan 01 15:47:18 raspberrypi wpa_supplicant[517]: wlan0: CTRL-EVENT-DSCP-POLICY clear_all
Jan 01 15:47:18 raspberrypi wpa_supplicant[517]: wlan0: CTRL-EVENT-REGDOM-CHANGE init=CORE type=WORLD
Jan 01 15:47:18 raspberrypi NetworkManager[553]: <info>  [1704124038.5344] device (wlan0): supplicant interface state: completed -> disconnected
Jan 01 15:47:18 raspberrypi NetworkManager[553]: <info>  [1704124038.5346] device (p2p-dev-wlan0): supplicant management interface state: completed -> disconnected
Jan 01 15:47:18 raspberrypi wpa_supplicant[517]: wlan0: CTRL-EVENT-REGDOM-CHANGE init=USER type=COUNTRY alpha2=GB
Jan 01 15:47:19 raspberrypi wpa_supplicant[517]: wlan0: Reject scan trigger since one is already pending
-- Boot b18e495e8d1a4a6ea5d0a6e0c6469a7e --

Notes

I've followed the pi-hole.net setup guides. I've never had dhcpd or openresolv, and it has always been NetworkManager from the start. My ISP does not do IPv6. My router DHCP is off, but I can't turn off DNS. Pi IP is within the routers range, pihole's DHCP leasing range is 200-250.

Some kind of network management issue is crashing the Pi. I have WifFi power saving off.

Any tips to investigate most welcome! Thanks.

Neither your debug log nor the log excerpts you've shared above contain hints of Pi-hole crashing.

In fact, I do not see any signs of a crash at all.

What makes you think that your system is suffering from crashes?
Why do you suspect that Pi-hole would be involved?

1 Like

Pihole is running the DHCP, and I've set up using bare Raspbian and the guides at pi-hole.net. It's the RPi that's crashing, during some kind of DHCP transaction.

From above it appears your Raspi is still configured to acquire IP details via DHCP.
If the Raspi is going to act as the DHCP server for your LAN, it should be configured with static IP details instead of depending on a DHCP server.
Can run below to configure static IP details manually:

sudo nmtui

Afterwards, below one should return "manually":

nmcli -f ipv4.method con show "$(nmcli -t -f name con show --active)"

1 Like

@deHakkelaar thanks a lot. That makes sense. Probably around the same time as the old lease issued by the router's DHCP runs out. Doh.

I think because I didn't have dhcpcd5 or /etc/dhcpcd.conf I skipped the static IP step in the pi-hole.net prerequisites; my mistake!

I have applied and confirmed the changes in NetworkManager, and rebooted (and confirmed they are persistent). Should be working now.

Thanks again :slight_smile:

1 Like

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