Can't see added clients

Hello, I tried to add my ip address in the "Client - Group Management" section to add it to a specified group. But I couldn't see the added ip address so I tried it again with a / after the ip address. After that I got an error message on the top of the page which says

|2020-12-08 19:24:05|SUBNET|Client `192.168.178.82` is managed by 2 groups (database IDs [1,2]):

192.168.178.82
192.168.178.82/

FTL chose the most recent entry

192.168.178.82/

to get the group configuration for this client.|

| --- | --- |

Can you tell me how I can delete this entry which I can't see in the Client - Group Management section? Maybe by SSH?

Thanks for your help :slight_smile:

Please generate a debug log with pihole -d and post the token here.

Alright here is the Token

https://tricorder.pi-hole.net/kyoolwpvp1

Thanks for your help :slight_smile:

To delete the 192.168.178.82/

sudo sqlite3 /etc/pihole/gravity.db "Delete from client where id=2"

1 Like

Ok Thank you :slight_smile:

Do you know why I can‘t see the client entries?

I'm not exactly sure, but from your debug log I can see that a) there was a database error before or b) the wrongly formatted entry caused database issues which lead display issues

020-12-08 19:22:38: (mod_fastcgi.c.421) FastCGI-stderr: PHP Warning:  SQLite3Stmt::execute(): Unable to execute statement: UNIQUE constraint failed: client.ip in /var/www/html/admin/scripts/pi-hole/php/groups.php on line 333
   2020-12-08 19:22:53: (mod_fastcgi.c.421) FastCGI-stderr: PHP Warning:  SQLite3::query(): Unable to execute statement: database disk image is malformed in /var/www/html/admin/scripts/pi-hole/php/groups.php on line 230
   2020-12-08 19:22:53: (mod_fastcgi.c.421) FastCGI-stderr: PHP Warning:  SQLite3::prepare(): Unable to prepare statement: 1, no such column: name in /var/www/html/admin/scripts/pi-hole/php/groups.php on line 192
   [2020-12-08 04:54:56.952 1319M] getMACfromIP("192.168.178.208") - Database not available
   [2020-12-08 04:54:56.952 1319M] getNameFromIP("192.168.178.208") - Database not available
   [2020-12-08 04:54:56.953 1319M] getIfaceFromIP("192.168.178.208") - Database not available
   [2020-12-08 04:54:56.960 1319M] SQLite3 message: no such column: aliasclient_id in "SELECT aliasclient_id FROM network WHERE id = (SELECT network_id FROM network_addresses WHERE ip = ? AND aliasclient_id IS NOT NULL GROUP BY ip HAVING max(lastSeen));" (1)
   [2020-12-08 04:54:56.960 1319M] getAliasclientIDfromIP("192.168.178.208") - SQL error prepare: SQL logic error

Especially

 database disk image is malformed in /var/www/html/admin/scripts/pi-hole/php/groups.php on line 230

indicates the database file might be corrupted.

1 Like

Ok, so how can I fix this problem?
I already had to reconfigure pihole for the latest update.

Exchange pihole-FTL.db with gravity.db if you try to repair it.

For the reason, see here (different error, but likely same underlying issue)

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.