Known clients list not correctly populated

Group Management -> Clients -> Known clients dropdown

The known clients list is missing numerous devices which are actively connecting to the pihole and the list also contains several devices which haven't connected to the pihole in several months (I know since they were VMs which I've since deleted)

The dashboard claims there are 19 clients, so there should be 19 entries in this list, no?

I'm facing the same issue. The dropdown just shows my router.

This is pulled from the arp table on the Pi. What does this command from the terminal show?

arp

arp -n will show the IP addresses only, instead of trying to map IPs to domain names.

1 Like

Yes, most likely the arp cache needs time to populate. It's a passive process, though a ping -b to the broadcast address of the network segment may kickstart things?

The arp table shows all the clients

Running arp shows what I expect should be in the Known clients list, but they don't match up.

Check on http://pi.hole/admin/network.php if the clients you're looking for are present. If not, we need to have a look why this is not the case.

Yes, all the expected clients are listed on that page (plus quite a few I have no idea what are).

@Wychmire And does this command list them as well?

sqlite3 /etc/pihole/pihole-FTL.db "SELECT DISTINCT ip,network.name FROM network_addresses AS name LEFT JOIN network ON network.id = network_id ORDER BY ip ASC;"

Yes. In fact, the first eleven entries listed off match the ten entries in the Known Clients list almost exactly. At one point a VM had the same IP as another VM, the second entry when running the above command is the one that gets listed in the Known Clients list.

Maybe it's only grabbing the first ten items?

I don't think so, however, I do not have more devices here so testing is difficult. Please open the developer tools (network tab) in your browser and refresh the Group management page. You should find a request like this one (watch out for action: get_unconfigured_clients on the right!):

Check the Response sub-tab on the right. Does it also show all the clients?...

Yes. There's a JSON list(?) with all of the clients. The duplicate entry isn't listed though.

Just to be sure: They are still not showing up in the dropdown menu? :wink:

So the web interface should be aware of them as the server tells it about them...

https://github.com/pi-hole/AdminLTE/blob/4ff07003b143a95b1847235504d82c31f88a411d/scripts/pi-hole/js/groups-clients.js#L72-L104

Maybe it needs someone with fresh eyes to look that over, it's already past 10pm in good old Europe :wink:
I'll come back to you latest tomorrow.

In my case it only shows the first entry of the json. Could the "null" field be the issue?

Correct. Only the first ten entries in the JSON/db show up in the Known Clients list.

@lw1 I also have a null item and it's directly after the last item that appears in the list. Is it the same for you?

Yes, only 172.16.1.1 is displayed. The IPs after the "null" value are missing.

Okay, that's actually interesting. The code should not stop at null, however, it seems sane to avoid these nulls altogether.

Could you confirm that
https://github.com/pi-hole/AdminLTE/pull/1134
resolves the issue for you?

pihole checkout web fix/null_clients

You can later switch back to release/v5.0 when this PR has been merged.

(Good that I wrote "latest tomorrow" :wink: )

1 Like

Solved the issue for me :+1:

1 Like

That fixes it! Marking this as solved, thank you!

1 Like

Okay, thanks for the confirmation, the bugfix has been merged.

Please run

pihole checkout web release/v5.0

to be back on track