I posted this in another topic but figured I'd post it here, too. After one of the latest updates, that started to happen to me too. Interestingly, that thing happens only after a power outage, where the Raspberry Pi didn't get shut down properly – every time. With previous versions, that did not happen, even when power was unstable.
Naturally, when that happens, the http://pi.hole/ domain does not resolve too.
However, I do not have to reinstall; running 'pihole -r' and selecting "repair" fixes the problem. Yet, it's a bit of a pain to do that every time the power goes down, and it has been unstable here for the last couple of days. Moreover, even rebooting Raspbian properly bears the same consequences, requiring a repair ('pihole -r'). Perhaps some file does not get properly closed, causing corruption?
Wish it was that simple for me. I lose power quite often at my home.Each time the pi-hole dies as a result.
When this happens I am not able to SSH to the pi (using putty.exe). But I can ping it. Is there still some way to run commands without being able SSH to the pi?
My workaround has been to get a UPS. That seemed to fix the dilemma. But today the power went out for longer than normal and I decided I'd better shut off the UPS as I didn't know how long the outage would last and didn't want to exhaust the UPS. I was crossing my fingers that maybe the UPS shut down would somehow be a more gentle power cut off than and it would save the pi-hole. Wrong!
My fix has been to make a backup image and do a restore from that backup image whenever the pi-hole dies. It's about a 30 minute recovery process to get everything back. But if there was a less drastic way to get it working again I'd sure like to know.
Maybe I just get second micro-SD card and with the backup image on it always ready to swap out when this happens. Seems so wrong to have to do this but at least that would minimize the down time.
Yes there is if hook up monitor/keyboard and login via console.
But if you lose connectivity to the Pi-Hole daemons as well as SSH, something is seriously wrong with your setup.
Is it a Raspberry Pi with Raspbian installed ?
Any other software installed that might cause issues ?
When in sh.t creek, does the Pi still have an IP ?
pi@noads:~ $ ip addr show eth0
inet 10.0.0.2/24 brd 10.0.0.255 scope global eth0
Is the SSH daemon running ?
pi@noads:~ $ sudo service ssh status
Active: active (running) since Mon 2017-05-29 19:58:35 CEST; 5 days ago
How is the filesystem mounted (is it ro=read only)?
pi@noads:~ $ mount | grep ' / '
/dev/mmcblk0p2 on / type ext4 (rw,noatime,data=ordered)
Below one will initiate a filesystem check at boot:
I recently got a DMI to VGA adapter so I could have hooked it up!
But that thought never passed my mind. Ugh. That was my bad.
This morning after the outage it did have an IP. The same one as before. And I could ping that IP.
Below is from the pi-hole I restored from an image this morning. I don't think this is of much use as we would need to run these commands on the pi-hole after it's down from my next power outage?
pi@raspberrypi:~ $ ip addr show eth0 2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000 link/ether b8:27:eb:45:64:fc brd ff:ff:ff:ff:ff:ff inet 192.168.0.14/24 brd 192.168.0.255 scope global eth0 valid_lft forever preferred_lft forever inet6 fe80::d351:d42e:1342:d6b5/64 scope link valid_lft forever preferred_lft forever pi@raspberrypi:~ $ sudo service ssh status ● ssh.service - OpenBSD Secure Shell server Loaded: loaded (/lib/systemd/system/ssh.service; enabled) Active: active (running) since Sun 2017-03-05 17:17:06 EST; 2 months 29 days ago Main PID: 710 (sshd) CGroup: /system.slice/ssh.service ├─ 710 /usr/sbin/sshd -D ├─5360 sshd: pi [priv] ├─5366 sshd: pi@pts/0 ├─5368 -bash ├─5448 sudo service ssh status └─5452 systemctl status ssh.service Mar 05 17:17:06 raspberrypi systemd[1]: Started OpenBSD Secure Shell server. Mar 05 17:17:07 raspberrypi sshd[710]: Server listening on 0.0.0.0 port 22. Mar 05 17:17:07 raspberrypi sshd[710]: Server listening on :: port 22. Jun 03 21:19:52 raspberrypi sshd[5360]: Accepted password for pi from 192.168.0.11 port 57021 ssh2 Jun 03 21:19:52 raspberrypi sshd[5360]: pam_unix(sshd:session): session opened for user pi by (uid=0) Jun 03 21:25:52 raspberrypi sudo[5419]: pi : TTY=pts/0 ; PWD=/home/pi ; USER=root ; COMMAND=/usr/sbin...atus Jun 03 21:25:52 raspberrypi sudo[5419]: pam_unix(sudo:session): session opened for user root by pi(uid=0) Jun 03 21:25:52 raspberrypi sudo[5419]: pam_unix(sudo:session): session closed for user root Jun 03 21:26:13 raspberrypi sudo[5448]: pi : TTY=pts/0 ; PWD=/home/pi ; USER=root ; COMMAND=/usr/sbin...atus Jun 03 21:26:13 raspberrypi sudo[5448]: pam_unix(sudo:session): session opened for user root by pi(uid=0) Hint: Some lines were ellipsized, use -l to show in full. pi@raspberrypi:~ $ mount | grep ' / ' /dev/mmcblk0p2 on / type ext4 (rw,noatime,data=ordered)
I am having a similar problem. When I loose power to my rasberry 3 pi B+ running:
pihole -v
Pi-hole version is v3.3.1 (Latest: v3.3.1)
AdminLTE version is v3.3 (Latest: v3.3)
FTL version is v3.0 (Latest: v3.0)
pi hole doesn't service requests and so computers on the network don't have internet access. However, if I simply go to the pi-hole admin page from another computer to the rasberry pi pi-hole starts running and the other computers have access to the internet. I really need this to come up cleanly after a power outage so others in the family don't need to deal with this.
pi@raspberrypi:~ $ sudo systemctl status pihole-FTL.service
● pihole-FTL.service - LSB: pihole-FTL daemon
Loaded: loaded (/etc/init.d/pihole-FTL; generated; vendor preset: enabled)
Active: active (exited) since Fri 2018-06-08 10:38:11 EDT; 3min 42s ago
Docs: man:systemd-sysv-generator(8)
Process: 284 ExecStart=/etc/init.d/pihole-FTL start (code=exited, status=0/SUCCESS)
CGroup: /system.slice/pihole-FTL.service
Jun 08 10:38:07 raspberrypi systemd[1]: Starting LSB: pihole-FTL daemon...
Jun 08 10:38:08 raspberrypi pihole-FTL[284]: Not running
Jun 08 10:38:08 raspberrypi pihole-FTL[284]: rm: cannot remove '/var/run/pihole/FTL.sock': No such file or directory
Jun 08 10:38:09 raspberrypi su[361]: Successful su for pihole by root
Jun 08 10:38:09 raspberrypi su[361]: + ??? root:pihole
Jun 08 10:38:09 raspberrypi su[361]: pam_unix(su:session): session opened for user pihole by (uid=0)
Jun 08 10:38:11 raspberrypi pihole-FTL[284]: FTL started!
Jun 08 10:38:11 raspberrypi systemd[1]: Started LSB: pihole-FTL daemon.
pi@raspberrypi:~ $
pi@raspberrypi:~ $ sudo systemctl status dnsmasq
● dnsmasq.service - dnsmasq - A lightweight DHCP and caching DNS server
Loaded: loaded (/lib/systemd/system/dnsmasq.service; enabled; vendor preset: enabled)
Active: active (running) since Fri 2018-06-08 10:38:11 EDT; 3min 41s ago
Process: 467 ExecStartPost=/etc/init.d/dnsmasq systemd-start-resolvconf (code=exited, status=0/SUCCESS)
Process: 450 ExecStart=/etc/init.d/dnsmasq systemd-exec (code=exited, status=0/SUCCESS)
Process: 379 ExecStartPre=/usr/sbin/dnsmasq --test (code=exited, status=0/SUCCESS)
Main PID: 463 (dnsmasq)
CGroup: /system.slice/dnsmasq.service
└─463 /usr/sbin/dnsmasq -x /run/dnsmasq/dnsmasq.pid -u dnsmasq -r /run/dnsmasq/resolv.conf -7 /etc/dnsmasq.d,.dpkg
Jun 08 10:38:08 raspberrypi systemd[1]: Starting dnsmasq - A lightweight DHCP and caching DNS server...
Jun 08 10:38:11 raspberrypi dnsmasq[379]: dnsmasq: syntax check OK.
Jun 08 10:38:11 raspberrypi systemd[1]: Started dnsmasq - A lightweight DHCP and caching DNS server.
...skipping...
Both nslookup commands returned the correct reply. That means that the DNS resolution was working, at least locally. (flurry.com is a known blocked domain and it was Pi-holed).
The Lighttpd Daemon on the other hand ... is behaving weirdly
Nslookup on my macbook after reboot but nothing else:
2017-Bens-MacBook-Pro:Downloads Ben$ nslookup flurry.com
;; connection timed out; no servers could be reached
VNC'd to rasberry pi 192.168.1.12
Nslookup on rasberry pi:
pi@raspberrypi:~ $ nslookup flurry.com
Server: 127.0.0.1
Address: 127.0.0.1#53
This does not seem to be related to the Pi-hole instance.
You were able to connect to the raspberry via VNC and the DNS worked when you queried the domain.
what's the response you get from your client when you run
nslookup flurry.com 192.168.1.12
After raspberry reboot, can you access the flurry page on a different device (maybe cell phone/tablet)?
2017-Bens-MacBook-Pro:Downloads Ben$ echo before reboot of raspberry pi
before reboot of raspberry pi
2017-Bens-MacBook-Pro:Downloads Ben$ nslookup flurry.com 192.168.1.12
Server: 192.168.1.12
Address: 192.168.1.12#53
Name: flurry.com
Address: 192.168.1.12
2017-Bens-MacBook-Pro:Downloads Ben$ echo after raspberry pi reboot
after raspberry pi reboot
2017-Bens-MacBook-Pro:Downloads Ben$ nslookup flurry.com 192.168.1.12
;; connection timed out; no servers could be reached
After reboot on my iphone i could not reach yahoo.com.
Then I went to pi-hole admin page on my iphone
Then I was able to access yahoo.com from my iphone.