Working on and off

Expected Behaviour:

Consistent internet and DHCP.

Actual Behaviour:

This is a bit tricky as I’m not certain what is going on. In short, the pihole works for a few hours then stops providing internet. Sometimes, after anything from a few minutes to a few hours, it will start working again, as if nothing had gone wrong.

When it is not working a device generally cannot get an IP address (and therefore no internet). If you have a connection already it comes up with internet pages not available. If I check the pi zero it generally starts working again (but not always). I ran the debug when there was no internet connection but it seems to have come back online whilst the log was running.

I originally thought it was a power issue but now have a 2A plug connected; it seemed to work for about 24 hours then had the same issue. I have also turned off power management on WiFi.

Debug Token:

https://tricorder.pi-hole.net/10h0hs52ld

I ran service pihole-FTL status when it was off on a previous time:

pihole-FTL.service - LSB: pihole-FTL daemon
   Loaded: loaded (/etc/init.d/pihole-FTL; generated; vendor preset: enabled)
   Active: active (exited) since Sat 2019-05-25 21:53:59 BST; 1 day 10h ago
     Docs: man:systemd-sysv-generator(8)
  Process: 1227 ExecStop=/etc/init.d/pihole-FTL stop (code=exited, status=0/SUCCESS)
  Process: 1265 ExecStart=/etc/init.d/pihole-FTL start (code=exited, status=0/SUCCESS)
   CGroup: /system.slice/pihole-FTL.service

May 25 21:53:55 raspberrypi systemd[1]: Starting LSB: pihole-FTL daemon...
May 25 21:53:55 raspberrypi pihole-FTL[1265]: Not running
May 25 21:53:56 raspberrypi su[1307]: Successful su for pihole by root
May 25 21:53:56 raspberrypi su[1307]: + ??? root:pihole
May 25 21:53:56 raspberrypi su[1307]: pam_unix(su:session): session opened for user pihole
May 25 21:53:58 raspberrypi pihole-FTL[1265]: FTL started!
May 25 21:53:59 raspberrypi systemd[1]: Started LSB: pihole-FTL daemon.

and also service lighttpd status

lighttpd.service - Lighttpd Daemon
   Loaded: loaded (/lib/systemd/system/lighttpd.service; enabled; vendor preset: enabled)
   Active: active (running) since Sat 2019-05-25 21:47:57 BST; 1 day 10h ago
  Process: 396 ExecStartPre=/usr/sbin/lighttpd -tt -f /etc/lighttpd/lighttpd.conf (code=ex
 Main PID: 501 (lighttpd)
   CGroup: /system.slice/lighttpd.service
           ├─501 /usr/sbin/lighttpd -D -f /etc/lighttpd/lighttpd.conf
           ├─546 /usr/bin/php-cgi
           ├─549 /usr/bin/php-cgi
           ├─550 /usr/bin/php-cgi
           ├─551 /usr/bin/php-cgi
           └─553 /usr/bin/php-cgi

I don’t see any issues in your logs. Keep trying to get a debug log while it isn’t working.

Once a device has an IP address it won’t try to get another one until the lease is nearly up. So, you shouldn’t expect your clients to be getting IP addresses very frequently.

Are you referring to “can’t get a domain name resolved to an IP address” instead?

Any device trying to connect to the WiFi network attempts to get an IP address but gives up after trying for a while. My lease length is quite short so this does happen fairly often.

If I give a manual IP and DNS then the device does connect and has internet access.

Try this one: etbziaw9ul

I am hoping this one ran completely when there was no connection, but I waited until it came back before selecting to upload the log.

The connection seems to come and go of its own accord.

That debug log still looks fine, except perhaps that FTL (and therefore dnsmasq) was not shown to be using ports 67 and 68, which it should be using for DHCP. Can you check if these ports are using by pihole-FTL when it is working and when it isn’t? Use sudo netstat -tulpn

The internet went down today while I was using it. The webpage came back with a DNS error - could not resolve DNS. I turned on the monitor for the raspberry pi but as soon as I started typing to run the debug it came back online again. Could it be something do to with a setting where it goes to sleep?

I ran pihole-FTL and it comes back with the message “dnsmasq: failed ot bind DHCP server socket: Address already in use”

Thank you.

It sounds like you are having hardware or network problems, possibly due to a bad power supply.

What do you mean by this? What command did you use?

I have changed the power supply a couple of times because I thought it might have been that. I’ve now got a 2A (apparently) USB plug.

I misread your message and ran the command pihole-FTL! That might be why the result was a bit strange. I ran it later and it came back with a success message.

I also ran (another) debug log and I noticed there was an error with the gateway. The debug log is kiq7fncjd7
I took it first thing this morning.

Only interact with FTL via service commands, such as sudo service pihole-FTL restart. You should probably restart your system, as FTL is now running under root instead of pihole, and other things may be awry.

Make sure you are able to reach the internet over the interface you configured Pi-hole to use, which in your case is wlan0 (wifi).

Restarted, no problem connecting to the internet (although it had dropped out in the last 24 hours at least once) and I’ve changed the power plug to be a 1.8A 5.2V Amazon plug now.

I’ll try to get the FTL ports when I can. Anything else that you can see which is not looking right?

Thanks for your help so far!

Not at the moment. With more new logs, maybe.

I ran teh netstat command and this are all the ports for pihole-FTL:
tcp 4711 listen
tcp 53 listen
tcp6 4711 listen
tcp6 53 listen

udp 53
udp 67
udp6 53

dhcpcd udp is on 68

That looks fine. I’m sorry I can’t be much help, as we don’t know where the issue is.

:-(:confused:
Shame! Do you think my 1.8A Amazon charger could be causing the problems?

I may do a complete wipe and start again in case there’s something else I’ve installed interfering with it, although I only have unbound (not in use) and openvpn installed!

Thanks

Given that you’ve tried multiple chargers, this is less likely to be an issue.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

I wanted to post my answer for others to see:
The power plug worked for a little bit but then I started having the same issues again. I did a complete wipe and installed the light version of raspbian. This is now been running flawlessly for over a month. Still using my 1.9 amp plug. It seems the pi zero with all the other raspbian bits was just not powerful enough.