Temporary failure in name resolution

First thing first I have both Pi-hole and Squid on my Raspberry PI

Everything working thing except for my web-interface which stoped worked but the Pi hole was still filtering

The web interface is displaying text only

<?php /* * Pi-hole: A black hole for Internet advertisements * (c) 2017 Pi-hole, LLC (https://pi-hole.net) * Network-wide ad blocking via your own hardware.

I have no issue with webmin (squid)

Something happen today and I had no internet at all from the PI

I had to edit sudo nano /etc/resolv.conf and add 208.67.222.222 instead.

I installed Pi-hole again (still no web interface)
if I change resolv.conf with 127.0.0.1, no internet again.

Any troubleshooting step you could recommande me?

Many thanks in advance

Did you install another web server? The web interface requires lighttpd with PHP.

Run pihole -d for a debug token.

Thank you you're reply,
I have Apache 2

log

This process collects information from your Pi-hole, and optionally uploads it to a unique and random directory on tricorder.pi-hole.net.

The intent of this script is to allow users to self-diagnose their installations. This is accomplished by running tests against our software and providing the user with links to FAQ articles when a problem is detected. Since we are a small team and Pi-hole has been growing steadily, it is our hope that this will help us spend more time on development.

NOTE: All log files auto-delete after 48 hours and ONLY the Pi-hole developers can access your data via the given token. We have taken these extra steps to secure your data and will work to further reduce any personal information gathered.

*** [ INITIALIZING ]
[i] 2017-12-13:22:21:19 debug log has been initiated.

*** [ INITIALIZING ] Sourcing setup variables
[i] Sourcing /etc/pihole/setupVars.conf...

*** [ DIAGNOSING ]: Core version
[i] Core: v3.2 (How do I update Pi-hole?)
[i] Branch: master
[i] Commit: v3.2-0-g5ba4135

*** [ DIAGNOSING ]: Web version
[i] Web: v3.2 (How do I update Pi-hole?)
[i] Branch: master
[i] Commit: v3.2-0-gf74cd82

*** [ DIAGNOSING ]: FTL version
[✓] FTL: vDev-437af07 (How do I update Pi-hole?)

*** [ DIAGNOSING ]: dnsmasq version
[i] 2.76

*** [ DIAGNOSING ]: lighttpd version
[i] 1.4.45

*** [ DIAGNOSING ]: php version
[i] 7.0.19

*** [ DIAGNOSING ]: Operating system
[✓] Raspbian GNU/Linux 9 (stretch)

*** [ DIAGNOSING ]: SELinux
[i] SELinux not detected

*** [ DIAGNOSING ]: Processor

*** [ DIAGNOSING ]: Networking
[✓] IPv4 address(es) bound to the enxb827ebf6ab73 interface:
10.0.4.70/24 matches the IP found in /etc/pihole/setupVars.conf

[✓] IPv6 address(es) bound to the enxb827ebf6ab73 interface:
fe80::21c1:8ec4:3d3:1a3d does not match the IP found in /etc/pihole/setupVars.conf (Use IPv6 ULA addresses for Pi-hole)

^ Please note that you may have more than one IP address listed.
As long as one of them is green, and it matches what is in /etc/pihole/setupVars.conf, there is no need for concern.

The link to the FAQ is for an issue that sometimes occurs when the IPv6 address changes, which is why we check for it.

[i] Default IPv4 gateway: 10.0.4.1

*** [ DIAGNOSING ]: Ports in use
[10000] is in use by miniserv.
is in use by
[139] is in use by smbd
is in use by
[22] is in use by sshd
[3128] is in use by squid
[445] is in use by smbd
[53] is in use by dnsmasq
[80] is in use by lighttpd
[53] is in use by dnsmasq
[25] is in use by master
[3306] is in use by mysqld
[4711] is in use by pihole-FTL
[53] is in use by dnsmasq
[953] is in use by named

*** [ DIAGNOSING ]: Name resolution (IPv4) using a random blocked domain and a known ad-serving domain
[✗] Failed to resolve ad.doubleclick.net.21724.9075.302br.net via localhost (127.0.0.1)
[✗] Failed to resolve ad.doubleclick.net.21724.9075.302br.net via Pi-hole (10.0.4.70)
[✓] doubleclick.com is 10.192.168.148 via a remote, public DNS server (8.8.8.8)

*** [ DIAGNOSING ]: Pi-hole processes
[✗] dnsmasq daemon is failed
[✗] lighttpd daemon is failed
[✓] pihole-FTL daemon is active

*** [ DIAGNOSING ]: Setup variables
PIHOLE_INTERFACE=enxb827ebf6ab73
IPV4_ADDRESS=10.0.4.70/24
IPV6_ADDRESS=
PIHOLE_DNS_1=208.67.222.222
PIHOLE_DNS_2=208.67.220.220
QUERY_LOGGING=true
INSTALL_WEB=true
LIGHTTPD_ENABLED=1

*** [ DIAGNOSING ]: Dashboard and block page
[✗] X-Header does not match or could not be retrieved.
HTTP/1.1 200 OK
Server: nginx/1.10.3
Date: Wed, 13 Dec 2017 22:22:06 GMT
Content-Type: text/html
Content-Length: 940
Last-Modified: Wed, 13 Dec 2017 20:36:08 GMT
Connection: keep-alive
ETag: "5a318f38-3ac"
Accept-Ranges: bytes

[✗] X-Header does not match or could not be retrieved.
HTTP/1.1 403 Forbidden
Server: nginx/1.10.3
Date: Wed, 13 Dec 2017 22:22:06 GMT
Content-Type: text/html
Content-Length: 169
Connection: keep-alive

*** [ DIAGNOSING ]: Gravity list
-rw-r--r-- 1 root root 3513139 Dec 10 02:10 /etc/pihole/gravity.list
-----head of gravity.list------
10.0.4.70 0.0.0.0
10.0.4.70 0000mps.webpreview.dsl.net
10.0.4.70 0001.2waky.com

-----tail of gravity.list------
10.0.4.70 zzsyw.com
10.0.4.70 zztxdown.com
10.0.4.70 zzz.clickbank.net
10.0.4.70 zz.zeroredirect1.com

*** [ DIAGNOSING ]: contents of /etc/pihole

-rw-r--r-- 1 root root 633 Dec 1 17:44 /etc/pihole/adlists.list
https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts
https://mirror1.malwaredomains.com/files/justdomains
http://sysctl.org/cameleon/hosts
https://zeustracker.abuse.ch/blocklist.php?download=domainblocklist
https://s3.amazonaws.com/lists.disconnect.me/simple_tracking.txt
https://s3.amazonaws.com/lists.disconnect.me/simple_ad.txt
https://hosts-file.net/ad_servers.txt

-rw-r--r-- 1 root root 527 Dec 5 16:27 /etc/pihole/blacklist.txt
r4---sn-vgqs7nez.googlevideo.com
r4.sn-vgqs7nez.googlevideo.com
www.youtube-nocookie.com
i1.ytimg.com
r17---sn-vgqsenes.googlevideo.com
r2---sn-vgqs7n7k.googlevideo.com
clients6.google.com
r1---sn-vgqsen7z.googlevideo.com
r1.sn-vgqsen7z.googlevideo.com
r20---sn-vgqs7ne7.googlevideo.com
r20.sn-vgqs7ne7.googlevideo.com
r3---sn-25ge7nes.googlevideo.com
r3.sn-25ge7nes.googlevideo.com
r5---sn-a5mlrn7z.googlevideo.com
r5.sn-a5mlrn7z.googlevideo.com
r5---sn-u2bpouxgoxu-hxaz.googlevideo.com
r5.sn-u2bpouxgoxu-hxaz.googlevideo.com

-rw-r--r-- 1 root root 37 Dec 10 02:10 /etc/pihole/local.list
10.0.4.70 myserver
10.0.4.70 pi.hole

-rw-r--r-- 1 root root 234 Dec 13 12:45 /etc/pihole/logrotate
/var/log/pihole.log {
su root root
daily
copytruncate
rotate 5
compress
delaycompress
notifempty
nomail
}
/var/log/pihole-FTL.log {
su root root
weekly
copytruncate
rotate 3
compress
delaycompress
notifempty
nomail
}

-rw-r--r-- 1 root root 117 Dec 1 17:45 /etc/pihole/whitelist.txt
raw.githubusercontent.com
mirror1.malwaredomains.com
sysctl.org
zeustracker.abuse.ch
s3.amazonaws.com
hosts-file.net

*** [ DIAGNOSING ]: contents of /etc/dnsmasq.d

-rw-r--r-- 1 root root 1527 Dec 13 12:45 /etc/dnsmasq.d/01-pihole.conf
addn-hosts=/etc/pihole/gravity.list
addn-hosts=/etc/pihole/black.list
addn-hosts=/etc/pihole/local.list
localise-queries
no-resolv
cache-size=10000
log-queries
log-facility=/var/log/pihole.log
local-ttl=2
log-async
server=208.67.222.222
server=208.67.220.220
interface=enxb827ebf6ab73

*** [ DIAGNOSING ]: contents of /etc/lighttpd

-rw-r--r-- 1 root root 3027 Dec 13 12:45 /etc/lighttpd/lighttpd.conf
server.modules = (
"mod_access",
"mod_accesslog",
"mod_auth",
"mod_expire",
"mod_compress",
"mod_redirect",
"mod_setenv",
"mod_rewrite"
)
server.document-root = "/var/www/html"
server.error-handler-404 = "pihole/index.php"
server.upload-dirs = ( "/var/cache/lighttpd/uploads" )
server.errorlog = "/var/log/lighttpd/error.log"
server.pid-file = "/var/run/lighttpd.pid"
server.username = "www-data"
server.groupname = "www-data"
server.port = 80
accesslog.filename = "/var/log/lighttpd/access.log"
accesslog.format = "%{%s}t|%V|%r|%s|%b"
index-file.names = ( "index.php", "index.html", "index.lighttpd.html" )
url.access-deny = ( "~", ".inc", ".md", ".yml", ".ini" )
static-file.exclude-extensions = ( ".php", ".pl", ".fcgi" )
compress.cache-dir = "/var/cache/lighttpd/compress/"
compress.filetype = ( "application/javascript", "text/css", "text/html", "text/plain" )
include_shell "/usr/share/lighttpd/use-ipv6.pl " + server.port
include_shell "/usr/share/lighttpd/create-mime.assign.pl"
include_shell "find /etc/lighttpd/conf-enabled -name '*.conf' -a ! -name 'letsencrypt.conf' -printf 'include "%p"
' 2>/dev/null"
$HTTP["url"] =~ "^/admin/" {

   setenv.add-response-header = (
       "X-Pi-hole" => "The Pi-hole Web interface is working!",
       "X-Frame-Options" => "DENY"
   )
   $HTTP["url"] =~ ".ttf$" {
       
       setenv.add-response-header = ( "Access-Control-Allow-Origin" => "*" )
   }

}
$HTTP["url"] =~ "^/admin/.(.*)" {
url.access-deny = ("")
}
include_shell "cat external.conf 2>/dev/null"

*** [ DIAGNOSING ]: contents of /etc/cron.d

-rw-r--r-- 1 root root 1419 Dec 13 12:45 /etc/cron.d/pihole
29 3 * * 7 root PATH="$PATH:/usr/local/bin/" pihole updateGravity
00 00 * * * root PATH="$PATH:/usr/local/bin/" pihole flush once quiet
@reboot root /usr/sbin/logrotate /etc/pihole/logrotate
*/10 * * * * root PATH="$PATH:/usr/local/bin/" pihole updatechecker

*** [ DIAGNOSING ]: contents of /var/log/lighttpd

-rw-r--r-- 1 www-data www-data 680 Dec 10 19:17 /var/log/lighttpd/error.log
2017-12-10 18:47:06: (log.c.217) server started
2017-12-10 18:47:06: (server.c.1295) WARNING: unknown config-key: alias.url (ignored)
2017-12-10 19:17:11: (log.c.217) server started
2017-12-10 19:17:11: (server.c.1295) WARNING: unknown config-key: alias.url (ignored)
2017-12-10 19:17:12: (log.c.217) server started
2017-12-10 19:17:12: (server.c.1295) WARNING: unknown config-key: alias.url (ignored)
2017-12-10 19:17:12: (log.c.217) server started
2017-12-10 19:17:12: (server.c.1295) WARNING: unknown config-key: alias.url (ignored)
2017-12-10 19:17:10: (log.c.217) server started
2017-12-10 19:17:10: (server.c.1295) WARNING: unknown config-key: alias.url (ignored)

*** [ DIAGNOSING ]: contents of /var/log

-rw-r--r-- 1 pihole pihole 30858 Dec 13 20:27 /var/log/pihole-FTL.log
[2017-12-13 00:00:02.165] NOTICE: pihole.log has been flushed
[2017-12-13 00:00:02.165] Resetting internal data structure
[2017-12-13 00:00:02.165] Queries in memory before flushing: 13624
[2017-12-13 00:00:02.546] Gravity list entries: 106854
[2017-12-13 00:00:02.547] Blacklist entries: 17
[2017-12-13 00:00:02.548] No wildcard blocking list present
[2017-12-13 00:00:02.548] Reading from /var/log/pihole.log.1 (rw-r--r--)
[2017-12-13 00:00:02.548] Notice: Increasing forwarded struct size from 0 to 4 (328.00 B)
[2017-12-13 00:00:02.553] New forward server: 208.67.220.220 resolver2.opendns.com (0/4)
[2017-12-13 00:00:02.553] Notice: Increasing overTime struct size from 0 to 100 (3.56 KB)
[2017-12-13 00:00:02.558] New forward server: 208.67.222.222 resolver1.opendns.com (1/4)
[2017-12-13 00:00:02.558] Notice: Increasing queries struct size from 0 to 10000 (323.61 KB)
[2017-12-13 00:00:02.559] Notice: Increasing domains struct size from 0 to 1000 (343.61 KB)
[2017-12-13 00:00:02.559] Notice: Increasing clients struct size from 0 to 10 (343.79 KB)
[2017-12-13 00:00:02.559] New client: 127.0.0.1 localhost (0/10)
[2017-12-13 00:00:02.568] New client: 10.0.4.90 (1/10)
[2017-12-13 00:00:03.358] Notice: Increasing overTime struct size from 100 to 200 (362.14 KB)
[2017-12-13 00:00:03.991] Reading from /var/log/pihole.log (rw-r--r--)
[2017-12-13 04:39:59.579] Notice: Increasing queries struct size from 10000 to 20000 (687.93 KB)
[2017-12-13 09:12:19.780] Notice: Increasing overTime struct size from 200 to 300 (692.16 KB)
[2017-12-13 10:47:42.622]
[2017-12-13 10:47:42.639] FTL branch: (no branch)
[2017-12-13 10:47:42.639] FTL hash: v2.11.1
[2017-12-13 10:47:42.639] FTL date: 2017-10-08 12:35:40 -0700
[2017-12-13 10:47:42.639] FTL user: pihole

*** [ DIAGNOSING ]: Pi-hole log
-rw-r--r-- 1 dnsmasq root 1941506 Dec 13 15:00 /var/log/pihole.log
-----head of pihole.log------
Dec 13 00:00:02 dnsmasq[449]: query[PTR] 220.220.67.208.in-addr.arpa from 127.0.0.1
Dec 13 00:00:02 dnsmasq[449]: cached 208.67.220.220 is resolver2.opendns.com
Dec 13 00:00:02 dnsmasq[449]: query[PTR] 222.222.67.208.in-addr.arpa from 127.0.0.1
Dec 13 00:00:02 dnsmasq[449]: cached 208.67.222.222 is resolver1.opendns.com
Dec 13 00:00:02 dnsmasq[449]: query[PTR] 90.4.0.10.in-addr.arpa from 127.0.0.1
Dec 13 00:00:02 dnsmasq[449]: config 10.0.4.90 is NXDOMAIN
Dec 13 00:00:04 dnsmasq[449]: query[PTR] 90.4.0.10.in-addr.arpa from 127.0.0.1
Dec 13 00:00:04 dnsmasq[449]: config 10.0.4.90 is NXDOMAIN
Dec 13 00:00:09 dnsmasq[449]: query[PTR] 62.4.0.10.in-addr.arpa from 127.0.0.1
Dec 13 00:00:09 dnsmasq[449]: config 10.0.4.62 is NXDOMAIN
Dec 13 00:00:09 dnsmasq[449]: query[A] yaycork.ie from 127.0.0.1
Dec 13 00:00:09 dnsmasq[449]: forwarded yaycork.ie to 208.67.220.220
Dec 13 00:00:09 dnsmasq[449]: forwarded yaycork.ie to 208.67.222.222
Dec 13 00:00:09 dnsmasq[449]: query[AAAA] yaycork.ie from 127.0.0.1
Dec 13 00:00:09 dnsmasq[449]: forwarded yaycork.ie to 208.67.220.220
Dec 13 00:00:10 dnsmasq[449]: reply yaycork.ie is 104.27.152.222
Dec 13 00:00:10 dnsmasq[449]: reply yaycork.ie is 104.27.153.222
Dec 13 00:00:10 dnsmasq[449]: reply yaycork.ie is 2400:cb00:2048:1::681b:98de
Dec 13 00:00:10 dnsmasq[449]: reply yaycork.ie is 2400:cb00:2048:1::681b:99de
Dec 13 00:00:11 dnsmasq[449]: query[A] www.facebook.com from 127.0.0.1

You need to let lighttpd have access to port 80 on the same IP that you set Pi-hole to use. Then, you can navigate to http://pi.hole/admin (or use the IP address) to go to the web interface.

well the ip/admin still return to pi hole, just text only, I guess it's an issue with PHP.

also I keep having the issue with sudo nano /etc/resolv.conf which I have to change to a external DNS otherwise I have no internet at all

You said you have apache (but I don't see it in the log), where is that running? If you are trying to access the web interface through it without setting up PHP then the page will not render correctly (it will just show text as you've seen).

A post was split to a new topic: Lost DNS resolution