-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Hickup / unresponsiveness when running on RasPi in Docker #971
Comments
Talking with someone also running pihole in docker on a pi revealed a potential issue outside the scope of the pihole image. I also experienced issues with building the docker image for dnsdist on a bullseye base image when running on a buster-based raspian - not yet an idea why this happens, but it seems like there are some issues with the bullseye based raspian, at least when running on a Raspi2 or Raspi3 (of course this is not the fault of the pi-hole image) I will keep you posted about the further details and answers I hope to find in the days to come. |
Seems I was a bit to optimistic last evening. Having a look after a relatively calm weekend with the raspi just sitting there waiting for me to continue I just found the following things in the log:
This is just an excerpt of the whole log the issues is not on a regular but frequent basis. Any Ideas on how to further narrow things down are highly welcome. |
Is that your complete |
I will try the changes once I am back home to access the Raspi. |
Ok checked and restarted the Docker Containerwith all the parameters listed in the docker_run.sh except the port-mappings but issue persists. |
I also had another issue but could rule out that one as well: The power supply seemed a bit unstable on higher loads, so I replaced it with a more powerful one - no more Voltage warnings now, but still no solution. |
I was just wondering about whether or not some of the environment variables could help, I was thinking along the lines of Do you have some other hardware you can replicate your setup on to rule that out? |
Ok, I did some further research / hardware testing. So I decided to ditch docker to see if I have any hardware issues I did not see before. So I installed the pihole natively on one of the RaspberryPi and dnsdist on the other one, using an IPv6-Setup wherever possible. Next thing I will try is to run pihole in docker on one of the machines, leaving dnsdist native on the other one and than try to run dnsdist in a docker container as well and see what happens (I think I will get some issues with routing out of the docker-subnets but this should be solveable). |
Try using a macvlan for your container. "... you can use the macvlan network driver to assign a MAC address to each container’s virtual network interface, making it appear to be a physical network interface directly connected to the physical network." (From docker docs) |
So another weekend and time for testing / debugging. And good news is: Currently it seems like I solved the issue. When setting up dnsdist and powerdns I decided to pick a baseimage that reflects Raspian as this seemed logical to me: Running on Raspi in a Raspbian environment containers based on somehing Raspbian would be as smooth as possible (no break in the architecture) - so I used "alenalib/rpi-raspbian" as a base image to setup dnsdist and powerdns. Triggered by the idea in #980 thought about it and decided to give the idea of alpine based containers a spin on my Raspi. As I am not that familiar with Alpine and PiHole yet, I wanted to reduce complexity by doing something I am already knowledgeable about. So an obvious idea was to refactor the images for powerdns and dnsdist. And what a neat suprise: Changing the images and reconstructing the docker images turned out to be a breeze, only some slight adjustments to match the binary and the different location of config files in Alpine and the containers were ready to start. After the restart of dnsdist with a local authorative DNS and the pihole in a container I was expecting to see the old error again. But: everything just worked :) - no more strange entries in the logs of dnsdist and the responsiveness is good as well. So I will watch this issue a bit longer to see if really everything is stable and then close this issue here. Thanks for the great work and all the suggestions. |
ok issue is resolved, needs to be closed |
What were you findings in the end? |
The basic finding was: use the right images as basis (in this case alpine for Raspi did the trick). |
This is a: Run Issue
Details
I am experiencing a lagginess / unresponsiveness in my (maybe rather unusual) setup. Docker-Pi-Hole is running on a Raspi 3, with a DNS-Loadbalancer (dnsdist) in front of it to work as a proxy and to route DNS-Requests by certain criteria eg. route requests for specific domains / subdomains to a dedicated PowerDNS-Server-Container which also runs on the Raspi. The reason why I have this setup is the need for an updateable DNS-Server for some of my projects (RFC2136) which is not supported by PiHole yet.
To check the health of downstream servers dnsdist querys the downstream server every second (I also tried to reduce this cycle, but it did not change anything).
I also checked for load issues and replaced a Raspi2 with a more recent Raspi3 available, but nothing changed and the average load remains stable without any peaks that could explain the behavior.
I also can rule out heavy traffic / load on the powerdns server - I disabled all requests that would go there and the logs / status of DNSDist also shows no pakets hitting the loadbalancer or even the powerdns server downstream.
The log extracted from dnsdist looks like this:
I would not worry about this log, but I also recognise issues with day-to-day usage (lookups in browser take ages or fail for non blacklisted domains). I also checked the logs of pihole if this issues happen at expected times (updates of db) but no pattern or entries in the log showed up.
Related Issues
How to reproduce the issue
docker-compose.yml contents, docker run shell command, or paste a screenshot of any UI based configuration of containers here
docker run -d --network dns --ip6='fdbd:fa49:ab57:53::5' -v '/etc/pihole/pihole:/etc/pihole' -v './etc/pihole/dnsmasq.d:/etc/dnsmasq.d' pihole/pihole:latest
any additional info to help reproduce
These common fixes didn't work for my issue
docker run
example(s) in the readme (removing any customizations I added)I did not use the port-mapping of docker in the command as I want to run a "as most ipv6 as possible" network which means no portmapping is required for the PiHole (I only have on on 53/UDP) for dnsdist to allow legacy clients to use the service.
I also shut down the powerdns-sever and the mysql-server running on the Raspi to further rule out on load but the situation remains unchanged.
The text was updated successfully, but these errors were encountered: