Coder Social home page Coder Social logo

Comments (17)

DL6ER avatar DL6ER commented on May 27, 2024

Do you see any errors in the "Console" (check the developer tools you can summon using F12)?

from docker-pi-hole.

rdwebdesign avatar rdwebdesign commented on May 27, 2024

One more question:

  • Do you see the same behavior after disabling all browser extensions?

from docker-pi-hole.

tgaff avatar tgaff commented on May 27, 2024

Do you see any errors in the "Console" (check the developer tools you can summon using F12)?

No. I spent a fair bit of time looking at the networking section and then inspecting the page itself. Never once saw an error.
Screen Shot 2024-02-14 at 11 29 10 AM

One more question:

  • Do you see the same behavior after disabling all browser extensions?

I see it in incognito mode in both Brave and Firefox.

from docker-pi-hole.

tgaff avatar tgaff commented on May 27, 2024

Decided to try a different OS too. On Firefox Focus on Android 14 I get very similar behavior. The only difference I noted was that the "Web Interface" tab worked but API, Privacy and Teleporter still did not display. At least in 2 out of 3 tries.

(Note that I'm on the Privacy tab but seeing details from Web Interface, this is very similar but slightly different than what I saw on Desktop)

Also I've reproduced this with both the docker images:

  • pihole/pihole:2023.02.1
  • pihole/pihole:2024.01.0
  • rlabinc/pihole-unbound:latest

from docker-pi-hole.

tgaff avatar tgaff commented on May 27, 2024

In addition I just realized that on some of those tabs text is cut-off. (seen in FF and Brave using both pihole/pihole:2024.01.0
rlabinc/pihole-unbound:latest)

Screen Shot 2024-02-14 at 12 05 09 PM

This may be a separate issue.

from docker-pi-hole.

rdwebdesign avatar rdwebdesign commented on May 27, 2024

Please, post your current compose file or docker run command used to start the container.

from docker-pi-hole.

rdwebdesign avatar rdwebdesign commented on May 27, 2024

I just realized that on some of those tabs text is cut-off.
(...)
This may be a separate issue.

No... Actually this could explain what you see in the browser.

If the page is incomplete, one or more tabs will be incomplete.
The end of one tab could be "mixed" with other tab and javascript code will show a tab different than expected.

The real question is: What is causing this? Why the pages are broken?

You are trying with many different images, but no other users saw this behavior, so it is very unlikely the issue is on the images.

It must be something on your system.

Are you using a volume to store the web interface (/var/www/html/admin)?

from docker-pi-hole.

tgaff avatar tgaff commented on May 27, 2024

OK, I think you could be on to something.

In order to get past an error showing in a red banner at the top I set a couple of variables. Error: There was a problem applying your settings. PHP error (2): parse_ini_file(/etc/pihole/setupVars.conf): failed to open stream: Permission denied in /var/www/html/admin/settings.php:17

Specifically I set WEB_UID or PIHOLE_GID. They're marked Experimental in the docker README. Setting these allowed me to get past the error and save changes.

# https://hub.docker.com/r/pihole/pihole
version: "3"
# More info at https://github.com/pi-hole/docker-pi-hole/ and https://docs.pi-hole.net/
services:
  pihole:
    container_name: pinhole
    hostname: pi.hole
    image: pihole/pihole:2024.01.0
    # For DHCP it is recommended to remove these ports and instead add: network_mode: "host"
    ports:
      - "53:53/tcp"
      - "53:53/udp"
      # - "67:67/udp" # Only required if you are using Pi-hole as your DHCP server
      - "80:80/tcp"
    environment:
      TZ: $TZ
      WEBPASSWORD: $PW
      WEB_UID: 1003
      PIHOLE_GID: 100
    # Volumes store your data between container upgrades
    volumes:
      - CHANGE_TO_COMPOSE_DATA_PATH/pihole/etc-pihole:/etc/pihole
      - CHANGE_TO_COMPOSE_DATA_PATH/pihole/etc-dnsmasq.d:/etc/dnsmasq.d
    #   https://github.com/pi-hole/docker-pi-hole#note-on-capabilities
    # cap_add:
    #  - NET_ADMIN # Required if you are using Pi-hole as your DHCP server, else not needed
    restart: unless-stopped
    
    networks:
      pihole_ipvlan:
        ipv4_address: 192.168.0.203

networks:
  pihole_ipvlan:
    external: true

Note: You can ignore CHANGE_TO_COMPOSE_DATA_PATH it's automatically substituted for a real path owned by appuser:users or 1003 100

If you can point me toward any documentation on the UID/GID settings it might help in further debugging. What I had known based on the README is:

  • PIHOLE_UID and WEB_UID shouldn't be the same
  • PIHOLE_GID and WEB_GID shouldn't be the same
  • PIHOLE_UID and WEB_UID shouldn't conflict with values in the container.

Also the container UID/GIDs

  • values in container for Groups are 0-60, 100, 65534, 101 and 1000(pihole)
  • values in container for user ids are 0-13, 33 (www-data), 34, 38, 39, 41, 65534, 100 and 999(pihole)

There was technically a conflict with PIHOLE_GID being set to 100 (hosts's users account overlapping docker's users account) but I'm able to reproduce the issue even after removing PIHOLE_GID (and of course restarting) so I don't think that's it.

from docker-pi-hole.

PromoFaux avatar PromoFaux commented on May 27, 2024

There isn't any further documentation on those UID/GID variables. The Pull Request that introduced them is here: #982, maybe there is some relevant discussion that gives you some pointers.

One possible hint in here though, is that the files inside /etc/pihole/ should be owned by pihole:pihole. Did you try PIHOLE_UID: 1003 instead of WEB_UID?

Of course, what might actually turn out to be the simplest solution (given it's nearing complete-state) is switching to the v6 beta image tag :development-v6, which entirely gets rid of the WEB_[U|G]ID variables, owing to pihole-FTL becoming it's own web server. The entire image is a ground-up rewrite for v6. If you do, make sure you take a backup of your /etc/pihole mount before switching - as it will make irreversible config file changes.

from docker-pi-hole.

tgaff avatar tgaff commented on May 27, 2024

what might actually turn out to be the simplest solution (given it's nearing complete-state) is switching to the v6 beta image tag :development-v6

So far I can't reproduce the issue in :development-v6, likely because the tabs are just gone and each page loads separately. I'm using PIHOLE_UID and GID there. I like that it only needs 1 user, will continue testing it.

from docker-pi-hole.

tgaff avatar tgaff commented on May 27, 2024

There isn't any further documentation on those UID/GID variables. The Pull Request that introduced them is here: #982, maybe there is some relevant discussion that gives you some pointers.

I'll take a look at this soon. Thanks for pointing to it - I failed to find it earlier.

One possible hint in here though, is that the files inside /etc/pihole/ should be owned by pihole:pihole. Did you try PIHOLE_UID: 1003 instead of WEB_UID?

I tried a few other configs - probably should have written them down.

With PIHOLE_UID:1003 and PIHOLE_GID: 100 I get the banner error. Pretty clearly the web server's user also needs access to this file.
Screen Shot 2024-02-16 at 3 38 34 PM

FWIW here's what the etc dir looks like in that case (from the host)

-rw-r--r--  1    0   0       0 Feb 16 15:29 custom.list
-rw-r--r--  1 1003 100       0 Feb 16 15:29 dhcp.leases
-rw-r--r--+ 1    0   0     651 Feb 16 15:29 dns-servers.conf
-rw-rw-r--+ 1 1003 100 9424896 Feb 16 15:29 gravity.db
-rw-rw-r--+ 1 1003 100   94208 Feb 16 15:29 gravity_old.db
-rw-r--r--+ 1    0   0 3333898 Feb 16 15:29 list.1.raw.githubusercontent.com.domains
-rw-rw-r--+ 1    0   0      95 Feb 16 15:29 list.1.raw.githubusercontent.com.domains.sha1
-rw-r--r--+ 1    0   0      65 Feb 16 15:29 local.list
-rw-r--r--  1    0   0     241 Feb 16 15:29 logrotate
drwxrwxr--+ 2    0   0    4096 Feb 16 15:29 migration_backup
-rw-rw-r--  1 1003   0     157 Feb 16 15:29 pihole-FTL.conf
-rw-rw-r--+ 1 1003 100   81920 Feb 16 15:36 pihole-FTL.db
-rw-r--r--  1    0   0     209 Feb 16 15:29 setupVars.conf
-rw-r--r--+ 1    0   0      27 Feb 16 15:29 setupVars.conf.update.bak
-rw-r--r--+ 1    0   0     378 Feb 16 15:29 versions

Similarly with PIHOLE_UID:1003 and WEB_GID:100 - same alert banner.

I'm not sure how that banner is persisted - even if I 777 the files in that directory I see the error banner. However I do see the setupVars.conf theme change when I change it from the webUI. That's seems weird to me.

All of the above is using the official 2024.01.0 image.

from docker-pi-hole.

tgaff avatar tgaff commented on May 27, 2024

I'm not sure how that banner is persisted - even if I 777 the files in that directory I see the error banner. However I do see the setupVars.conf theme change when I change it from the webUI. That's seems weird to me.

This got me thinking. I ended up inspecting the docker data directory a little bit more and recreated it without an ACL attached.
As of now I think this has no issue (banner, nor loading issue) when I set the following:

  PIHOLE_UID: 1003
  WEB_GID: 100 

Though the image with the following still has the intermittent loading issue...

      WEB_UID: 1003
      PIHOLE_UID: 1003
      PIHOLE_GID: 100

I don't understand how an ACL could cause a web-server to intermittently render only part of a page though and worry that I'm just having intermittent luck.

from docker-pi-hole.

StuartMorrisAU avatar StuartMorrisAU commented on May 27, 2024

I just switched to using docker and had the same issue with the settings tabs sporadically not loading. I had created a user/group specifically for the web and assigned WEB_UID and WEB_GID in my .env file, but the settings UI kept breaking. I commented out those variables and the UI loaded OK. Regardless of whether I use these environment variables, /var/www/html/admin continues to be owned by root:root rather than www-data:www-data.

from docker-pi-hole.

github-actions avatar github-actions commented on May 27, 2024

This issue is stale because it has been open 30 days with no activity. Please comment or update this issue or it will be closed in 5 days.

from docker-pi-hole.

tgaff avatar tgaff commented on May 27, 2024

Not sure if this should be closed or not. On the one hand it seems like it might be fixed in the development branch. On the other hand the behavior exhibited of the server rendering only parts of its templates in a somewhat random fashion may indicate a deeper issue. I don't see how that could be explained in full by permissions or ACLs since in general file-system permissions should make a file readable or not rather than an inconsistent "partly-readable". (Are two processes fighting over ownership?)

I don't have enough knowledge of the architecture of this project to even come close to anything that might explain it - I'm only extrapolating from the web world I've worked in. If it was one of my sites I would find the behavior suspicious enough to want to get to the bottom of it.

from docker-pi-hole.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.