Pi loses internet connection during install

It looks like it's working correctly. You can add whatever you want to the blacklist/ad domain lists. There's some ad domain lists here: https://wally3k.github.io/

Thx! Unfortunately, after rebooting the Pi, I get the same problem again...
I tried removing the .conf file, let pihole create one through the repair process, comment out the duplicate options in NextcloudPi's .conf file (all several times and in different orders). Nothing works, I can't restart dnsmasq. Very strange.
I can't access the internet at all, not even after rebooting.

Make another debug token.

Not possible because of lacking internet. Here's the terminal output:

pi@raspberrypi:~ $ pihole -d
::: Beginning Pi-hole debug at Wed 6 Sep 14:08:18 UTC 2017!
:::
::: This process collects information from your Pi-hole, and optionally uploads
::: it to a unique and random directory on tricorder.pi-hole.net.
:::
::: 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.
:::
::: Please read and note any issues, and follow any directions advised during this process.
:::
::: ---= Detecting Installed Package Versions:
::: Pi-hole: v3.1.4 (master:v3.1.4-0-gb0ecedd)
::: Pi-hole Dashboard: v3.1 (master:v3.1-0-gf204b71)
::: lighttpd not installed.
::: PHP 7.0.19-1 (cli) (built: May 11 2017 14:04:47) ( NTS )
REQUIRED FILES MISSING
:::
::: ---= Detecting existence of /etc/pihole/setupVars.conf:
::: File exists, parsing...done and was successfully sourced
:::
::: ---= Detecting installed OS Distribution
:::
::: ---= Checking processor variety
:::
::: ---= Checking IPv6 Stack
::: IPv6 addresses located on wlan0
::: No gateway detected.
:::
::: ---= Checking IPv4 Stack
::: IPv4 addresses located on wlan0
::: Pinging default IPv4 gateway: ::: Gateway responded.
::: Pinging Internet via IPv4: ::: Query responded.
:::
::: ---= Daemon Process Information
::: Checking http port for lighttpd listener.
::: Failure: IPv4 Port not in use
:::
::: ---= Daemon Process Information
::: Checking domain port for dnsmasq listener.
::: Failure: IPv4 Port not in use
:::
::: ---= Daemon Process Information
::: Checking 4711 port for pihole-FTL listener.
::: Correctly configured.
:::
::: ---= Processes Check
::: Logging status of lighttpd, dnsmasq and pihole-FTL...
:::
::: ---= Resolver Functions Check (IPv4)
::: Checking for necessary lighttpd files.
:::
::: ---= Detecting existence of /etc/lighttpd/lighttpd.conf:
::: /etc/lighttpd/lighttpd.conf not found!
:::
::: ---= Detecting existence of /var/log/lighttpd/error.log:
::: /var/log/lighttpd/error.log not found!
:::
:::
::: ---= Detecting existence of /etc/dnsmasq.conf:
::: File exists, parsing...done
:::
::: ---= Detecting contents of /etc/dnsmasq.d/*:
:::
::: ---= File /etc/dnsmasq.d/01-pihole.conf found
::: Parsing...done
:::
::: ---= File /etc/dnsmasq.d/01-pihole.conf.save found
::: Parsing...done
:::
::: ---= File /etc/dnsmasq.d/README found
::: Parsing...done
:::
:::
::: ---= Detecting existence of /etc/pihole/whitelist.txt:
::: File exists, parsing...done
:::
::: ---= Detecting existence of /etc/pihole/blacklist.txt:
::: /etc/pihole/blacklist.txt not found!
:::
::: ---= Detecting existence of /etc/pihole/adlists.list:
::: File exists, parsing...done
:::
::: ---= Analyzing gravity.list
:::
::: ---= Analyzing pihole.log
:::
::: ---= Analyzing pihole-FTL.log
:::
::: --= User Action Required =--
::: Try loading a site that you are having trouble with now from a client web browser..
::: (Press CTRL+C to finish logging.)
:::
::: ---= pihole.log
::: Logging will automatically teminate in 60 seconds
::: Finshed debugging!.
::: The debug log can be uploaded to tricorder.pi-hole.net for sharing with developers only.
::: Would you like to upload the log? [y/N] y
nc: getaddrinfo: Temporary failure in name resolution
::: There was an error uploading your debug log.
::: Please try again or contact the Pi-hole team for assistance.
::: A local copy of the Debug log can be found at : /var/log/pihole_debug.log

You can share the debug log located at /var/log/pihole_debug.log

It does look like it has internet access:

::: —= Checking IPv4 Stack
::: IPv4 addresses located on wlan0
::: Pinging default IPv4 gateway: ::: Gateway responded.
::: Pinging Internet via IPv4: ::: Query responded.

It must just not have DNS capabilities.

You're right of course, it's merely a problem with DNS.

Here is

Sorry for the wall of text.

It may be that dnsmasq is also parsing this file: /etc/dnsmasq.d/01-pihole.conf.save

I'm sorry, but what are you suggesting (if anything)?
I commented out all the entries in dnsmasq.conf except no-poll and address=..., so there are no duplicates left.

Remove that file from the directory because it has duplicate commands.

You're awesome, thanks a milllion! That solved the issue. I didn't realize that it would look for all files in that directory.

One other issue showed up. It's probably related, so I'll post it here:

fritz.box can't be resolved anymore. The domain pointing to my local cloudserver can though.
Any idea why that could be?

Your router probably had that locally set when you were using it as the DNS server. Add an association between your router's IP and fritz.box to your /etc/hosts file.

1 Like

That worked. Again, thanks for everything.

I had this issue too. After several failed installation, I started first with
sudo -i
and the installation went smooth. I wasn't able to run "apt-get upgrade" either without having root access.