I have pi-hole (https://pi-hole.net) running on an F28 (x86) virtual machine After several months of it just sitting there doing its thing with no interference, tonight I ran "dnf update; pihole -up", then rebooted. When it came back up the webadmin interface was no longer reachable. netstat -na shows only ports 53 and 22 tcp listening. I tried "systemctl start lightttpd" and I see this message in the system logs: lighttpd[1205]: 2018-10-13 20:20:59: (configfile.c.1451) pclose "cat external.conf 2>/dev/null"failed: Success lighttpd[1205]: 2018-10-13 20:20:59: (configfile.c.1289) source: /etc/lighttpd/lighttpd.conf line: 94 pos: 1 parser failed somehow near here: (EOL) systemd[1]: lighttpd.service: Main process exited, code=exited, status=255/n/a systemd[1]: lighttpd.service: Failed with result 'exit-code'. I also tried a complete repair/reinstall of pihole (with "pihole -r", and then by uninstalling pi-hole and lighttpd and installing from scratch with the curl command on the front page of the pi-hole website. Same result. (rebooted after each try for good measure) So I ran "yum downgrade lighttpd-*" which brought it back from 1.4.50-1 to 1.4.49-4, and now everything again works. This is fairly easy to reproduce by just installing pi-hole on a clean F28 system (using the single command on the above-referenced web page).
If lighttpd complains about an error in the config, wouldn't you think it would make sense to attach the config to the bug so that people would be able to examine it?
https://redmine.lighttpd.net/issues/2910 may be related.
(In reply to Anssi Johansson from comment #1) > If lighttpd complains about an error in the config, wouldn't you think it > would make sense to attach the config to the bug so that people would be > able to examine it? Not necessarily. A single file from an unknowledgeable reporter might help, or it might just create extra content with no value, or be missing some crucial other file that was needed. I considered attaching the lightttpd.conf file, but then figured it was just as likely due to some other file that was included (and which I wouldn't know about, since I have only used lighttpd unknowingly as part of an appliance), so I decided it would be more prudent to explain a simple way (literally a single shell line) to reproduce the problem, and then if anyone looking at the BZ asked for specific files, I would attach them. In the meantime, pi-hole devs pointed me to this posting: https://discourse.pi-hole.net/t/fresh-install-and-web-admin-page-not-work/12926 and, as suggested there, creating an empty external.conf allows me to use lighttpd-1.4.50. I won't pretend to know whether or not that's the same problem you've referenced, but if it is, and if that patch is making its way downstream, then we're done here :-) (since the problem has been worked around on my system, and anyone else encountering it before the fix gets to a Fedora package can just do the same thing).
Not everyone has immediate access to fresh throwaway Fedora installations. Sure, VMs can be spun up, but clicking on a "See attachment lighttpd.conf" is much quicker. In any case, I ended examining the installation script and then noticed that it replaces the conf file with pi-hole's own. I believe this bug has been fixed in lighttpd 1.4.51, released today.
lighttpd-1.4.51-1.fc29 has been submitted as an update to Fedora 29. https://bodhi.fedoraproject.org/updates/FEDORA-2018-cd5a9c3c0f
lighttpd-1.4.51-1.fc27 has been submitted as an update to Fedora 27. https://bodhi.fedoraproject.org/updates/FEDORA-2018-de6d032aae
lighttpd-1.4.51-1.fc28 has been submitted as an update to Fedora 28. https://bodhi.fedoraproject.org/updates/FEDORA-2018-a31054181a
Created attachment 1494207 [details] pi-hole lighttpd.conf
Thanks for looking into this so quickly. My expectation of Fedora BZes is that at least half of them will just be closed EOL because the maintainers are too overloaded, so it's nice to see action. :-) Since you were so quick to respond, I decided I need to also be quick to test. I downloaded 1.4.51 of the three lighttpd packages used on the machine from bodhi (they hadn't madde it into updates-testing yet) and restarted, and unfortunately the problem persists (if I create an empty external.conf, then the problem disappears.) So since it wasn't fixed by the new release, and you've asked for the .conf file, I'm attaching it. (My final comment on not attaching it to begin with - I've had more than my share of BZes where the reporter attached tons of irrelevant noise, and just made it too long to filter out the useful stuff, so I tend to go minimalist when I report (esp. if I don't know what would/wouldn't be relevant), then if someone asks for more specifics, I'll send them.) I also logged into bodhi and left a +1 karma (but -1 for fixing this BZ) for the package, just in case that helps it along to the updates repo.
OK, now I actually tested this myself (on CentOS 7, but that's probably similar enough). You initially reported that you got this error message: pclose "cat external.conf 2>/dev/null"failed: Success I believe that the error message you got changed with 1.4.51: commaned "cat external.conf 2>/dev/null" exited non-zero: 1 Looking at https://github.com/lighttpd/lighttpd1.4/blob/master/src/configfile.c#L1461 it looks like the change to return an error if the executed command returns an error is intentional. Maybe you (or pi-hole) should arrange it so that the executed command would not return an error, either by having that external.conf in place or by: include_shell "cat external.conf 2>/dev/null; exit 0"
lighttpd-1.4.51-1.fc27 has been pushed to the Fedora 27 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-de6d032aae
lighttpd-1.4.51-1.fc28 has been pushed to the Fedora 28 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-a31054181a
Yes, lighttpd config file processing intentionally errors out if the 'include_shell' command fails. As an alternative, use lighttpd.conf 'include' with a file glob instead of 'include_shell'. 'include' with a file glob will include the files from the file glob, and will not error out if the file glob returns zero files. include "external*.conf"
lighttpd-1.4.51-1.fc29 has been pushed to the Fedora 29 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-cd5a9c3c0f
Patch submitted upstream as pull request in https://github.com/pi-hole/pi-hole/pull/2468
lighttpd-1.4.51-1.fc28 has been pushed to the Fedora 28 stable repository. If problems still persist, please make note of it in this bug report.
lighttpd-1.4.51-1.fc27 has been pushed to the Fedora 27 stable repository. If problems still persist, please make note of it in this bug report.
lighttpd-1.4.51-1.fc29 has been pushed to the Fedora 29 stable repository. If problems still persist, please make note of it in this bug report.