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

(mod_fastcgi.c.1406) [ERROR]: spawning fcgi failed #217

Closed
xenithorb opened this issue Jan 13, 2018 · 15 comments
Closed

(mod_fastcgi.c.1406) [ERROR]: spawning fcgi failed #217

xenithorb opened this issue Jan 13, 2018 · 15 comments

Comments

@xenithorb
Copy link

xenithorb commented Jan 13, 2018

2018-01-13 13:52:17: (log.c.164) server started
2018-01-13 13:52:17: (mod_fastcgi.c.984) bind failed for: unix:/var/run/lighttpd/php.socket-0 No such file or directory
2018-01-13 13:52:17: (mod_fastcgi.c.1406) [ERROR]: spawning fcgi failed.
2018-01-13 13:52:17: (server.c.1022) Configuration of plugins failed. Going down.

Getting this in /var/log/lighthttpd/error.log

docker logs shows s6 is restarting lighthttpd over and over again, but otherwise pi-hole setup was successful and DNSmasq is running and working. FTL is also running OK.

REPOSITORY                 TAG                 IMAGE ID            CREATED             SIZE
docker.io/diginc/pi-hole   latest              6b77d5329fd4        8 days ago          330.5 MB
@diginc
Copy link
Collaborator

diginc commented Jan 15, 2018

Are there any volumes pointed to /var/? What's the container run configuration look like?

@jimsantora
Copy link

I'm seeing the same issue with that image, as well as the current debian_dev tag. Simply creating the /var/run/lighttpd directory inside the container and giving www-data r/w access fixed the problem.

Also tried building from your dockerfile, and the resulting image had the same problem. I didn't see any errors when lighttpd was installed, maybe something has changed with the deb. For now, adding a couple lines to the Dockerfile to create the directory and set perms works.

@tybritten
Copy link

+1 on this issue. should we put a PR in for the temp fix?

@diginc
Copy link
Collaborator

diginc commented Jan 25, 2018

I've been out sick for a week, trying to reproduce with docker_run.sh now.

@diginc
Copy link
Collaborator

diginc commented Jan 25, 2018

I was unable to reproduce. Can I see a docker run command example? Also what OS & Docker version are those of you seeing this problem using?

I ran this exactly: https://raw.githubusercontent.com/diginc/docker-pi-hole/master/docker_run.sh

$ docker inspect pihole | grep -i image
        "Image": "sha256:6b77d5329fd484527ec719e52e3f2c85cecea0a06a652feeed8779f458d8abd0",
            "Image": "diginc/pi-hole:latest",
                "image": "diginc/pi-hole:debian_amd64",

/var/run/lighttpd permissions:

$ docker exec pihole ls -lat /var/run/lighttpd
total 8
drwxr-xr-x 2 www-data www-data 4096 Jan 25 15:17 .
drwxr-xr-x 8 root     root     4096 Jan 25 15:17 ..
srwxr-xr-x 1 www-data www-data    0 Jan 25 15:17 php.socket-0

@tybritten
Copy link

tybritten commented Jan 25, 2018

docker inspect pihole | grep -i image
        "Image": "sha256:6b77d5329fd484527ec719e52e3f2c85cecea0a06a652feeed8779f458d8abd0",
            "Image": "diginc/pi-hole",
                "image": "diginc/pi-hole:debian_amd64",

and here:

docker exec pihole ls -lat /var/run/lighttpd
ls: cannot access /var/run/lighttpd: No such file or directory

Docker version 1.13.1, build fbadd78-unsupported

fedora-atomic-27:fedora/27/x86_64/atomic-host
                   Version: 27.47 (2018-01-04 01:48:32)
                    Commit: 397e907961adafaeff11b807ceade8da5783134072406fcdba627f1195e0db76
              GPGSignature: Valid signature by 860E19B0AFA800A1751881A6F55E7430F5282EE4

@tybritten
Copy link

whoops almost forgot the docker run:

/usr/bin/docker run --rm \
--name pihole \
--dns 127.0.0.1 --dns 8.8.8.8 \
-p 53:53/tcp -p 53:53/udp -p 80:80 \
-v "/var/opt/pihole/pihole/:/etc/pihole/" \
-v "/var/opt/pihole/dnsmasq.d/:/etc/dnsmasq.d/" \
-e ServerIP= ********** \
-e WEBPASSWORD= ******** \
-e VIRTUAL_HOST=********* \
diginc/pi-hole

@diginc
Copy link
Collaborator

diginc commented Jan 25, 2018

what about docker exec pihole ls -lat /var/run/

#220 reports this issue happening on CentOS and you report Fedora. Since I'm unable to reproduce the problem on ubuntu I'm wondering if there's a connection between this bug and the Docker OS being RedHat based. @xenithorb what OS are you?

If the work around is simply a mkdir /var/run/lighttpd in install.sh I'm ok with that adding that...but I'm very curious what the cause is still.

@tybritten
Copy link

Interesting.
Here:

docker exec pihole ls -lat /var/run/
total 28
-rw-r--r-- 1 root root    4 Jan 25 17:38 lighttpd.pid
drwxr-xr-x 5 root root  220 Jan 25 17:38 .
-rw-r--r-- 1 root root    4 Jan 25 17:38 pihole-FTL.port
---------- 1 root root    0 Jan 25 17:38 crond.reboot
-rw-r--r-- 1 root root    3 Jan 25 17:38 pihole-FTL.pid
-rw-r--r-- 1 root root    4 Jan 25 17:38 crond.pid
-rw-r--r-- 1 root root    4 Jan 25 17:38 dnsmasq.pid
drwxr-xr-x 1 root root 4096 Jan 25 17:38 ..
drwxr-xr-x 7 root root  140 Jan 25 17:38 s6
drwxr-xr-x 2 root root   40 Jan 25 17:38 lock
drwxr-xr-x 3 root root 4096 Jan 25 17:38 secrets

so much for the host OS not being that important to container images..

@xenithorb
Copy link
Author

CentOS 7.4 here @diginc

@diginc
Copy link
Collaborator

diginc commented Jan 25, 2018

just-containers/s6-overlay#158 (comment) maybe the cause or related?

@tybritten
Copy link

Yeah looks like it- I think the best workaround for now is to add the VOLUME /run to the dockerfile or just make a note for people to add -v /run to the docker run command.

Thoughts?

@diginc
Copy link
Collaborator

diginc commented Jan 27, 2018

I took away that renaming /init to something different would also be a valid work around since it would prevent the auto mounting /var.

@diginc
Copy link
Collaborator

diginc commented Jan 27, 2018

debian_dev tag use /s6-init instead of /init now: https://hub.docker.com/r/diginc/pi-hole/tags/

@xenithorb
Copy link
Author

I can report that both solutions work, mounting -v /run and also the renaming of /init

Thanks

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

4 participants