Skip to content
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

Cannot Save Changes #1721

Closed
jonny190 opened this issue Feb 19, 2025 · 6 comments
Closed

Cannot Save Changes #1721

jonny190 opened this issue Feb 19, 2025 · 6 comments

Comments

@jonny190
Copy link

Versions

Core version is v6.0 (Latest: v6.0.1)
Web version is v6.0 (Latest: v6.0)
FTL version is v6.0 (Latest: v6.0)

Platform

Ubuntu 22.04 Server

  • OS and version:

  • Platform: Docker

Expected behavior

Services to start and function with the ability to change settings and have the save and apply

Actual behavior / bug

page refreshed and then nothing is saved

Steps to reproduce

Steps to reproduce the behavior:

  1. Go to 'settings'
  2. Click on 'dns'
  3. Check some Upstream DNS Servers
  4. press save

Debug Token

Screenshots

Image

Additional context

Would not start post update to v6, so deleted container and all linked volumes to start from clean and the same occurs

@rdwebdesign
Copy link
Member

Please post your compose file.

@jonny190
Copy link
Author

version: "3"

services:
pihole:
container_name: pihole
image: pihole/pihole:latest
environment:
- TZ=Europe/London
- FTLCONF_webserver_api_password=SuperSecurePasswordHerePinkySware
volumes:
- '/mnt/nfs/appdata/pihole/etc-pihole:/etc/pihole:rw'
- '/mnt/nfs/appdata/pihole/etc-dnsmasq.d:/etc/dnsmasq.d:rw'
restart: unless-stopped
networks:
lan:
ipv4_address: 192.168.4.252
networks:
lan:
external:
name: lan

I've rebuild the docker container to use local storage rather then a mounted NFS share and this works however this is less ideal as i have limited local strorage.
Prior to version 6 this was working no issues, so not sure if there is something changes in how the file are accessed with the error relating to not being able to open the file in exclusive mode

Incase its helps heres the line from me /etc/fstab used to mount the share
192.168.5.9:/mnt/BigData/appdata /mnt/nfs/appdata nfs4 _netdev,auto,nolock 0 0

My lan subnet is 192.168.4.0/23 so containers and storage are one one logical network

@yubiuser yubiuser transferred this issue from pi-hole/pi-hole Feb 20, 2025
@rdwebdesign
Copy link
Member

Can you please create a new container using a special FTL branch (tweak/file_locking) created to try to fix this issue?

You will need to create a local image using our docker-pi-hole repository.

  • Clone the repository in your machine;
  • run build.sh -f tweak/file_locking to generate the image using the new branch.
  • then use the local image to create your container

@jonny190
Copy link
Author

Just gave that a try and the error is slightly different but changes appear to now be saving

During startup i get:

piholetest  | 2025-02-21 11:11:59.922 GMT [55M] INFO: ########## FTL started on 6eda41672ea1! ##########
piholetest  | 2025-02-21 11:11:59.923 GMT [55M] INFO: FTL branch: tweak/file_locking
piholetest  | 2025-02-21 11:11:59.923 GMT [55M] INFO: FTL version: vDev-3d5f0ce
piholetest  | 2025-02-21 11:11:59.923 GMT [55M] INFO: FTL commit: 3d5f0ce8
piholetest  | 2025-02-21 11:11:59.923 GMT [55M] INFO: FTL date: 2025-02-20 20:56:10 +0100
piholetest  | 2025-02-21 11:11:59.923 GMT [55M] INFO: FTL user: pihole
piholetest  | 2025-02-21 11:11:59.923 GMT [55M] INFO: Compiled for linux/amd64 (compiled on CI) using cc (Alpine 14.2.0) 14.2.0
piholetest  | 2025-02-21 11:11:59.924 GMT [55M] ERROR: Cannot get exclusive lock for /etc/pihole/pihole.toml: Bad file descriptor
piholetest  | 2025-02-21 11:11:59.927 GMT [55M] ERROR: Cannot get exclusive lock for /etc/pihole/pihole.toml: Bad file descriptor
piholetest  | 2025-02-21 11:12:00.401 GMT [55M] INFO: 1 FTLCONF environment variable found (1 used, 0 invalid, 0 ignored)
piholetest  | 2025-02-21 11:12:00.401 GMT [55M] INFO:    [✓] FTLCONF_webserver_api_password is used
piholetest  | 2025-02-21 11:12:00.411 GMT [55M] INFO: Wrote config file:
piholetest  | 2025-02-21 11:12:00.411 GMT [55M] INFO:  - 152 total entries
piholetest  | 2025-02-21 11:12:00.411 GMT [55M] INFO:  - 142 entries are default
piholetest  | 2025-02-21 11:12:00.411 GMT [55M] INFO:  - 10 entries are modified
piholetest  | 2025-02-21 11:12:00.411 GMT [55M] INFO:  - 0 entries are forced through environment
piholetest  | 2025-02-21 11:12:00.482 GMT [55M] INFO: Parsed config file /etc/pihole/pihole.toml successfully
piholetest  | 2025-02-21 11:12:00.483 GMT [55M] INFO: PID file does not exist or not readable
piholetest  | 2025-02-21 11:12:00.483 GMT [55M] INFO: No other running FTL process found.
piholetest  | 2025-02-21 11:12:00.483 GMT [55M] WARNING: Insufficient permissions to set process priority to -10 (CAP_SYS_NICE required), process priority remains at 0
piholetest  | 2025-02-21 11:12:00.498 GMT [55M] INFO: PID of FTL process: 55
piholetest  | 2025-02-21 11:12:00.504 GMT [55M] INFO: listening on 0.0.0.0 port 53
piholetest  | 2025-02-21 11:12:00.505 GMT [55M] INFO: listening on :: port 53
piholetest  | 2025-02-21 11:12:00.511 GMT [55M] INFO: PID of FTL process: 55
piholetest  | 2025-02-21 11:12:00.537 GMT [55M] INFO: Database version is 21
piholetest  | 2025-02-21 11:12:00.545 GMT [55M] INFO: Database successfully initialized
piholetest  | 2025-02-21 11:12:01.573 GMT [122M] ERROR: Cannot get exclusive lock for /etc/pihole/pihole.toml: Bad file descriptor
piholetest  | 2025-02-21 11:12:01.607 GMT [126M] ERROR: Cannot get exclusive lock for /etc/pihole/pihole.toml: Bad file descriptor
piholetest  | 2025-02-21 11:12:01.652 GMT [130M] ERROR: Cannot get exclusive lock for /etc/pihole/pihole.toml: Bad file descriptor

And upon making changes

piholetest  | 2025-02-21 11:15:30.001 GMT [55/T221] INFO: Wrote config file:
piholetest  | 2025-02-21 11:15:30.001 GMT [55/T221] INFO:  - 152 total entries
piholetest  | 2025-02-21 11:15:30.002 GMT [55/T221] INFO:  - 142 entries are default
piholetest  | 2025-02-21 11:15:30.002 GMT [55/T221] INFO:  - 10 entries are modified
piholetest  | 2025-02-21 11:15:30.002 GMT [55/T221] INFO:  - 0 entries are forced through environment
piholetest  | 2025-02-21 11:15:30.046 GMT [55/T221] INFO: Config file written to /etc/pihole/pihole.toml
piholetest  | 2025-02-21 11:15:30.052 GMT [55/T221] INFO: Restarting FTL: dnsmasq config changed
piholetest  | 2025-02-21 11:15:30.052 GMT [55M] INFO: Asked to terminate by "/usr/bin/pihole-FTL no-daemon" (PID 55, user pihole UID 1000)
piholetest  | 2025-02-21 11:15:30.057 GMT [55/T213] INFO: Terminating timer thread
piholetest  | 2025-02-21 11:15:30.142 GMT [55/T210] INFO: Terminating database thread
piholetest  | 2025-02-21 11:15:30.954 GMT [55/T211] INFO: Terminating GC thread
piholetest  | 2025-02-21 11:15:31.037 GMT [55/T212] INFO: Terminating resolver thread
piholetest  | 2025-02-21 11:15:31.504 GMT [55M] INFO: Finished final database update
piholetest  | 2025-02-21 11:15:31.504 GMT [55M] INFO: Waiting for threads to join
piholetest  | 2025-02-21 11:15:31.504 GMT [55M] INFO: All threads joined
piholetest  | 2025-02-21 11:15:31.505 GMT [55M] INFO: PID file emptied
piholetest  | 2025-02-21 11:15:31.507 GMT [55M] INFO: Stored 1 API session in the database
piholetest  | 2025-02-21 11:15:31.996 GMT [55M] INFO: ########## FTL terminated after 1m 58s  (internal restart)! ##########
piholetest  | 2025-02-21 11:15:32.011 GMT [55M] ERROR: Cannot get exclusive lock for /etc/pihole/pihole.toml: Bad file descriptor
piholetest  | 2025-02-21 11:15:32.014 GMT [55M] INFO: ########## FTL started on 6eda41672ea1! ##########
piholetest  | 2025-02-21 11:15:32.014 GMT [55M] INFO: FTL branch: tweak/file_locking
piholetest  | 2025-02-21 11:15:32.014 GMT [55M] INFO: FTL version: vDev-3d5f0ce
piholetest  | 2025-02-21 11:15:32.014 GMT [55M] INFO: FTL commit: 3d5f0ce8
piholetest  | 2025-02-21 11:15:32.014 GMT [55M] INFO: FTL date: 2025-02-20 20:56:10 +0100
piholetest  | 2025-02-21 11:15:32.014 GMT [55M] INFO: FTL user: pihole
piholetest  | 2025-02-21 11:15:32.014 GMT [55M] INFO: Compiled for linux/amd64 (compiled on CI) using cc (Alpine 14.2.0) 14.2.0
piholetest  | 2025-02-21 11:15:32.015 GMT [55M] ERROR: Cannot get exclusive lock for /etc/pihole/pihole.toml: Bad file descriptor
piholetest  | 2025-02-21 11:15:32.018 GMT [55M] ERROR: Cannot get exclusive lock for /etc/pihole/pihole.toml: Bad file descriptor
piholetest  | 2025-02-21 11:15:32.513 GMT [55M] INFO: 1 FTLCONF environment variable found (1 used, 0 invalid, 0 ignored)
piholetest  | 2025-02-21 11:15:32.514 GMT [55M] INFO:    [✓] FTLCONF_webserver_api_password is used
piholetest  | 2025-02-21 11:15:32.522 GMT [55M] INFO: Wrote config file:
piholetest  | 2025-02-21 11:15:32.522 GMT [55M] INFO:  - 152 total entries
piholetest  | 2025-02-21 11:15:32.522 GMT [55M] INFO:  - 142 entries are default
piholetest  | 2025-02-21 11:15:32.522 GMT [55M] INFO:  - 10 entries are modified
piholetest  | 2025-02-21 11:15:32.522 GMT [55M] INFO:  - 0 entries are forced through environment
piholetest  | 2025-02-21 11:15:32.563 GMT [55M] INFO: Parsed config file /etc/pihole/pihole.toml successfully
piholetest  | 2025-02-21 11:15:32.563 GMT [55M] INFO: PID file does not exist or not readable
piholetest  | 2025-02-21 11:15:32.563 GMT [55M] INFO: No other running FTL process found.

@yubiuser
Copy link
Member

Thanks for the report. Seeing a slightly different error is expected.
#1715 (comment)

Fixed by pi-hole/FTL#2218

@yubiuser
Copy link
Member

Closing as duplicate of #1715

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants