Pi Hole freezes in dhcp mode

Hello,

I tried to setup a pihole on my smart mirror last weekend but haven't been to successfull so far.
I installed pi hole on my Raspberry Pi 4 following this guide: https://www.smarthomebeginner.com/pi-hole-setup-guide/
As I am using a Unitymedia Connect Box (a German provider's hardware which does not allow custom DNS Server setup), I want to use the pihole as DHCP server. The pi is connected to the router via wlan (as it sits inside my smartmirror). Apart from the MagicMirror² software and some node red flows to control the LEDs behind my TV, there is nothing else running on this pi.
Once I disable the router's DCHP and activate it on the pihole, the system works fine for between 1 and 30 mins (showing max. temperatures of 55 °C in the pihole dashboard). Afterwards it freezes, I am not able to logon into the pihole admin panel and my devices loose connection.
As soon as i enable the router's DHCP again, the systems is accessible after a couple of minutes again. Sometimes I was not able to accesss the router settings as my computer lost connection immediately and I had to reset the router.

The debug token is: https://tricorder.pi-hole.net/hoe0eanjb0
(generated in a time window where the system worked as intended)

Thanks a lot for your help!
Voltfest

Your Pi-hole is lacking proper network integration:

*** [ DIAGNOSING ]: Networking
[✗] No IPv4 address(es) found on the eth0 interface.
[✗] No IPv6 address(es) found on the eth0 interface.

This may cause Pi-hole to fail offering IP addresses over its wlan0 interface:

*** [ DIAGNOSING ]: Pi-hole log
-rw-r--r-- 1 pihole pihole 617804 Nov  1 13:13 /var/log/pihole.log
   -----head of pihole.log------
   Nov  1 11:51:48 dnsmasq-dhcp[675]: DHCP, IP range 192.168.0.50 -- 192.168.0.251, lease time 1h
   Nov  1 11:51:57 dnsmasq-dhcp[675]: no address range available for DHCP request via wlan0

You should run

pihole -r

and choose Reconfigure to have Pi-hole listening on the correct interface.

Also note that your DHCP lease time of one hour will cause a flood of DHCP requests roughly every 30 minutes. Consider setting that to a higher value. Pi-hole's default of one day will do.

Hello Bucking Horn,

thanks for the quick answer, so far it is working fine!
It seems that I didn't use spacebar to check my selection using the wlan interface in the setup process.
I also increased the lease time, 1 hour was my router's standard setup.

New debug log (in case there will be future issues) is: https://tricorder.pi-hole.net/sdaf4tyd86

Thumbs up for the debug log, it's looking normal now. :+1:

Note that debug logs are auto-removed after 48 hours, so you may be asked for another token when you run into issues at a later time.

Also, please consider opening a new topic if those issues don't seem related to your initial DHCP issues, and mark this one as solved if it is respectively.

Keeping topics focussed will help other readers to find relevant information in relevant topics more easily.

Hello Bucking Horn,

unfortunately the system froze again, I couldn't reach the pihole's admin page via the pi's ip adress and none of my devices could reach new web pages (existing connections remained), the mirror screen remained responsive though.
I could resolve this by reactivating the dhcp server on my router, after a couple of seconds I could reach the admin page and deactivate the pihole dhcp.

Do you have further ideas what to do?

Are your devices connected to another network segment or a different subnet?

I have a DLAN adapter which serves as main wifi access point in the living room for 5 GHz and 2.4 GHz, but devices may as well connect to the router's 2.4 GHz access point. The 5 GHz network has a different SSID than the 2.4 GHz network.

Does that DLAN access point run its own DHCP server?

If so, what's its current configuration?

And can it be configured to relay DHCP to a specific host, i.e. Pi-hole?

There is no option for DHCP in the settings of the tpPLC software (Using TL-WPA8630P Kit v2), but I found a thread saying that there seems to be DHCP functionality: TL-WPA8630P v2 Acting as DHCP server- how do I turn it off - Home Network Community

Setting the DLAN's IP to static did not solve the problem as supposed in some forums, the pihole froze again. Next I will try to run the system without DLAN at all to check if thats the source.

I also see a annormaly here, idk if this could also be part of the problem?

D8:F1:5B shows up as Espressif, not Samsung.
May just be the chip used in your TV, but still: Can you confirm that the D8:F1:5B MAC actually belongs to your Samsung TV?

That's a good idea to preclude it's your AP causing problems.

Hi, thanks for the answer.
The MAC belongs to the LED Controller behind my TV, sorry for the misleading name. I just restartet the controller and it got the assigned static ip, so no more worries regarding this.
I will try the dlan-free setup this evening.

Okay running the pihole without dlan did not help, I had to reset the router almost instantly. I don't understand the pattern when I get kicked out of the network so I don't reach the router's config page and when not though.

We could try to take a closer look at what's happening with your DHCP requests.

Create a custom configuration file for dnsmasq at /etc/dnsmasq.d/42-log-dhcp.conf containing the following line:

log-dhcp

To activate that option, run the following command

pihole restartdns

Then try to connect a DHCP client.

This would allow you to see more verbose DHCP related messages, e.g. to see them as they are happening:

tail -n 10 -F /var/log/pihole.log | grep dhcp

Or to search at a later time:

grep -n "dhcp" /var/log/pihole.log

Hi BuckingHorn,

thanks again for your message. I've jsut seen in another thread that you're german as well, but lets continue in english anyways so other people can benefit from your help, too.

So I've followed your steps. How can I check if it is working as intended? If I'm right, the next step would be to disable the router DHCP, wait for the freeze and check pihole.log for the last entries before it froze?

Yes, and please share the grep output here.

Okay so at 14:45 I disabled my router's DHCP and enabled the pihole's.
At 15:48 I realized that the pihole's admin page is not reachable anymore and my VNC didn't connect. I enabled my router's DHCP and waited for the VNC to connect again, afterwards I extracted the following log:
log.txt (89 KB)

Token is: https://tricorder.pi-hole.net/ajciha7cjy

Your DHCP log shows that only four clients successfully requested an IPv4 address:

55417:Nov  7 15:06:41 dnsmasq-dhcp[14377]: 931615095 DHCPACK(wlan0) 192.168.0.73
61372:Nov  7 15:28:01 dnsmasq-dhcp[14377]: 915842021 DHCPACK(wlan0) 192.168.0.107
61586:Nov  7 15:29:07 dnsmasq-dhcp[14377]: 3662234458 DHCPACK(wlan0) 192.168.0.30
64158:Nov  7 15:41:22 dnsmasq-dhcp[14377]: 3249465666 DHCPACK(wlan0) 192.168.0.136 

Does that fit the number of clients on your network?

What client did you use to monitor your Pi-hole's connectivity?
Is it among the clients that requested a lease?

Also, your log doesn't show any DHCP activity between 15:47:43 (line 65178) and 15:49:27 (line 65362). Do the lines in between contain any hints to a possible cause?

If you want to upload the complete log without making it public here, you can do so by executing:

cat /var/log/pihole.log | pihole tricorder

or substitute with any relevant other file, and then post the token(s) here.
(see also How do I debug my Pi-hole installation? for other ways - apologies for not mentioning this earlier).

No, it should be more. There are at least my computer and my mobile missing which have been active during this time and with which I have accessed the pihole admin page (could I access it from outside my network?). I've set my pc and my tv to use the raspberry's IP as DNS server, the tv is among the devices, the pc is not.
Also, in pihole's DHCP settings in the list of currently active DHCP leases, I see the DLAN adapter which was active during the time but its IP is not among those four. Further I see IPv4 and IPv6 adresses for some of my devices in this list.
grafik
The 192.168.0.136's name is unknown, there are two further IPs like this in the list.
I've uploaded the whole log file here: https://tricorder.pi-hole.net/t1mgqycn9c
To me there was nothing noticeable in this timeframe but maybe I missed something?