piHole GUI access error

Hi All,

I have a piHole setup in a remote environment, when trying to access the Admin GUI I get the below error

|| $type === ListType::blacklist) { // If adding to the exact lists, we convert the domain lower case and check whether it is valid $domain = strtolower($domain); if(filter_var($domain, FILTER_VALIDATE_DOMAIN, FILTER_FLAG_HOSTNAME) === false) { // This is the case when idn_to_ascii() modified the string if($input !== $domain && strlen($domain) > 0) $errormsg = 'Domain ' . htmlentities($input) . ' (converted to "' . htmlentities(utf8_encode($domain)) . '") is not a valid domain.'; elseif($input !== $domain) $errormsg = 'Domain ' . htmlentities($input) . ' is not a valid domain.'; else $errormsg = 'Domain ' . htmlentities(utf8_encode($domain)) . ' is not a valid domain.'; throw new Exception($errormsg . '
Added ' . $added . " out of ". $total . " domains"); } } // First try to delete any occurrences of this domain if we're in // replace mode. Only do this when the domain to be replaced is in // the default group! Otherwise, we would shuffle group settings and // just throw an error at the user to tell them to change this // domain manually. This ensures user's will really get what they // want from us. if($_POST['action'] == 'replace_domain') { if (!$check_stmt->bindValue(':domain', $domain, SQLITE3_TEXT)) { throw new Exception('While binding domain to check: ' . $db->lastErrorMsg() . '
'. 'Added ' . $added . " out of ". $total . " domains"); } $check_result = $check_stmt->execute(); if (!$check_result) { throw new Exception('While executing check: ' . $db->lastErrorMsg() . '
'. 'Added ' . $added . " out of ". $total . " domains"); } // Check return value of CHECK query (0 = only default group, 1 = special group assignments) $only_default_group = (($check_result->fetchArray(SQLITE3_NUM)[0]) == 0) ? true : false; if(!$only_default_group) { throw new Exception('Domain ' . $domain . ' is configured with special group settings.
'. 'Please modify the domain on the respective group management pages.'); } if (!$delete_stmt->bindValue(':domain', $domain, SQLITE3_TEXT)) { throw new Exception('While binding domain: ' . $db->lastErrorMsg() . '
'. 'Added ' . $added . " out of ". $total . " domains"); } if (!$delete_stmt->execute()) { throw new Exception('While executing: ' . $db->lastErrorMsg() . '
'. 'Added ' . $added . " out of ". $total . " domains"); } } if (!$insert_stmt->bindValue(':domain', $domain, SQLITE3_TEXT) || !$update_stmt->bindValue(':domain', $domain, SQLITE3_TEXT)) { throw new Exception('While binding domain: ' . $db->lastErrorMsg() . '
'. 'Added ' . $added . " out of ". $total . " domains"); } // First execute INSERT OR IGNORE statement to create a record for // this domain (ignore if already existing) if (!$insert_stmt->execute()) { throw new Exception('While executing INSERT OT IGNORE: ' . $db->lastErrorMsg() . '
'. 'Added ' . $added . " out of ". $total . " domains"); } // Then update the record with a new comment (and modification date // due to the trigger event) We are not using REPLACE INTO to avoid // the initial DELETE event (loosing group assignments in case an // entry did already exist). if (!$update_stmt->execute()) { throw new Exception('While executing UPDATE: ' . $db->lastErrorMsg() . '
'. 'Added ' . $added . " out of ". $total . " domains"); } $added++; } if(!$db->query('COMMIT;')) { throw new Exception('While commiting changes to the database: ' . $db->lastErrorMsg()); } $after = intval($db->querySingle("SELECT COUNT(*) FROM domainlist;")); $difference = $after - $before; if($total === 1) { if($difference !== 1) { $msg = "Not adding ". htmlentities(utf8_encode($domain)) . " as it is already on the list"; } else { $msg = "Added " . htmlentities(utf8_encode($domain)); } } else { if($difference !== $total) { $msg = "Added " . ($after-$before) . " out of ". $total . " domains (skipped duplicates)"; } else { $msg = "Added " . $total . " domains"; } } $reload = true; JSON_success($msg); } catch (\Exception $ex) { JSON_error($ex->getMessage()); } } elseif ($_POST['action'] == 'edit_domain') { // Edit domain identified by ID try { $db->query('BEGIN TRANSACTION;'); $stmt = $db->prepare('UPDATE domainlist SET enabled=:enabled, comment=:comment, type=:type WHERE id = :id'); if (!$stmt) { throw new Exception('While preparing statement: ' . $db->lastErrorMsg()); } $status = intval($_POST['status']); if ($status !== 0) { $status = 1; } if (!$stmt->bindValue(':enabled', $status, SQLITE3_INTEGER)) { throw new Exception('While binding enabled: ' . $db->lastErrorMsg()); } $comment = html_entity_decode($_POST['comment']); if (strlen($comment) === 0) { // Store NULL in database for empty comments $comment = null; } if (!$stmt->bindValue(':comment', $comment, SQLITE3_TEXT)) { throw new Exception('While binding comment: ' . $db->lastErrorMsg()); } if (!$stmt->bindValue(':type', intval($_POST['type']), SQLITE3_INTEGER)) { throw new Exception('While binding type: ' . $db->lastErrorMsg()); } if (!$stmt->bindValue(':id', intval($_POST['id']), SQLITE3_INTEGER)) { throw new Exception('While binding id: ' . $db->lastErrorMsg()); } if (!$stmt->execute()) { throw new Exception('While executing: ' . $db->lastErrorMsg()); } $stmt = $db->prepare('DELETE FROM domainlist_by_group WHERE domainlist_id = :id'); if (!$stmt) { throw new Exception('While preparing DELETE statement: ' . $db->lastErrorMsg()); } if (!$stmt->bindValue(':id', intval($_POST['id']), SQLITE3_INTEGER)) { throw new Exception('While binding id: ' . $db->lastErrorMsg()); } if (!$stmt->execute()) { throw new Exception('While executing DELETE statement: ' . $db->lastErrorMsg()); } $groups = array(); if(isset($_POST['groups'])) $groups = $_POST['groups']; foreach ($groups as $gid) { $stmt = $db->prepare('INSERT INTO domainlist_by_group (domainlist_id,group_id) VALUES(:id,:gid);'); if (!$stmt) { throw new Exception('While preparing INSERT INTO statement: ' . $db->lastErrorMsg()); } if (!$stmt->bindValue(':id', intval($_POST['id']), SQLITE3_INTEGER)) { throw new Exception('While binding id: ' . $db->lastErrorMsg()); } if (!$stmt->bindValue(':gid', intval($gid), SQLITE3_INTEGER)) { throw new Exception('While binding gid: ' . $db->lastErrorMsg()); } if (!$stmt->execute()) { throw new Exception('While executing INSERT INTO statement: ' . $db->lastErrorMsg()); } } if(!$db->query('COMMIT;')) { throw new Exception('While commiting changes to the database: ' . $db->lastErrorMsg()); } $reload = true; JSON_success(); } catch (\Exception $ex) { JSON_error($ex->getMessage()); } } elseif ($_POST['action'] == 'delete_domain') { // Delete domain identified by ID try { $db->query('BEGIN TRANSACTION;'); $stmt = $db->prepare('DELETE FROM domainlist_by_group WHERE domainlist_id=:id'); if (!$stmt) { throw new Exception('While preparing domainlist_by_group statement: ' . $db->lastErrorMsg()); } if (!$stmt->bindValue(':id', intval($_POST['id']), SQLITE3_INTEGER)) { throw new Exception('While binding id to domainlist_by_group statement: ' . $db->lastErrorMsg()); } if (!$stmt->execute()) { throw new Exception('While executing domainlist_by_group statement: ' . $db->lastErrorMsg()); } $stmt = $db->prepare('DELETE FROM domainlist WHERE id=:id'); if (!$stmt) { throw new Exception('While preparing dom

Can someone tell what this error relates to? The remote sites does not have any PC's running, just a couple of sensors. Can SSH into the device using onsite Gateway's terminal.

pihole is running on Raspberry Pi3 on debian buster.

Please post a screen shot showing what you are seeing on your screen. In this forum you can paste an image directly into a reply.

Hi,

Thanks for getting back to me. Screenshot of the error below

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

Hi,

Apologies for the delay

Token URL is
https://tricorder.pi-hole.net/rMCQbCzI/

Hi,

Any updates on this?

Apologies we let this slip. Please send us a new debug token, as your previous one has expired.

New debug token https://tricorder.pi-hole.net/t7br5I5O/

There are several issues in your debug log.

  1. Dig does not work
  2. FTL is not running
  3. strange character errors
*** [ DIAGNOSING ]: Operating system
[i] dig return code:  139
[i] dig response:  139
[✗] Distro:  Raspbian
[✗] Error: Raspbian is not a supported distro (https://docs.pi-hole.net/main/prerequisites/)

*** [ DIAGNOSING ]: Ports in use
*:22 sshd (IPv4)
*:22 sshd (IPv6)
[80] is in use by lighttpd
[80] is in use by lighttpd


Nov 21 04:18:18 DNSServer pihole-FTL[11706]: Sep  4 05:53:09 dnsmasq[662:]: query[A] www.facebogk.com brom 192.168.1.14
Nov 21 04:18:18 DNSServer pihole-FTL[11706]: [65B blob data]
Nov 21 04:18:18 DNSServer pihole-FTL[11706]: Sep  4 05:53:09 dnsmasq[6622]: forwarded www.facebook.com to 1.1.1.1
Nov 21 04:18:18 DNSServer pihole-FTL[11706]: Sep  4"05:53:09 dnsmcsq[6622]: re`ly www.facebook.cmm ys <CNAME>
Nov 21 04:18:18 DNSServer pihole-FTL[11706]: [80B blob data]
Nov 21 04:18:18 DNSServer pihole-FTL[11706]: Sep  4 05:53:19$dnsmasq[6622]: query[A] cc-api-daua.adobe.io from 192.168.1.14
Nov 21 04:18:18 DNSServer pihole-FTL[11706]: Sep  4 05:53:19 dnsmasq[6622]: forwarded cc-apimdata.adobe.io to 1.1.1.1
Nov 21 04:18:18 DNSServer pihole-FTL[11706]: Sep  4 05:53:19 DnsmasqK6622]:!reply cc-api-data.adobe.io is 54.150.163.204
Nov 21 04:18:18 DNSServer pihole-FTL[11706]: [75B blob data]
Nov 21 04:18:18 DNSServer pihole-FTL[11706]: Sep : cannot open shared object file: Error 36

Especially the character errors make me think of file system errors/corruptions. What system are you Pi-hole running on? Did you experience sudden power losses lately?
You could simply try to restart Pi-hole by pihole restartdns, but chances are high that it will fail again. Might be time to change the SD card?

Plus

*** [ DIAGNOSING ]: Core version
git status failed

You could try to reinstall Pi-hole by pihole -r choose repair

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