No Internet connection

I wanted to update pi hole on the Raspberry Pi (pihole -up). Then I noticed that I don’t have an internet connection.
The admin console / GUI is reachable. I can access the Raspi via SSH or VNC in the local network.
The name resolution on the Raspberry does not work.
I executed pihole -d:

*** [ DIAGNOSING ]: Name resolution (IPv4) using a random blocked domain and a known ad-serving domain
dig: '' is not a legal name (unexpected end of input)
[✗] Failed to resolve via localhost (127.0.0.1)
dig: '' is not a legal name (unexpected end of input)
[✗] Failed to resolve via Pi-hole (192.168.99.4)
[✓] doubleclick.com is 216.58.215.238 via a remote, public DNS server (8.8.8.8)
*** [ DIAGNOSING ]: Pi-hole processes
[✓] lighttpd daemon is active
[✓] pihole-FTL daemon is active

The file /etc/dhcpcd.conf contains the necessary information.

interface eth0
static ip_address=192.168.99.4/24
static routers=192.168.99.1
static domain_name_servers=192.168.99.4
static domain_search=

I have restarted the Raspberry as well as the network interface many times. Also a new setup of pihole via pihole -r did not bring any success.

What can I do?
Thank you very much for your help!

Looks like the commands didn’t have a valid address to query.

Can you upload a debug log via pihole -d ?

Also, what’s the output of pihole -g ?

Thank’s for the fast reply.
OK, I can upload a debug log. Do I have to provide the ID?

Currently I have lost the connection via VNC and SSH. I have to set up everything on site and then run pihole -g as well and upload the log.
I’ve been gone two days now. I’ll get back to you after.

Yes please.

:tardis:

Have you edited this line manually ?
Why not leave it at default 127.0.0.1 on the loopback interface named lo.
That way nothing gets broadcasted over the eht0 interface.
And the loopback interface is way more faster than the 10/100/1000 mbit your eth0 is connected to now.

EDIT: typo

My Raspberry Pi and also Pi-hole are up an running again.
I did a restore of the SD Card.

I didn’t even think about the loopback. Yes, I made the entry for “static domain_name_servers” manually by myself.
How can I change from eh0 to lo and then set the localhost IP?

You only have to change back the IP into 127.0.0.1:

Bad idea. After the adjustment to 127.0.0.1 nothing works anymore. I can no longer access the Raspi / pi-hole.
I have to organize a monitor incl. cable, etc. so that I can get to the Raspi…

Changing /etc/resolv.conf to 127.0.0.1 will not cause it to become unresponsive. At worst it would just not be able to resolve names to IP addresses. Communication via IP would be unaffected.

The software “Pi Finder” from Adfruit is handy to find any Pi on your network.

Thank you very much for the replies!

Oops :scream: I always wrote from the file /etc/dhcpcd.conf. Here about the entry “static domain_name_servers”.
Do I have do change to 127.0.0.1 in /etc/resolv.conf? :thinking:

Thank you @jfb for the tip on Pi Finder. I will try it out.

No.
dhcpcd does that for you by calling bellow one:

pi@noads:~ $ man resolvconf
[..]
DESCRIPTION
       The resolvconf package comprises a simple database  for  run-time
       nameserver  information  and  a  simple  framework  for notifying
       applications of changes in  that  information.   Resolvconf  thus
       sets  itself  up as the intermediary between programs that supply
       nameserver information and applications that  use  that  informa‐
       tion.

       Information  is  added  to or removed from the database using the
       resolvconf program.  See the OPTIONS section below for a  discus‐
       sion of the available options.

OK.
/etc/resolv.conf is

# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
#     DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
nameserver 127.0.0.1

Hm, but now again. Same problem as in the beginning. No Internet connection.
I also cannot update a debug log via pihole -d

But your able to ping from Pi-hole to an outside address like for example Google’s DNS at 8.8.8.8 right ?

ping 8.8.8.8

Check status for the pihole-FTL daemon thats suppose to answer DNS queries on 127.0.0.1:

sudo service pihole-FTL status

journalctl -u pihole-FTL

Yes. I get replies if I ping 8.8.8.8.

Output of sudo service pihole-FTL status is:

● pihole-FTL.service - LSB: pihole-FTL daemon
   Loaded: loaded (/etc/init.d/pihole-FTL; generated; vendor preset: enabled)
   Active: active (exited) since Mon 2018-12-17 21:43:34 CET; 2min 43s ago
     Docs: man:systemd-sysv-generator(8)
  Process: 2796 ExecStop=/etc/init.d/pihole-FTL stop (code=exited, status=0/SUCC
  Process: 2855 ExecStart=/etc/init.d/pihole-FTL start (code=exited, status=0/SU

Dez 17 21:43:23 RASPI-01 systemd[1]: Starting LSB: pihole-FTL daemon...
Dez 17 21:43:23 RASPI-01 pihole-FTL[2855]: Not running
Dez 17 21:43:33 RASPI-01 su[2908]: Successful su for pihole by root
Dez 17 21:43:33 RASPI-01 su[2908]: + ??? root:pihole
Dez 17 21:43:33 RASPI-01 su[2908]: pam_unix(su:session): session opened for user
Dez 17 21:43:34 RASPI-01 pihole-FTL[2855]: FTL started!
Dez 17 21:43:34 RASPI-01 systemd[1]: Started LSB: pihole-FTL daemon.

And journalctl -u pihole-FTL

- Logs begin at Thu 2016-11-03 18:16:42 CET, end at Mon 2018-12-17 21:44:33 CET
Dez 17 21:34:01 RASPI-01 systemd[1]: Starting LSB: pihole-FTL daemon...
Dez 17 21:34:01 RASPI-01 pihole-FTL[344]: Not running
Dez 17 21:34:13 RASPI-01 su[835]: Successful su for pihole by root
Dez 17 21:34:13 RASPI-01 su[835]: + ??? root:pihole
Dez 17 21:34:13 RASPI-01 su[835]: pam_unix(su:session): session opened for user 
Dez 17 21:34:14 RASPI-01 pihole-FTL[344]: FTL started!
Dez 17 21:34:14 RASPI-01 systemd[1]: Started LSB: pihole-FTL daemon.
Dez 17 21:41:51 RASPI-01 systemd[1]: Stopping LSB: pihole-FTL daemon...
Dez 17 21:41:52 RASPI-01 pihole-FTL[1867]: .
Dez 17 21:41:52 RASPI-01 pihole-FTL[1867]: Stopped
Dez 17 21:41:52 RASPI-01 systemd[1]: Stopped LSB: pihole-FTL daemon.
Dez 17 21:41:52 RASPI-01 systemd[1]: Starting LSB: pihole-FTL daemon...
Dez 17 21:41:52 RASPI-01 pihole-FTL[1926]: Not running
Dez 17 21:42:03 RASPI-01 su[1980]: Successful su for pihole by root
Dez 17 21:42:03 RASPI-01 su[1980]: + ??? root:pihole
Dez 17 21:42:03 RASPI-01 su[1980]: pam_unix(su:session): session opened for user
Dez 17 21:42:03 RASPI-01 pihole-FTL[1926]: FTL started!
Dez 17 21:42:03 RASPI-01 systemd[1]: Started LSB: pihole-FTL daemon.
Dez 17 21:42:32 RASPI-01 systemd[1]: Stopping LSB: pihole-FTL daemon...
Dez 17 21:42:33 RASPI-01 pihole-FTL[2061]: .
Dez 17 21:42:33 RASPI-01 pihole-FTL[2061]: Stopped
Dez 17 21:42:33 RASPI-01 systemd[1]: Stopped LSB: pihole-FTL daemon.
lines 1-23

Date and time are not correct :wink:
This is not set correctly due to the missing internet connection.

On Pi-hole, do you get reply from a DNS lookup directed at the loopback IP:

nslookup pi.hole $(hostname -i)

And targeting the IP on the physical interface:

nslookup pi.hole $(hostname -I)

Yes indeed.
The time syncing daemon systemd-timesyncd or ntpd depends on DNS resolution to be able to sync to a time server.

EDIT: ps. status looks good and appears pihole-FTL is running/active.

1 Like

Yes.
For nslookup pi.hole $(hostname -i)

nslookup pi.hole $(hostname -i)
Server:		127.0.1.1
Address:	127.0.1.1#53

Name:	pi.hole
Address: 192.168.99.4

and for nslookup pi.hole $(hostname -I)

nslookup pi.hole $(hostname -I)
Server:		192.168.99.4
Address:	192.168.99.4#53

Name:	pi.hole
Address: 192.168.99.4

And a lookup for a name that pihole-FTL doesnt have a record for and needs to forward to the upstream configured DNS server(s):

nslookup pi-hole.net

Then I get

nslookup pi-hole.net
Server:		127.0.0.1
Address:	127.0.0.1#53

** server can't find pi-hole.net: SERVFAIL

Please generate a Pi-Hole debug log, upload when prompted and post the token here.