Cannot get pi-hole running on balena cloud - not being able to access public url

Followed this write up to get the pi-hole running -

Getting this error -

We encountered an error when reaching this balena.io device:

UUID ebb681ff3d007db9b29b462203a846bf

tunneling socket could not be established: socket hang up

One possible reason is because nothing is listening on port 80 on the device.

Any hints?

Hi hax,
to see what is going wrong with your setup we need to know a little more about how you got that error message and we also might have to take a look at the device.
So we would need you to enable support access to the device and provide us with a little more detailed description of what lead to the above error message.
Regards
Thomas

I enable support access, let me know what I should

HI ! Could you share the link to the device as in the balena dashboard ? I get ‘device not found’ when trying to access ebb681ff3d007db9b29b462203a846bf - it either means that the id is incorrect or the support access is not enabled for it - the support access times out after a while, so it’s another thing to check.

In the meantime - could you let us know where you see the error ? Is this a device on your network that the error is appearing at or is it the raspberry p, do you see the error in the dashboard somewhere ?

thanks !

I reformatted the card and created a new device, the UUid is - 553414af062669953fdaa9cf87cbd292

Code I used is here - https://github.com/klutchell/balena-pihole

I was worried I did something wrong, but it looks like I followed the instructions correctly in getting the pi running. I did some sample node.js app, and that worked but this application isn’t working.

When I go to the IP address listed in the dashboard, I should have a pi-hole dashboard, but I don’t have any access to it.

Public device URL, gives the error I already listed.

Hello,

I’ve checked the device logs – it seems it’s trying to bind to eth0 interface which is not in use. Are you using ethernet or Wifi?
If it’s Wifi, you need to set DNSMASQ_LISTENING and INTERFACE to wlan0 instead of eth0 as described here: https://www.balena.io/blog/deploy-network-wide-ad-blocking-with-pi-hole-and-a-raspberry-pi/#configurationoptions

Also make sure the device has all other environment variables properly set since it doesn’t have any as far as I can see.

Hope this helps & good luck!

I did changes on the last one, I didn’t set them here yet. Thanks for the letting me know about the wlan0, I didn’t realize that need to be changed.

Just changed the INTERFACE and DNSMASQ, looks like public link works now, but not the ip address. Is there something else I need to do with the variables? I didn’t want to drop a bunch of them in, since I am not familiar, just wanted to put in the barebones just to get it working, then add some more.

I haven’t gone through the process myself yet, but judging by the article you should follow all of it closely to have it working properly. If I were you I’d set other ENV variables up as well – just be sure to set the WEBPASSWORD to something secret :slight_smile:

I just set the password and now the public url doesn’t work.

Tried public url with /admin and now I can get on the admin console. Changed the password and now I can log in.

When I set the password, admin url breaks. Weird.

As far as I can see, you haven’t set the password. Maybe you removed it after it didn’t work, but you’re still missing DNS1, DNS2, ServerIP, TZ.

Give my fork a shot:

I removed some the other services, and included some code to fix sudo issues I kept encountering.

Which services did you remove?

Put everything in, app is working, PADD is not. Cannot see the out put on the screen.

I’m following this part here…

@hax which repo are you using now? @wwalker has removed the required software for the PiTFT screen in their repo (likely because it wasn’t needed!) so that won’t work.

If you’re still using the repo from our guide (klutchell's one) you do need to set all of the variables in the PiTFT guide - can you double check to make sure you’ve got them all set up and matching? Also note that the PiTFT ones are device variables rather than service ones as they apply to the hardware. Any little mistake here or missing variable could quite easily stop the display from working.

Edit: I’ve just had a look at your device and can see everything looks correct. Could you let me know what the display is doing? Is it just full white or black, or are you seeing the balenaOS logo, or a terminal?

@chrisys Just getting a white screen, I am using klutchell repo mentioned in the balena writeup.

I triple checked everything, it should be running, but I am not getting anything but a white screen. App is running, only thing I don’t have is pass word set yet.

@hax hmm OK that’s a strange one, you should at least get the balenaOS logo. Is your PiTFT a known good and working unit? I’ve had problems like that where the display has become disconnected from the PCB and additionally when the timing on the dtoverlay was wrong.

When I looked at your app yesterday your timing was set to exactly the same as mine, so should be OK, but from what I can find online there are variations between displays. There are references to speeds of 32000000 as well as 20000000, so you could try either of those to see if it helps; the lower is more likely to work. You would try these by replacing where it says 25000000 in the RESIN_HOST_CONFIG_dtoverlay configuration variable.

@chrisys Works great, can see the operating system when its on an other pi, haven’t had any problems when I was just running an os.

This is the one, that I similarly put on it.

I can try changing the timings later when I get home and see if It changes anything on there.

@hax ok that’s great, as it’s not an Adafruit one the settings are likely to be a bit different and additionally it may require some additional driver software to get it to work. The link mentions a driver download, in which case they might be providing you with a different dtoverlay which you’d need to copy to your SD card separately to get it to work.

@chrisys I will try installing some drivers, I didn’t think they were need since there were none installed with the pi-hole installation. (maybe theres some drivers included in the pi-hole install that I don’t know about?)

Do you know if needs to be installed in the host os or the pi-hole? I’m doing some research currently but have come up inconclusive at the moment

@chrisys Tried to install a driver with no avail, tried to get the apt-get stuff and I guess a lot of the drivers that raspbian has don’t work with this image.

This is what I am using…

Tried to do it on host os, but I can’t get git on it with apt-get, so I tried on pi-hole sector and that didn’t work either.

Will need to do some more research on how to get more os packages installed.