Pihole running on raspberry pi 3b+ not responding after a week

hi everyone, Josef from Italy... sorry for my bad english :slight_smile:

Expected Behaviour:

pihole should run h24 on my raspberry pi 3b+ with no issue.

Actual Behaviour:

for the second time, after a week of normal operation my pihole stopped working: unable connect via ssh or telnet, no response to ping, of course no admin interface via web nor internet navigation (I'm using pihole both for dns and dhcp).
raspberry is not connected to a screen so I can't see what's going on.
I'm using raspbian 11 bullseye lite version (no graphics interface) and last version of pihole (no other sw installed).
the only way to get pihole working again is shutdown raspberry (manual power cut) and restart it.
I'm using pihole since feb.2023 (two years), never needed to hard reset it in the past...

so the main question is: can I check some log to try to understand where is the problem?
(of course var/log is full of logs.. don't know where to start...)
thank you!!

You could have an SD Card Failing so thats a consideration.

You can use journalctl to look through the logs. This article is a decent primer. To look at a specific date your could use journalctl -S "2025-01-26" just replace the date as needed.

thank you, maybe I'll try to replace SD card; checked the log, some red lines on it, don't know for sure if are related to my problem (I'm not a linux expert...), put them here if someone want to take a look:

Jan 27 18:42:53 Laderhole bluetoothd[637]: profiles/sap/server.c:sap_server_register() Sap driver initialization failed.
Jan 27 18:42:53 Laderhole bluetoothd[637]: sap-server: Operation not permitted (1)
Jan 27 18:42:53 Laderhole systemd[1]: Starting User Runtime Directory /run/user/1000...
Jan 27 18:42:53 Laderhole systemd[1]: Finished User Runtime Directory /run/user/1000.
Jan 27 18:42:53 Laderhole systemd[1]: Starting User Manager for UID 1000...
Jan 27 18:42:53 Laderhole systemd[678]: pam_unix(systemd-user:session): session opened for user laderhole(uid=1000) by >
Jan 27 18:42:53 Laderhole bluetoothd[637]: Failed to set privacy: Rejected (0x0b)



Jan 27 16:01:44 Laderhole dhcpcd[496]: eth0: hardware address a0:ff:0c:8c:45:b6 claims 192.168.1.200
Jan 27 16:01:45 Laderhole dhcpcd[496]: eth0: hardware address a0:ff:0c:8c:45:b6 claims 192.168.1.200
Jan 27 16:01:45 Laderhole dhcpcd[496]: eth0: 10 second defence failed for 192.168.1.200
Jan 27 16:01:45 Laderhole avahi-daemon[355]: Withdrawing address record for 192.168.1.200 on eth0.
Jan 27 16:01:45 Laderhole avahi-daemon[355]: Leaving mDNS multicast group on interface eth0.IPv4 with address 192.168.1>
Jan 27 16:01:45 Laderhole avahi-daemon[355]: Interface eth0.IPv4 no longer relevant for mDNS.
Jan 27 16:01:45 Laderhole dhcpcd[496]: eth0: deleting route to 192.168.1.0/24
Jan 27 16:01:45 Laderhole dhcpcd[496]: eth0: deleting default route via 192.168.1.1
Jan 27 16:01:45 Laderhole dhcpcd[496]: eth0: probing address 192.168.1.200/24
Jan 27 16:01:46 Laderhole dhcpcd[496]: eth0: hardware address a0:ff:0c:8c:45:b6 claims 192.168.1.200
Jan 27 16:01:46 Laderhole dhcpcd[496]: eth0: DAD detected 192.168.1.200

I'm not sure based on what is show but it could be dhcpcd related. Was the 16:01 time frame when it stopped working?

What do you get if you run journalctl -S "2025-01-27" -grep dhcpcd

Your system is probing to assign 192.168.1.200, probably because it has been statically configured for that address.
However, some other equipment (perhaps from Hangzhou Hikvision Digital Technology) already has that address assigned, likely via your router's DHCP server.

Such address conflicts are favoured if you statically assign addresses from within your router's DHCP range, and some other device would miss out to conduct a proper duplicate address detection before accepting a leased address.

If you are able to identify the conflicting device as identified by that MAC, switching it off or having your router assign it a different IP should allow you to start your machine hosting your Pi-hole.

To avoid similar conflicts in the future, you should then either move that .200 IP out of your router's DHCP range, or configure a DHCP lease reservation / fixed IP address of 192.168.1.200 for your Pi-hole machine in your router's DHCP server.

1 Like

dhcp is disabled on my router (iliadbox) and enabled only on pihole; 192.168.1.200 is his static address, and dhcp range is 192.168.1.202 - 192.168.1.222
I have 5 webcam, hikvision is one of them and is connected via wifi and dhcp.
so this conflict is very strange....

I'm not shure on the precise moment pihole stopped working but 16.01 could be right (it was working before to go to work on 8am, not working after 18.00pm when I come home.

journalctl -S "2025-01-27" -grep dhcpcd give an error (dhcpcd: invalid argument)
so I tried with: `journalctl -S "2025-01-27" -u dhcpcd and this is the result:

-- Journal begins at Sun 2023-02-12 18:37:52 CET, ends at Mon 2025-01-27 22:55:12 CET. --
Jan 27 15:35:19 Laderhole dhcpcd[496]: eth0: hardware address a0:ff:0c:8c:45:b6 claims 192.168.1.200
Jan 27 16:01:44 Laderhole dhcpcd[496]: eth0: hardware address a0:ff:0c:8c:45:b6 claims 192.168.1.200
Jan 27 16:01:45 Laderhole dhcpcd[496]: eth0: hardware address a0:ff:0c:8c:45:b6 claims 192.168.1.200
Jan 27 16:01:45 Laderhole dhcpcd[496]: eth0: 10 second defence failed for 192.168.1.200
Jan 27 16:01:45 Laderhole dhcpcd[496]: eth0: deleting route to 192.168.1.0/24
Jan 27 16:01:45 Laderhole dhcpcd[496]: eth0: deleting default route via 192.168.1.1
Jan 27 16:01:45 Laderhole dhcpcd[496]: eth0: probing address 192.168.1.200/24
Jan 27 16:01:46 Laderhole dhcpcd[496]: eth0: hardware address a0:ff:0c:8c:45:b6 claims 192.168.1.200
Jan 27 16:01:46 Laderhole dhcpcd[496]: eth0: DAD detected 192.168.1.200
-- Boot 71edbf8b1bee42e58938deeb0bbe0b84 --
Jan 27 18:42:43 Laderhole systemd[1]: Starting DHCP Client Daemon...
Jan 27 18:42:44 Laderhole dhcpcd[402]: dev: loaded udev
Jan 27 18:42:45 Laderhole dhcpcd[402]: eth0: waiting for carrier
Jan 27 18:42:45 Laderhole dhcpcd[402]: eth0: carrier acquired
Jan 27 18:42:45 Laderhole dhcpcd[402]: DUID 00:01:00:01:2a:be:92:db:b8:27:eb:e7:fa:50
Jan 27 18:42:45 Laderhole dhcpcd[402]: eth0: IAID eb:b2:af:05
Jan 27 18:42:45 Laderhole dhcpcd[402]: eth0: adding address fe80::cf73:e115:c5d5:9826
Jan 27 18:42:45 Laderhole dhcpcd[402]: eth0: probing address 192.168.1.200/24
Jan 27 18:42:45 Laderhole dhcpcd[402]: eth0: soliciting an IPv6 router
Jan 27 18:42:46 Laderhole dhcpcd[402]: eth0: Router Advertisement from fe80::3a07:16ff:fe22:7eb1
Jan 27 18:42:46 Laderhole dhcpcd[402]: eth0: adding address 2a01:e11:603f:c510:cc8:1f83:d3bd:64c2/64
Jan 27 18:42:46 Laderhole dhcpcd[402]: eth0: adding route to 2a01:e11:603f:c510::/64
Jan 27 18:42:46 Laderhole dhcpcd[402]: eth0: adding default route via fe80::3a07:16ff:fe22:7eb1
Jan 27 18:42:50 Laderhole dhcpcd[402]: eth0: using static address 192.168.1.200/24
Jan 27 18:42:50 Laderhole dhcpcd[402]: eth0: adding route to 192.168.1.0/24
Jan 27 18:42:50 Laderhole dhcpcd[402]: eth0: adding default route via 192.168.1.1
Jan 27 18:42:50 Laderhole dhcpcd[402]: forked to background, child pid 530
Jan 27 18:42:50 Laderhole systemd[1]: Started DHCP Client Daemon.
Jan 27 19:11:00 Laderhole dhcpcd[530]: eth0: Router Advertisement from fe80::3a07:16ff:fe22:7eb1

From this it show the duplicate address detection was found at 16.01 ( dhcpcd DAD ) and dhcpcd wasnt back up till 18:42 when you rebooted so your timeline seems right.

@Bucking_Horn suggested, The easist solution is to change the piholes static IP to be outside the range of the leases given by the pihole. IE change from / to range to something that doesn't include the 200 address. As an example, if you choose the pi to hand out leases to 192.168.1.2 to 192.168.1.199 then you're free to assign 200 to 254 for static IPs and you should avoid duplicate address conflicts.

ok, but actually my dhcp pihole range is set from .202 to 222; so pihole current static ip (192.168.1.200) should be already out that range....
anyway I'll change again it (like 192.168.1.10-192.168.1.30 or similar) then I'll see what happens
I confirm that a0:ff:0c:8c:45:b6 is the MAC address of one of my webcams (I'll try to power off it if necessary)

thanks everyone for all suggestions :slight_smile:

With your Pi-hole's DHCP serving a .202 to .222 range, and a device claiming .200, that would suggest that you either configured that .200 statically on that very device or as a static lease via Pi-hole's DHCP server, or that another DHCP server is still active on your network.

Please upload a debug log and post just the token URL that is generated after the log is uploaded by running the following command from the Pi-hole host terminal:

pihole -d

or do it through the Web interface:

Tools > Generate Debug Log

ok, my pihole debug token url: https://tricorder.pi-hole.net/miy1tCDY/
the device (ez-wiz cam model TY2) does not have a static ip option to configure, actually according to pihole is on ip 192.168.1.212 and is working.
pihole dhcp range is 202-222
checked again iliad modem, dhcp disabled, no active leases

https://tricorder.pi-hole.net/TMgYrorl/
new debug today, 2 days ago I changed dhcp interval (now is 205-225)
no other DAD errors for now...
let's see if something change or not.
if you find something wrong in my debug please tell me... thank you

That could suggest your original observation to be caused by your Hikvision (hardware address a0:<redacted> claims 192.168.1.200) holding a DHCP lease from your router, while your RPi 3 had a static IP assigned on device (as it was probing address 192.168.1.200/24).
If your Hikvision now has acquired its new DHCP lease through Pi-hole, your original issue should be solved.

Your debug log shows that now your Pi-hole is the only active DHCP server on the link that your RPi 3 is connected to:

*** [ DIAGNOSING ]: Discovering active DHCP servers (takes 10 seconds)
   Timeout: 10 seconds
   
   * Received 301 bytes from eth0:192.168.1.200
     Offered IP address: 192.168.1.221
     DHCP options:
      Message type: DHCPOFFER (2)
      server-identifier: 192.168.1.200
      dns-server: 192.168.1.200
      domain-name: "pi-hole"
      router: 192.168.1.1
      --- end of options ---

That looks ok.

You have configured Pi-hole for wlan0, but your RPi currently only features an eth0 interface:

*** [ DIAGNOSING ]: Network interfaces and addresses
   1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
       link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
       inet 127.0.0.1/8 scope host lo
          valid_lft forever preferred_lft forever
       inet6 ::1/128 scope host 
          valid_lft forever preferred_lft forever
   2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
       inet 192.168.1.200/24 brd 192.168.1.255 scope global noprefixroute eth0
          valid_lft forever preferred_lft forever
       inet6 2a<redacted>c2/64 scope global dynamic mngtmpaddr noprefixroute 
          valid_lft 86373sec preferred_lft 86373sec
       inet6 fe80::<redacted>26/64 scope link 
          valid_lft forever preferred_lft forever

That won't hurt as long as you keep Pi-hole's Interface settings at Allow only local requests, but to avoid future issues, you want to run pihole -r with Reconfigure and switch to eth0.

Unrelated to your issue, your Pi-hole's group management seems overly complicated.
You have declared 15 groups (renaming the Default group in the process), but all your clients are assigned to either group 7 only (named Free) or the other 14 groups.
In addition, all your whitelist entries are assigned to group 0 only, which may cause unexpected behaviour, as it could leave whitelisted entries blocked for clients that do not have group 0 assigned.

Note that the purpose of groups is to allow client-specific filtering, not grouping adlists by content themes.

You could achieve the same filtering behaviour with a lot less configuration:

  • put all adlists in the Default group (which they would be by -well- default)
  • add a group Free and don't assign any blocklists to it
  • add only those clients that are not to be filtered, assigning them to the Free group exclusively

In that configuration, all clients would be filtered by Pi-hole, unless you've explicitly put them in the Free group, and whitelisted entries would affect all filtering.

thank you for your help... lot of useful info!!
so, let's do a recap...

  1. about my groups: ok, I'll do as you suggested.

  2. about network config: at the start I configured pihole to run on wlan, then switched to ethernet. so this is the reason of my config; anyway, I run pihole-r and it ask me if I want to use ip 192.168.1.200 or I want to change it, I say Yes use it... but it does not ask me to choose eth0 or wlan... only ip address.
    at the end of the process pihole -d give me the same result (you can check it in https://tricorder.pi-hole.net/OMPoPRJp/ )
    lo: interface is still present... I don't know why.
    in my /etc/dhcpcd.conf I have:

interface eth0
static ip_address=192.168.1.200/24
static routers=192.168.1.1
static domain_name_servers=

note: I disabled wifi in /boot/config.txt with
dtoverlay=disable-wifi
(this could be the reason why pihole does not ask me to choose interface?)

thank you!!

If there's only one interface, the installer probably won't present you a choice, but you still have run pihole -r successfully. :wink:

Your previous debug log was:

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

And now your most current one shows:

*** [ DIAGNOSING ]: Networking
[✓] IPv4 address(es) bound to the eth0 interface:
    192.168.1.200/24

So all good, as far as Pi-hole is concerned.

You may want to add DNS servers to your static configuration, perhaps:

static domain_name_servers=127.0.0.1 9.9.9.9

That would have your Pi-hole host machine's DNS requests go to your localhost Pi-hole or a public DNS resolver, which is a good idea to keep on the machine that hosts Pi-hole.
In case Pi-hole should be inoperable at times, that would allow you to still run OS updates as well as Pi-hole's repair scripts.

ok, very good news (I checked the wrong line in the report)!

I also changed my groups (now I have only "Default" an "Free" as suggested)

so, this is my last debug, can you check if it's all ok?
https://tricorder.pi-hole.net/xXjJ2qcU/

then, also added static domain_name_servers=127.0.0.1 9.9.9.9 in my /etc/dhcpcd.conf in case of pihole's crash.

one last thing: incredibly, this night I got another DAD error and of course pihole stopped working; the culprit mac address was always the same (webcam ezwiz/hickvision); very strange given that no other dhcp server are active and dhcp range on pihole is 205-225... now I turned webcam off, I want to be sure that the problem is here.
in the meantime I also changed SD card with a new 64gb (old was 32); system take only 6gb of space, but I want to be sure is not a bad SD memory problem (well, 99% it's not....)

A thousand thanks for all your help!!