PiHole - Unable to access Pi-Hole Dashboard : tunneling socket could not be established: 500

Hello everyone !

I am encountering an issue since a few weeks that I can’t seem to resolve and would gladly get help to get this fixed.
I have followed the guide https://www.balena.io/blog/deploy-network-wide-ad-blocking-with-pi-hole-and-a-raspberry-pi/ very precisely and upon initial install, everything went fine.

It still is up and seems to work fine as per the Balena Dashboard. But since a few weeks, I can’t access the PiHole dashboard through local IP address, nor the public one generated by Balena. (The Rasperry is connected to the network via Ethernet cable since the beginning).

The environment variables etc seem good as per the guide. The error message displayed on the Balena URL page says “one possible reason is because nothing is listening on port 80 on the device.” The logs on the Balena Cloud Dashboard say “pihole [✗] DNS resolution is currently unavailable” as the last message in the logs but don’t know if relevant to my issue.

I’ve tried updating the Balena OS, the Pi-Hole and DnsCrypt projects etc. All is up to date but nothing seems to fix it.

My last resort option would be to reinstall it all to check what’s up, but I’d rather be able to consult the data gathered through time by the Rasperry via the Admin interface. So I hope some of you might be able to guide me through a way to fix it without erasing all :slight_smile:

Thanks in advance for your time and feedback on the matter. I’m available to make the device accessible to anyone ready to help :wink:

Have a good Friday and weekend !

Hello, thanks for the detailed report :slight_smile: Just a couple of clarifications: you mentioned It still is up and seems to work fine as per the Balena Dashboard is the pihole working and only the admin page is not accessible, or has it stopped working completely since the admin page became unreachable?
Could you also access the device diagnostic page and let us know if there is any failing check reported from there?

Hello Nazrhom !

Thanks for the swift reply.
With regards to whether pihole is working or not, here is what I see in the dahsboard:

. So it seems to me like it is working.

Health checks return two red flags: restarts (but those might be expected as I have to unplug it quite a few times to restart the router once in a while), and “check_image_corruption”. The latter gives me Saving images timed out, check data incomplete: d9d8e8f9add1.

Diagnostics report is quite a huge text file, any tips on what to look for ? Here it is: https://drive.google.com/file/d/1UWZf8FK6r5bH9Kd7GXMVe-mS7L2ZNR3N/view?usp=sharing

Thanks again for your time and help :slight_smile:

The pastebin seems to be missing something? In particular the section about network?

Seems indeed like it was severely truncated. My bad for not performing the check correctly. I provided a new link to a drive file. Let me know if it doesn’t work.

Hi @MrPatate720 – thanks for the expanded diagnostics log! Some thoughts:

  • I should ask first: have you gone through the troubleshooting steps listed here? https://www.balena.io/blog/deploy-network-wide-ad-blocking-with-pi-hole-and-a-raspberry-pi/#troubleshooting

  • I notice from the screenshot you posted that your Raspberry Pi has two IP addresses. Looking through the diagnostics log (the section marked --- ifconfig ---), I see that not only your ethernet device (eth0) but your wireless device (wlan0) appear to be connected to your router. I’d recommend turning off the WiFi connection to see if that helps. You can do that by connecting to the device from the Balena console, and running nmcli radio off. Once you’ve done that, try connecting to the device via the IP address shown on the dashboard. It’s possible you may need to restart the device for this to take effect.

  • I’m not sure this is related, but I notice from the screenshot you posted (as well as the diagnostics log) that there’s an error message saying DNS resolution is currently unavailable. In addition to the troubleshooting steps I mentioned above, try setting the DNS servers as shown at https://www.balena.io/blog/deploy-network-wide-ad-blocking-with-pi-hole-and-a-raspberry-pi/#2setconfigurationoptions

I hope this helps; give it a try and let us know how it goes!

All the best,

Hi Saint Aardvark :slight_smile:

Thanks for your response. Here are my answers for your three points:

  • I checked indeed the troubleshooting section, but it doesn’t help solve my issue. The only one that could be of interest is setting up a static IP, but since I first plugged the Rasperry in, it’s always had the same local IP address which I guess is hence not my problem here.
  • I did deactivate the wifi now, so only 1 IP address remains.
  • I did follow the instructions of the guide and here are my local variables:

Also, I today see that error message prompted when access the public URL generated by balena gives me the following error: Device xxx does not have a registered vpn tunnel endpoint

Anyhow, thanks again for your time and assistance. Let me know if you need anything else.

Have a great week :slight_smile:


Hi, based on the previous diagnostic logs it looks like the vpn service is running fine, to be sure can you post latest diagnostics again?

Hello again,

Here is the link to the latest diagnostics: https://drive.google.com/file/d/15Cy3mkL1zax0pbmEWdUUzbDHw8lAF06E/view?usp=sharing

FYI: the dashboard still can’t be accessed and the same overall situation described in OP can be observed.

Wish you a very good day :slight_smile:

Hi there,

What url are you using to access the dashboard? This issue on the github project notes that the root path does not serve a working page (issue here: https://github.com/klutchell/balena-pihole/issues/33). You need to navigate to /admin/ to access the dashboard. Here is a forum thread about this: PiHole - Public URL Doesn't appear to work.



I’ve historically used the IP directly in the address bar but it doesn’t load anything anymore, says “Unable to connect”.
So I tried via the public URL feature. I’ve juste tried appending /admin to the URL as suggested, same result as always remains:

Via the IP address, no difference either with appending /admin (can’t post pic as I’m “new” here, and am limited to 1 pic per post).

Feel free to advise. Thanks !

I took a look through the logs and the reason that the dashboard can’t be accessed is that the pi-hole service keeps restarting, failing with the DNS resolution is currently unavailable error. Looking at this thread: https://discourse.pi-hole.net/t/can-not-install-pihole-keep-getting-dns-resolution-is-currently-unavailable/17919/7 it appears that this could be due to using the router provided DNS. This is weird though, as balenaOS will add the google DNS servers in addition to any provided by dhcp. Could you send the content of /etc/resolv.conf please?

In addition, did you change any configuration on your router or something like that?

Hi Cameron,

Here’s the file content:

With regards to the router, I did change his DNS address to use the IP of the RasperryPi as provided in the guide. The DNS IP address I provided to my router is which is the local IP of my Rasperry Pi. It’s all I did :slight_smile: Hope this helps !

Thanks again to all of the responders, great support so far, hope we get to the bottom of this :smiley:

Apologies, I forgot about dnsmasq, can you run cat /run/dnsmasq.servers please? Basically what I’m looking for is the added by balenaOS. If the device doesn’t have this, then I worry the router is providing itself as a dns server, and it is using the pi as it’s DNS server, causing a loop.

Also, is your pi on a static LAN address? i.e will it always be

Hey again,

Here’s the cat response:

root@21e737a:/etc# cat /run/dnsmasq.servers

The IP address hasn’t changed since I first plugged it in. So no indication of change. If it did, I would have tried to update the DNS address on my router.
For the sake of testing, I removed the DNS address from the router to contact the Rasperry Pi, still observing the same issue when trying to access the Admin dashboard.

That does include the server that I expected it to, could you try to do an nslookup on device. I don’t imagine the host should make too much of a difference, so I guess nslookup google.co.uk would be fine.

Here’s the command and response:

root@21e737a:~# nslookup google.co.uk
Address 1: 21e737a
Name: google.co.uk
Address 1: 2a00:1450:400e:804::2003 ams16s29-in-x03.1e100.net
Address 2: ams15s29-in-f99.1e100.net


It looks like the piHole-FTL service is not capable of resolving the device hostname, which is strange. I would like to test something, could you remove the DNS1 and DNS2 variables and test again? I would like to check if the problem relies on the piHole-dnscrypt interaction. Pi-hole can work without it, so if it starts up without those two vars we might be able to isolate the problem :slight_smile:

And please provide the diagnostics afterwards!