Pihole XU4 v141

I had this working but attempting to update it, it no longer is. I have tried k-plan’s method to no avail.

I have tried the “curl -L https://install.pi-hole.net | bash” method but this didn’t work either.

When installing using dietpi-software it gets to the point where it is installing packages (with the bar on screen) but this is over so quickly it can’t be doing much.

The web interface can be accessed but it says “starting”.

I have it working OK on Banana and Raspberry Pis so I know Fourdee’s script is not the problem.

Any ideas on how to fix this?

John

Hi John,

I had this working but attempting to update it, it no longer is.

Strange, i did a fresh XU4 v141 install yesterday with PiHole, worked fine for me.

Its possible apt is causing the issue. Try running

apt-get update
apt-get install -f

And see if you get any errors.

If its fine, try uninstalling PiHole (check for any errors), then install again in dietpi-software

Failing that, we may need to manually remove all PiHole files/settings completely from system, then install again. Let me know and i’ll check steps needed.

Hi Fourdee,

I installed/uninstalled/reinstalled several times - still the same.

apt-get install -f - no errors.

There are no /etc/pihole or /etc/.pihole directories. Nothing relevant in /opt either.

Thanks for your help,

John

Hi John,

Try this complete removal (may want to backup 1st):

rm -R /var/www/html

#I know you said these dont exist, but lets cover it anyway
rm -R /opt/pihole
rm -R /etc/pihole
rm -R /etc/.pihole

#binary
rm /usr/local/bin/pihole

#dnsmasq
apt-get purge -y dnsmasq
rm -R /etc/dnsmasq.*

To my knowledge, that should clear all pihole related files/settings from system. Then try again:

curl -L https://install.pi-hole.net | bash

If it fails, please try to copy/paste text, maybe has some info we can look into.

HI Fourdee,

Tried the above but no difference unfortunately but I am close to a solution of sorts.

I manually installed the required apps from here:
https://github.com/pi-hole/pi-hole/blob/master/automated%20install/basic-install.sh

I then ran “curl -L https://install.pi-hole.net | bash”

As before this did a partial install.

I then copied the missing bits from a working Pi3 install i.e. the contents of /opt/pihole /etc/pihole /usr/local/bin

And it is now working blocking ads but the web console and cloudshell display do not report this activity.

The only non-standard thing in my system is php v7 - could this be relevant?

John

Further to the above I think part of the problem is that pihole is not writing to the log despite this being enabled, so the graphs have nothing to display. Also status (top left of web interface) is “unknown”.

Hi John,

Shouldn’t do, our Stretch RPi image is fine with PiHole, that installs php7: https://github.com/Fourdee/DietPi/issues/475


Further to the above I think part of the problem is that pihole is not writing to the log despite this being enabled, so the graphs have nothing to display. Also status (top left of web interface) is “unknown”.

Check permissions on logfile, should be dnsmasq:

root@DietPi:~# ls -lha /var/log/pihole.log
-rwxrwxr-x 1 dnsmasq www-data 1.1M Jan  3 19:16 /var/log/pihole.log

Also check the following log entires exist in /etc/dnsmasq.d/01-pihole.conf:

root@DietPi:~# cat /etc/dnsmasq.d/01-pihole.conf  | grep log
log-queries
log-facility=/var/log/pihole.log
log-async

HI Fourdee,

Thanks again for your help - this is proving to be a tricky one to fix. I have uninstalled and cleaned out every trace of pihole I could. A reinstall seemed to work until I got this error message:

/DietPi/dietpi/dietpi-software: line 7251: pihole: command not found

There were no files in /etc/pihole, /usr/local/bin or /opt. I copied these from a Pi3 and changed permissions as needed.

/etc/dnsmasq.d/01-pihole.conf wasn’t there so copied also.

All done it partially works - it blocks the ads but the web interface still says status unknown. The pie charts show but the graph doesn’t and DNS queries and blocked sites stay at 0%. The log is being written to. Any further ideas?


Update - the graph has now appeared but the ad blocking has stopped, without changing anything.
John

Hi John,

7251 is where we set the PiHole web interface login password:

https://github.com/Fourdee/DietPi/blob/master/dietpi/dietpi-software#L7250-L7251

Looks like PiHole hasn’t installed its binary, possibly failed during install.

There were no files in /etc/pihole, /usr/local/bin or /opt. I copied these from a Pi3 and changed permissions as needed.

/etc/dnsmasq.d/01-pihole.conf wasn’t there so copied also.

Yep, in theory it should be working. Really doesn’t make any sense. And why the official PiHole installer isn’t completing a successful install, is strange.

I think the next route would be remote access session, where I can attempt to debug the issue and hopefully find a solution. For this, i’d need access to a PC on your network (with VNC server and terminal emulator installed).
Let me know if this is something your willing to do, drop me an email daniel_haze@hotmail.com and we’ll get it arranged.

Failing that, unless we can see all the PiHole onscreen text output during install (hopefully contains some errors we can debug), or a fresh DietPi image, not sure what to do.

Thanks Fourdee - I’ll maybe take you up on this but I’ve got some more testing to do first as last night I found that the Pi3 has a similar problem now - in short, if I uninstall a working pihole and reinstall, it stops working. Same on the two devices. I’ll test this on the Banana Pi later today and see if the same happens on this.

John

Hi John,

Yep, no worries, just let me know.

The uninstall code for PiHole uses the PiHole binary and their uninstall function (and a few extras):
https://github.com/Fourdee/DietPi/blob/master/dietpi/dietpi-software#L9283-L9293

It may be worth running pihole uninstall manually, and seeing if any errors occur:

Further testing on Orange Pi Zero and Banana Pi M1 - pihole uninstalled and reinstalled and is working fine on both. So something wrong with XU4 and Pi3. The Pi3 is for mucking around with so no loss. I think I’ll need to reflash the XU4 and start again given your recent comments about file corruption on this image.

If I take this route would backing up the system, reflashing and then restoring the backup be of any use or would this simply restore the corrupted files?

John

Just got it working if not entirely sure how. I saw on the screen that php-cgi wasn’t installed (I was sure it was) so I updated all the php7.0 components. I installed by the curl method but same result. I uninstalled by pihole uninstall. I then tried another install using dietpi-software and it ran to the end this time.

John

Hi John,

Didn’t think to check php7 packages, good find!. Great to hear its now working.

Ah yes, PiHole installs php-cgi but that doesn’t exist on Jessie, its php5-cli. On RPi Stretch, php7.0-cli gets pulled in with php-cgi.

Odroid C2:

root@DietPi:~# cat /etc/*release
PRETTY_NAME="Debian GNU/Linux 8 (jessie)"
NAME="Debian GNU/Linux"
VERSION_ID="8"
VERSION="8 (jessie)"
ID=debian
HOME_URL="http://www.debian.org/"
SUPPORT_URL="http://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"

root@DietPi:~# apt-cache search php-cli
php-google-api-php-client - Google APIs client library for PHP