Done, thanks!
Try to obtain host names from another address of the same device when nothing else is available
pi-hole:development
← pi-hole:fix/dbnames
**By submitting this pull request, I confirm the following:** - [X] I have re…
Done, thanks!
So it is clear, does this mean it is time to switch off this branch and over to dev?
Additional question:
I have IPv4 and IPv6 in my network. So most of the clients have an IPv4, IPv6 ULA (in my case fd28:: ) and IPv6 GLA address.
DHCP IPv4 does pihole, IPv6 my Fritz!Box. Name resolution for IPv4 is working, in Network Table Clients are correctly shown (for example a smartphone with all three addresses). In Dashboard and log IPv6 are not resolved (shown as fd28:: )
As far as I understand the option NAMES_FROM_NETDB
therefore it would shown the name from the network table. Is this correct?
Thanks in advance!
@DL6ER
Yes
Yes
Okay then it seems not to work. I can't say if it worked before the mac_clients branch. Maybe it can be checked
Looks like what I thought to do wasn't correct. I tried:
pihole checkout web dev
But it says such a branch doesn't exist. I see a devel, but wasn't sure if that was the right one.
Also, for ftl, there is no dev or devel. But there is a development.
Before I go and mess up my setup, does anyone know specifically what I need to run to make sure I am on the right branch?
The web development branch is called devel
.
pihole checkout ftl development
pihole checkout web devel
Before I go and mess up my setup, does anyone know specifically what I need to run to make sure I am on the right branch?
No branch is called dev
, core and FTL are called development
. web is called devel
due to historical reasons (fork of AdminLTE). There is a shortcut called
pihole checkout dev
(so without any ftl
, web
, etc. target) which automatically selects the correct branch for each and does everything in one go.
Okay then it seems not to work.
I can see what is going wrong. You mean that IPv6 clients are not picking up IPv4 host names for the same clients any more? Yeah, this is not reliably working due to the optimized structure of the database tables in development
. It happened when redesigning the database for new/mac_clients
.
The current database query is
SELECT name FROM network_addresses WHERE name IS NOT NULL AND ip = ?;
While this is correct for getting hostnames for the same IP, we have to do a second lookup to get names for other addresses of the same device.
My proposal is
SELECT name FROM network_addresses WHERE name IS NOT NULL and network_id = (SELECT network_id FROM network_addresses WHERE ip = ?) ORDER BY lastSeen DESC LIMIT 1;
(untested, but should work).
I will take care of this when back home.
Alright, thank you, will test it when it is online
As far as I can see this option already exists - NAMES_FROM_NETDB
But currently it isn't working since implementing the new/mac_clients branch
@ampfinger Please try
pihole checkout ftl fix/dbnames
This branch is based on development
, so it includes everything that was in new/mac_clients
.
pi-hole:development
← pi-hole:fix/dbnames
**By submitting this pull request, I confirm the following:** - [X] I have re…
Checked out the branch and waiting for resolved clients.
I will post feedback late
Edit: after latest commits it is working like charm. Thanks!
Looks like I've got some issues now with my DB:
[2020-09-19 21:45:00.045 7219/T7223] SQLite3 message: table queries has 7 columns but 8 values were supplied in "INSERT INTO queries VALUES (NULL,?,?,?,?,?,?,?)" (1)
[2020-09-19 21:45:00.045 7219/T7223] ERROR: Storing queries in long-term database failed: SQL logic error[2020-09-19 21:45:00.045 7219/T7223] Keeping queries in memory for later new attempt
[2020-09-19 21:45:00.064 7219/T7223] db_query_int("SELECT id FROM network WHERE hwaddr = '00:0c:29:f6:ca:2f';") called but database is not available!
[2020-09-19 21:45:00.070 7219/T7223] db_query_int("SELECT network_id FROM network_addresses WHERE ip = '10.100.1.63' AND lastSeen > (cast(strftime('%s', 'now') as int)-86400) ORDER BY lastSeen DESC LIMIT 1;") called but database is not available!
[2020-09-19 21:45:00.070 7219/T7223] db_query_int("SELECT id FROM network WHERE hwaddr = 'ip-10.100.1.63';") called but database is not available!
[2020-09-19 21:45:00.088 7219/T7223] db_query_int("SELECT id FROM network WHERE hwaddr = '00:00:00:00:00:00' COLLATE NOCASE;") called but database is not available!
pi@pihole:/var/log $ pihole version
Pi-hole version is development v5.0-210-gb88510d8 (Latest: v5.1.2)
AdminLTE version is devel v5.1.1-82-g7e089a84 (Latest: v5.1.1)
FTL version is development vDev-ef7e11d (Latest: v5.2)
I wanted to double check what branch I should be on at this point. I switched to dev about 20 days back when it was said it was safe to do so.
So I just deleted my pihole-FTL.db file, and let it get recreated, and the errors stopped, so that is good.
But I've got a new issue. Sporadically dns resolution will just stop. No device on my network can resolve DNS, and the pihole itself can't resolve anything. I have to do a
pihole restartdns
to get things going again.
I don't see any crashes or errors that stick out in the logs that would signal what is going on. I do see a lines like:
[2020-09-20 17:37:53.187 890M] Skipping mock-device hardware address lookup
[2020-09-20 17:37:53.197 890M] Skipping mock-device hardware address lookup
[2020-09-20 17:37:53.206 890M] Skipping mock-device hardware address lookup
[2020-09-20 17:44:05.414 890M] Resizing "/FTL-queries" from 2293760 to 2523136
[2020-09-20 17:47:44.503 890M] Resizing "/FTL-dns-cache" from 45056 to 49152
[2020-09-20 17:53:08.383 890M] Resizing "/FTL-queries" from 2523136 to 2752512
[2020-09-20 18:00:03.820 890M] Resizing "/FTL-strings" from 40960 to 45056
[2020-09-20 18:01:30.769 890M] Resizing "/FTL-queries" from 2752512 to 2981888
[2020-09-20 18:01:46.338 890M] Resizing "/FTL-dns-cache" from 49152 to 53248
[2020-09-20 18:10:03.175 890M] Resizing "/FTL-queries" from 2981888 to 3211264
I'm not sure if any of these are helpful. Here is a debug token. If there is more I can provide, let me know.
Latest lines with "Skipping mock-device" are already fixed some days ago (and are only cosmetic changes, no real bugs)
Run pihole -up to get the latest FTL from development
I just pulled down the latest version tonight, but am still seeing that error:
pi@pihole:~ $ pihole -up
[i] Checking for updates...
[i] Pi-hole Core: up to date
[i] Web Interface: up to date
[i] FTL: up to date
[✓] Everything is up to date!
pi@pihole:~ $ pihole version
Pi-hole version is development v5.0-210-gb88510d8 (Latest: v5.1.2)
AdminLTE version is devel v5.1.1-82-g7e089a84 (Latest: v5.1.1)
FTL version is development vDev-88483b5 (Latest: v5.2)
I'm trying a reinstall right now, seeing if that helps.
I just pulled down the latest version tonight
On which branch are you?
That's the straight development branch shown.