Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DNS service not starting in Ubuntu 20.04 #645

Closed
1 task done
timwebster9 opened this issue Jul 3, 2020 · 7 comments
Closed
1 task done

DNS service not starting in Ubuntu 20.04 #645

timwebster9 opened this issue Jul 3, 2020 · 7 comments

Comments

@timwebster9
Copy link

This is a: Run issue

Details

This is Pi-Hole v4.4

When the container starts, the DNS service doesn't come up and the initialisation script starts failing. This only just started happening after I upgraded to Ubuntu 20.04. I have another pi in the cluster which is still at 19.10 and Pi-Hole still working fine there.

Now, I'm using Kubernetes (microk8s) which uses containerd so there is no Docker involved. I'm not expecting any support on that front, but just wondering if there is anything I can do to troubleshoot this. The main issue seems to be this:

[✗] DNS service is NOT running

Things I've tried:

  • disabling systemd-resolv (didn't help but it wouldn't anyways as I'm exposing port 53 via a service using a metallb load balancer on a different IP address)
  • using the explicit armhf tag of the image. Didn't make a difference.

Everything in the log seems somewhat normal up until here:

  [✓] Consolidating blocklists
  [✓] Extracting domains from blocklists
  [i] Number of domains being pulled in by gravity: 3305689
  [✓] Removing duplicate domains
  [i] Number of unique domains trapped in the Event Horizon: 2844953
  [i] Number of whitelisted domains: 3
  [i] Number of regex filters: 9
  [✓] Parsing domains into hosts format
  [✓] Cleaning up stray matter

  [✗] DNS service is NOT running
kill: usage: kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l [sigspec]
[cont-init.d] 20-start.sh: exited 0.
[cont-init.d] done.
[services.d] starting services
Starting crond
Starting pihole-FTL (no-daemon) as root
Starting lighttpd
[services.d] done.
Stopping pihole-FTL
kill: usage: kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l [sigspec]
Starting pihole-FTL (no-daemon) as root
Stopping pihole-FTL
kill: usage: kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l [sigspec]
Starting pihole-FTL (no-daemon) as root
Stopping pihole-FTL
kill: usage: kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l [sigspec]
Starting pihole-FTL (no-daemon) as root
Stopping pihole-FTL
kill: usage: kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l [sigspec]

Related Issues

How to reproduce the issue

  1. Environment data
  • Operating System: Ubuntu 20.04 LTS
  • Hardware: RasPi 4B 4 GB
  • Docker Install Info and version: using microk8s (not Docker it uses containerd)
  • Pi-Hole version: pihole/pihole:v4.4-armhf, pihole/pihole:v4.4
@drpoutine
Copy link

Attaching to pi-hole
pi-hole        | [s6-init] making user provided files available at /var/run/s6/etc...exited 0.
pi-hole        | [s6-init] ensuring user provided files have correct perms...exited 0.
pi-hole        | [fix-attrs.d] applying ownership & permissions fixes...
pi-hole        | [fix-attrs.d] 01-resolver-resolv: applying...
pi-hole        | [fix-attrs.d] 01-resolver-resolv: exited 0.
pi-hole        | [fix-attrs.d] done.
pi-hole        | [cont-init.d] executing container initialization scripts...
pi-hole        | [cont-init.d] 20-start.sh: executing...
pi-hole        | stty: 'standard input': Inappropriate ioctl for device
pi-hole        |  ::: Starting docker specific checks & setup for docker pihole/pihole
pi-hole        | WARNING Misconfigured DNS in /etc/resolv.conf: Two DNS servers are recommended, 127.0.0.1 and any backup server
pi-hole        | WARNING Misconfigured DNS in /etc/resolv.conf: Primary DNS should be 127.0.0.1 (found 127.0.0.11)
pi-hole        |
pi-hole        | search earth.home
pi-hole        | nameserver 127.0.0.11
pi-hole        | options edns0 ndots:0
pi-hole        | Assigning random password: NnR02jGL
pi-hole        | stty: 'standard input': Inappropriate ioctl for device
pi-hole        |   [i] Existing PHP installation detected : PHP version 7.0.33-0+deb9u1
pi-hole        |
pi-hole        |   [i] Installing configs from /etc/.pihole...
pi-hole        |   [i] Existing dnsmasq.conf found... it is not a Pi-hole file, leaving alone!
  [✓] Copying 01-pihole.conf to /etc/dnsmasq.d/01-pihole.conf
pi-hole        | chown: cannot access '/etc/pihole/dhcp.leases': No such file or directory
pi-hole        | ::: Pre existing WEBPASSWORD found
pi-hole        | Using custom DNS servers: '10.1.0.2#5054' & ''
pi-hole        | DNSMasq binding to default interface: eth0
pi-hole        | Added ENV to php:
pi-hole        | 			"PHP_ERROR_LOG" => "/var/log/lighttpd/error.log",
pi-hole        | 			"ServerIP" => "10.1.0.3",
pi-hole        | 			"VIRTUAL_HOST" => "10.1.0.3",
pi-hole        | Using IPv4
pi-hole        | ::: Preexisting ad list /etc/pihole/adlists.list detected ((exiting setup_blocklists early))
pi-hole        | https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts
pi-hole        | https://mirror1.malwaredomains.com/files/justdomains
pi-hole        | https://s3.amazonaws.com/lists.disconnect.me/simple_tracking.txt
pi-hole        | https://s3.amazonaws.com/lists.disconnect.me/simple_ad.txt
pi-hole        | ::: Testing pihole-FTL DNS: FTL started!
pi-hole        |
pi-hole        | dnsmasq: cannot open log /var/log/pihole.log: Is a directory
pi-hole        | ::: Testing lighttpd config: Syntax OK
pi-hole        | ::: All config checks passed, cleared for startup ...
pi-hole        |  ::: Docker start setup complete
pi-hole        |   [i] Pi-hole blocking is enabled
pi-hole        |   [i] Neutrino emissions detected...
  [✓] Pulling blocklist source list into range
pi-hole        |
pi-hole        |   [i] Target: raw.githubusercontent.com (hosts)
  [✓] Status: Retrieval successful
pi-hole        |
pi-hole        |   [i] Target: mirror1.malwaredomains.com (justdomains)
  [✓] Status: No changes detected
pi-hole        |
pi-hole        |   [i] Target: s3.amazonaws.com (simple_tracking.txt)
  [✓] Status: No changes detected
pi-hole        |
pi-hole        |   [i] Target: s3.amazonaws.com (simple_ad.txt)
  [✓] Status: No changes detected
pi-hole        |
  [✓] Consolidating blocklists
  [✓] Extracting domains from blocklists
pi-hole        |   [i] Number of domains being pulled in by gravity: 87028
  [✓] Removing duplicate domains
pi-hole        |   [i] Number of unique domains trapped in the Event Horizon: 84598
pi-hole        |   [i] Nothing to whitelist!
pi-hole        |   [i] Number of regex filters: 0
  [✓] Parsing domains into hosts format
  [✓] Cleaning up stray matter
pi-hole        |
pi-hole        |   [✗] DNS service is NOT running
pi-hole        | kill: usage: kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l [sigspec]
pi-hole        | [cont-init.d] 20-start.sh: exited 0.
pi-hole        | [cont-init.d] done.
pi-hole        | [services.d] starting services
pi-hole        | Starting crond
pi-hole        | Starting pihole-FTL (no-daemon) as root
pi-hole        | Starting lighttpd
pi-hole        | [services.d] done.
pi-hole        | Stopping pihole-FTL
pi-hole        | kill: usage: kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l [sigspec]
pi-hole        | Starting pihole-FTL (no-daemon) as root
pi-hole        | Stopping pihole-FTL

I have the same issue as well and seems to be related to docker not respecting --dns 127.0.0.1 flag in my docker-compose yaml. Has anyone found a workaround to this? I've already tried to reinstall docker.

@dschaper
Copy link
Member

dschaper commented Jul 4, 2020

dnsmasq: cannot open log /var/log/pihole.log: Is a directory That will prevent pihole-FTL from starting.

What are you using for volume mounts?

@drpoutine
Copy link

dnsmasq: cannot open log /var/log/pihole.log: Is a directory That will prevent pihole-FTL from starting.

What are you using for volume mounts?

k yea i figured that out. its always the simple things. forgot to ran touch for pihole.log so this might be OPs issue as well i completely forgot about that requirement before trying to spin up the docker instance. run touch /*path*/pihole.log before you spin up the container or FTL can't start. Thanks @dschaper

@timwebster9
Copy link
Author

I gave up and switched to Ubuntu 18.04 LTS; microk8s is supported on all the LTS versions now and I wanted to get off of 19.10. I also wanted to move to a larger SD card anyways. It now works fine - the only difference is the Ubuntu version. Since I changed everything and it now works I can't really go back and troubleshoot anymore - I'll leave it up the repo owners if they want to close the ticket.

@jxsl13
Copy link

jxsl13 commented Aug 8, 2020

pi-hole | WARNING Misconfigured DNS in /etc/resolv.conf: Primary DNS should be 127.0.0.1 (found 127.0.0.11)

I have this issue as well, it found 127.0.0.11
there is some arbitrary 1 at the end there

@DerRockWolf
Copy link

This "arbitrary 1" (127.0.0.11) is the Docker embedded DNS server that is used to resolve container DNS requests.
The embedded DNS server then queries the configured DNS server of the host system, if not changed.
View https://docs.docker.com/config/containers/container-networking/#dns-services

@github-actions
Copy link

This issue is stale because it has been open 30 days with no activity. Please comment or update this issue or it will be closed in 5 days.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants