When I click on Clients, I get the List of configured clients list. It works like this on my first Pi-hole instance.
Actual Behaviour:
When I click on Clients, I get an empty list with the only note Loading... on my second Pi-hole instance, which I created from scratch, i.e. fresh install, and afterwards importing (teleporter) previously exported clients (n=39) from my first Pi-hole instance into my second Pi-hole instance.
The List of groups shows correct entries (identical on both Pi-hole instances).
The only other difference is that the first runs on Debian bullseye, whereas the second on Debian bookworm (both on VMs on different machines).
Question:
Where/how does Pi-hole store the clients and groups details? Can I read that data via ssh? Are they in a database? Which one?
Debug Token:
At this point, I do not yet want to provide a debug token. If this is a show-stopper to help me, I politely ask you to accept my apologies. Thank you.
A debug log would be useful as it will show if there are any obvious issues. Run
pihole -d -c -a
from each Pi-hole – the working one and the not-working one. It will automatically upload the log and give you a token URL. Post each token URL here and which Pi it belongs to.
Thank you! I opened both databases and looked into them, and also the second shows the clients correctly. Therefore, I suspect that there is something else wrong with my second Pi-hole instance. I shall provide the debug logs if I do not make any progress.
I deleted gravity.db, gravity_old.db, and gravity.db.gsb on the faulty instance, did pihole -r => repair, and until then, everything was fine. Of course, the group and client lists were empty at that point.
Then I imported the group list (with Clear existing data) from my working instance, and all 12 groups appeared as expected.
Then I imported the client list (with Clear existing data) from my working instance, and the client list fails to show up - it just shows Loading... (while the groups still appear ok).
I would think that the clients list in the DB is faulty, although it seems ok on my working instance.
In the end, I might be better off to simply type all (currently 39) clients into the second instance instead of trying to import.
Maybe there was a problem while using gravity-sync.
Have you checked for errors in the logs? in your browser console? There might be some character sequence (maybe not even visible) that doesn't export/import properly. The UI might have handled it well upon manual entry, in the working instance originally, but export/import doesn't.
Even if you don't want to share it, the debug log is still a source of information, e.g. it would list the clients that you have added in a table.
It may also contain other relevant information, along with some hints at how to tackle obvious issues.
Did you create one and have a look at it yourself yet?
Yes, and there were several problems with SQL. I will check further when I have more time.
PS @Bucking_Horn
I reduced the number of groups (besides Default) to 4, removed the . regex blacklist for the kids' devices that before were only allowed to query selected sites (exact and regex whitelists), and I will remove all clients that are in the Default group anyway and thus (to my understanding) do not have to be explicitly entered. If my conception is wrong, please kindly let me know. Thank you! [EDIT: it seems correct ]
Thus, the maintenance should be easier - also on the second Pi-hole instance that I will set up from scratch and manually add only the necessary clients (as mentioned above).
For time constraints, I will not be able to find out about the source of my problem (that ongoing Loading... display) but regard this as a "workaround".
PS2 (sorry for cross-posting!):
Thanks to your reply there, I have confirmation that removing most clients is adequate.
Hm, I do want to find out what's wrong with the client list. Whenever I either import just the clients from the 1st to the 2nd instance or use gravity-sync (push 1st to 2nd or pull from 1st to 2nd) to get the whole gravity DB, the Clients tab keeps Loading.... Therefore, I suspect that already on my 1st instance, something is wrong with the clients table.
Erm, no, I created the 2nd instance from scratch (again, sic), saw that all tabs were empty (except for the Default group. I entered 192.168.178.1 as client. It did not appear below (despite the green confirmation pop-up), and after a refresh (F5 key), it shows Loading... without any client added. I`m going to upload the debug log...
Thanks. The log shows that FTL, which is the DNS service, is not running on this instance. The log snippets included show that it has been unable to interact with the long-term query database. All instances of
Unable to prepare statement: 1, no such table:
I'm not sure which way around those would be (FTL down so cannot interact with query database, or query database unavailable so FTL cannot run). A dev will be able to clarify what's happening there. I suspect that the syncing process is implicated as a cause.
The log shows the query database has the correct permissions and ownership but looks very small. What is the output of
I'm not sure what caused the FTL shutdown, but apparently it was intentionally killed at 12:13:04, right after it was started (code=killed and last line):
As a consequence, the database was not fully created:
[2023-09-22 12:12:43.189 19255M] No database file found, creating new (empty) database
[2023-09-22 12:12:54.244 19255M] Database version is 1
[2023-09-22 12:12:54.244 19255M] Updating long-term database to version 2
[2023-09-22 12:13:03.869 19255M] Updating long-term database to version 3
The current database is only 24Kb in size. This means it is probably broken.
Usually, an empty FTL database has around 80Kb:
I did not kill the FTL I will remove everything gravity-sync related, reinstall pi-hole, enter a client, and report the result asking with another debug log.
Thanks, guys, for your patience and help - much appreciated!
No worries, thanks for the paste. Actually I missed that the info is already present in the debug log as rdwebdesign's reply shows.
Good plan on a retry – the first Pi-hole you install appears to work normally, then the second one, which is informed by gravity-sync, develops this problem. So redoing the second one, confirming it works, then retrying gravity-sync is useful to see if it happens again.