pi-hole / docker-pi-hole

Pi-hole in a docker container
https://pi-hole.net
Other
8.32k stars 1.11k forks source link

pi-hole admin page not showing statistics #272

Closed mdclemen closed 6 years ago

mdclemen commented 6 years ago

This is a...

Description

I am able to successfully run the pi-hole docker image, but my admin page is not showing statistics. I am running the docker image on my laptop (linux mint 17.3/4.4.0-72-generic) and the output of docker logs pihole is:

`[s6-init] making user provided files available at /var/run/s6/etc...exited 0.

[s6-init] ensuring user provided files have correct perms...exited 0. [fix-attrs.d] applying ownership & permissions fixes... [fix-attrs.d] 01-resolver-resolv: applying... [fix-attrs.d] 01-resolver-resolv: exited 0. [fix-attrs.d] done. [cont-init.d] executing container initialization scripts... [cont-init.d] 20-start.sh: executing... ARCH=amd64 BASH=/bin/bash BASHOPTS=cmdhist:complete_fullquote:extquote:force_fignore:hostcomplete:interactive_comments:progcomp:promptvars:sourcepath BASH_ALIASES=() BASH_ARGC=() BASH_ARGV=() BASH_CMDS=() BASH_LINENO=([0]="0") BASH_SOURCE=([0]="/var/run/s6/etc/cont-init.d/20-start.sh") BASH_VERSINFO=([0]="4" [1]="4" [2]="12" [3]="1" [4]="release" [5]="x86_64-pc-linux-gnu") BASH_VERSION='4.4.12(1)-release' CWD=/ DIRSTACK=() EUID=0 FTL_CMD=no-daemon GROUPS=() HOME=/root HOSTNAME=6250e570f0fe HOSTTYPE=x86_64 IFS=$' \t\n' IPv6=True MACHTYPE=x86_64-pc-linux-gnu OPTERR=1 OPTIND=1 OSTYPE=linux-gnu PATH=/opt/pihole:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin PHP_ENV_CONFIG=/etc/lighttpd/conf-enabled/15-fastcgi-php.conf PHP_ERROR_LOG=/var/log/lighttpd/error.log PIHOLE_INSTALL=/tmp/ph_install.sh PPID=208 PS4='+ ' PWD=/ S6OVERLAY_RELEASE=https://github.com/just-containers/s6-overlay/releases/download/v1.21.2.2/s6-overlay-amd64.tar.gz S6_KEEP_ENV=1 SHELL=/bin/bash SHELLOPTS=braceexpand:hashall:interactive-comments SHLVL=1 ServerIP=192.168.1.69 TAG=debian TERM=dumb UID=0 VIRTUALHOST=192.168.1.69 WEBPASSWORD=pihole =bash setupVars=/etc/pihole/setupVars.conf ::: Starting docker specific setup for docker diginc/pi-hole [✓] New password set Using default DNS servers: 8.8.8.8 & 8.8.4.4 DNSMasq binding to default interface: eth0 Added ENV to php: "PHP_ERROR_LOG" => "/var/log/lighttpd/error.log", "ServerIP" => "192.168.1.69", "VIRTUAL_HOST" => "192.168.1.69", Using IPv4 and IPv6 ::: Testing DNSmasq config: ::: Testing lighttpd config: Syntax OK ::: All config checks passed, starting ... ::: Docker start setup complete [i] Neutrino emissions detected... [i] Pulling blocklist source list into range...  [✓] Pulling blocklist source list into range

[i] Target: raw.githubusercontent.com (hosts) [i] Status: Pending...  [✓] Status: Retrieval successful

[i] Target: mirror1.malwaredomains.com (justdomains) [i] Status: Pending...  [✓] Status: No changes detected

[i] Target: sysctl.org (hosts) [i] Status: Pending...  [✓] Status: No changes detected

[i] Target: zeustracker.abuse.ch (blocklist.php?download=domainblocklist) [i] Status: Pending...  [✓] Status: No changes detected

[i] Target: s3.amazonaws.com (simple_tracking.txt) [i] Status: Pending...  [✓] Status: No changes detected

[i] Target: s3.amazonaws.com (simple_ad.txt) [i] Status: Pending...  [✓] Status: No changes detected

[i] Target: hosts-file.net (ad_servers.txt) [i] Status: Pending...  [✓] Status: No changes detected

[i] Consolidating blocklists...  [✓] Consolidating blocklists [i] Extracting domains from blocklists...  [✓] Extracting domains from blocklists [i] Number of domains being pulled in by gravity: 144812 [i] Removing duplicate domains...  [✓] Removing duplicate domains [i] Number of unique domains trapped in the Event Horizon: 121853 [i] Nothing to whitelist! [i] Parsing domains into hosts format...  [✓] Parsing domains into hosts format [i] Cleaning up stray matter...  [✓] Cleaning up stray matter

[✓] DNS service is running [✓] Pi-hole blocking is Enabled [cont-init.d] 20-start.sh: exited 0. [cont-init.d] done. [services.d] starting services Starting lighttpd Starting pihole-FTL (no-daemon) Starting dnsmasq Starting crond [services.d] done.`

Expected Behavior

I should be seeing something like this: https://i2.wp.com/pi-hole.net/wp-content/uploads/2018/04/Screenshot-2018-04-01-14.39.10.png?resize=768%2C611&ssl=1

Actual Behavior

Instead I am seeing this on my admin page: piholeadmin I'm thinking it should be showing more.

Your Environment

echo "IP: ${IP}"

# Default ports + daemonized docker container docker run -d \ --name=pihole \ -p 53:53/tcp -p 53:53/udp -p 80:80 \ -v "${DOCKER_CONFIGS}/pihole/:/etc/pihole/" \ -v "${DOCKER_CONFIGS}/dnsmasq.d/:/etc/dnsmasq.d/" \ -v "/var/run/lighttpd/:/run/lighttpd/" \ -e ServerIP="${IP:-$(ip route get 8.8.8.8 | awk '{ print $NF; exit }')}" \ -e VIRTUAL_HOST="${IP}" \ -e WEBPASSWORD="pihole" \ --restart=always \ diginc/pi-hole:latest

docker logs pihole 2> /dev/null | grep 'password:'`

Thanks for any help.

mdclemen commented 6 years ago

This is the same issue as: https://github.com/diginc/docker-pi-hole/issues/241

StefanSchoof commented 6 years ago

As I wrote in #241 I do not think this is a duplicate. I think the problem is that if a volume is used for /etc/dnsmasq.d/ the creation of 01-pihole.conf in bash_functions.sh setup_dnsmasq_config_if_missing does not work.

If I run

mkdir temp && cd temp
DOCKER_CONFIGS="$(pwd)"
docker run --rm -v "${DOCKER_CONFIGS}/dnsmasq.d/:/etc/dnsmasq.d/" diginc/pi-hole-multiarch:debian_armhf exit
cat dnsmasq.d/01-pihole.conf

I get only

addn-hosts=/etc/pihole/gravity.list

and not any of the content from the /etc/.pihole/advanced/01-pihole.conf