PHP error (2): fsockopen(): unable to connect to 127.0.0.1:4711

Hi,

i am using Pihole with my Synology Diskstation in a Docker.

Pihole has a own IP with mcvlan and worked fine.
I have used mcvlan with the ip_range 192.168.2.192/30 (with this settings i had only 2 ip adresses)

Yesterday i have deletet the Pihole Container and the mcvlan network because i wanted a new ip range with more ip adresses because i wanted to try out unbound and so i need more ip adresses.

Now i used the following docker-compose.yaml (the same as bevor, only with an other ip range)

services:
pihole:
container_name: pihole
image: pihole/pihole:latest
hostname: pihole
domainname: ds716.local
mac_address: d0:ca:ab:cd:ef:01
cap_add:
- NET_ADMIN
networks:
my_network:
ipv4_address: 192.168.2.199
dns:
- 127.0.0.1
- 8.8.8.8
ports:
- 443/tcp
- 53/tcp
- 53/udp
- 67/udp
- 80/tcp
volumes:
- /volume1/pihole/data:/etc/pihole
- /volume1/pihole/dnsmasq:/etc/dnsmasq.d
environment:
ServerIP: 192.168.2.199
VIRTUAL_HOST: pihole.ds716.local
WEBPASSWORD: ""
TZ: "Europe/Berlin"
restart: unless-stopped

networks:
my_network:
driver: macvlan
driver_opts:
parent: eth0
ipam:
config:
- subnet: 192.168.2.0/24
gateway: 192.168.2.1
ip_range: 192.168.2.192/28

Unfortunatelley Pi-hole does not work after recreation.
I have the following error:

There was a problem applying your settings.
Debugging information:
PHP error (2): fsockopen(): unable to connect to 127.0.0.1:4711 (Connection refused) in /var/www/html/admin/scripts/pi-hole/php/FTL.php:47

Link to Debug Token
https://tricorder.pi-hole.net/Ot6ptWqN/

Can you please help me?

(Sorry, if my english is not so good)

The error is happening because PHP tries to access FTL, but FTL is not running.

[✗] pihole-FTL daemon is inactive

The debug log also shows the database has integrity errors:

[✗] Integrity errors in /etc/pihole/pihole-FTL.db found.

    Error: in prepare, database is locked (5)

To fix this in docker, you need to stop the container, move the existing database to a new file name using:

sudo mv /volume1/pihole/data/pihole-FTL.db /volume1/pihole/data/pihole-FTL-old.db

and then restart the container.

Hi,
thank you for the fast answer.

I already have tried to delete the complete database.
But delete or rename does not work.

Now i have looked in the Tail FTL.log
There i found:
FATAL ERROR in dnsmasq core: cannot access directory /etc/dnsmasq.d: Permission denied
Do you know i can fix this permission failure?

I have started the docker-compose.yaml with sudo when i used the admin user (same as the last installation)

Thank you

I was able to fix the error

I deleted the Pihole folder on Volume1 and recreated it

It works now.

It was probably a permissions issue

Thank you for your help!

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.