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

Ubuntu: does not start after reboot #358

Closed
Hobbabobba opened this issue Mar 2, 2016 · 5 comments
Closed

Ubuntu: does not start after reboot #358

Hobbabobba opened this issue Mar 2, 2016 · 5 comments
Labels
Issue: External issue Beyond the scope of the project

Comments

@Hobbabobba
Copy link

Expected Behaviour:

after i reboot the the system, i can still use pi-hole. my other computers will still open pages on www.

Actual Behaviour:

URLs are not resolved. I always need to install pi-hole again to get it working. Until the next reboot.
I use Ubuntu on an Orange Pi PC. (When I install pi-hole inside of a Ubuntu 14 VM on ESXi, it does not to be installed again after a reboot)

@Hobbabobba
Copy link
Author

ok, found a fix. When i enter

sudo service dnsmasq restart

right after a reboot, it works! Is there a noob-friendly way to automate it?

@PromoFaux
Copy link
Member

This may be related to an issue we saw in the past with Ubuntu Mate..

I'm guessing that is what you are using?

It has to do with the interface having an arbitrary name, which is not set until the interfaces service is started. On Ubuntu mate, this happens to be started after dnsmasq. Dnsmasq initially fails because it cannot find the interface named in /etc/dnsmasq/01-pihole.conf

Could you paste in the output of:
cat /etc/dnsmasq/01-pihole.conf please?

@PromoFaux
Copy link
Member

@Hobbabobba
Copy link
Author

There is no file of this kind, but there is a config-file /etc/dnsmasq.d/01-pihole.conf

# Pi-hole: A black hole for Internet advertisements
# (c) 2015, 2016 by Jacob Salmela
# Network-wide ad blocking via your Raspberry Pi
# http://pi-hole.net
# dnsmasq config for Pi-hole
#
# Pi-hole is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 2 of the License, or
# (at your option) any later version.

# If you want dnsmasq to read another file, as well as /etc/hosts, use
# this.
addn-hosts=/etc/pihole/gravity.list

# The following two options make you a better netizen, since they
# tell dnsmasq to filter out queries which the public DNS cannot
# answer, and which load the servers (especially the root servers)
# unnecessarily. If you have a dial-on-demand link they also stop
# these requests from bringing up the link unnecessarily.

# Never forward plain names (without a dot or domain part)
domain-needed
# Never forward addresses in the non-routed address spaces.
bogus-priv

# If you don't want dnsmasq to read /etc/resolv.conf or any other
# file, getting its servers from this file instead (see below), then
# uncomment this.
no-resolv

# Add other name servers here, with domain specs if they are for
# non-public domains.
server=208.67.222.123
server=208.67.220.123

# If you want dnsmasq to listen for DHCP and DNS requests only on
# specified interfaces (and the loopback) give the name of the
# interface (eg eth0) here.
# interface=eth0
# Or which to listen on by address (remember to include 127.0.0.1 if
# you use this.)
# listen-address=127.0.0.1

# Set the cachesize here.
cache-size=10000

# For debugging purposes, log each DNS query as it passes through
# dnsmasq.
log-queries
log-facility=/var/log/pihole.log

# Normally responses which come from /etc/hosts and the DHCP lease
# file have Time-To-Live set as zero, which conventionally means
# do not cache further. If you are happy to trade lower load on the
# server for potentially stale date, you can set a time-to-live (in
# seconds) here.
local-ttl=300

# This allows it to continue functioning without being blocked by syslog, and allows syslog to use dnsmasq for DNS queries without risking deadlock
log-async

I used the fix from the reddit-Post, now it works. My current OS on the Orange Pi is Ubuntu Trusty Tahr.

@PromoFaux PromoFaux added question Issue: External issue Beyond the scope of the project and removed possible bug labels Mar 2, 2016
@PromoFaux
Copy link
Member

Ah, yeah apologies I meant /etc/dnsmasq.d/01-pihole.conf :)

OK, so it looks like Ubuntu in general starts networkmanager after dnsmasq

Thanks for the report!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue: External issue Beyond the scope of the project
Projects
None yet
Development

No branches or pull requests

3 participants