Project

General

Profile

[Solved] Failing to start - Duplicate config variable in conditional 0 global: server.stat-cache-engine - I can't find a duplicate variable

Added by monorailmedic about 5 years ago

I'm very much an amatuer (read, I know nothing) when it comes to Linux in general, so please be gentle.
Raspbian Stretch
lighttpd 1.4.45-1

I see lighttpd failing to start, so I found the below issues:

Feb 08 16:19:14 raspberrypi lighttpd[1201]: Duplicate config variable in conditional 0 global: server.stat-cache-engine
Feb 08 16:19:14 raspberrypi lighttpd[1201]: 2019-02-08 16:19:14: (configfile.c.1154) source: /etc/lighttpd/conf-enabled/89-dump1090.conf line: 19 pos: 1 parser failed somehow near here: (EOL)
Feb 08 16:19:14 raspberrypi lighttpd[1201]: 2019-02-08 16:19:14: (configfile.c.1154) source: /usr/share/lighttpd/include-conf-enabled.pl line: 4 pos: 8 parser failed somehow near here: (EOL)
Feb 08 16:19:14 raspberrypi lighttpd[1201]: 2019-02-08 16:19:14: (configfile.c.1154) source: /etc/lighttpd/lighttpd.conf line: 28 pos: 1 parser failed somehow near here: (EOL)
Feb 08 16:19:14 raspberrypi systemd[1]: lighttpd.service: Control process exited, code=exited status=255

Cool, so I looked at each of those config files, expecting them to "repeat" some config/flag. However, as I looked I didn't find that. In the first file (in the appropriate position) I found a config for the server.stat-cache-engine. Makes sense:
/etc/lighttpd/conf-enabled/89-dump1090.conf line: 19 pos: 1

server.stat-cache-engine    = "disable" 

In the other files at the stated positions I didn't find duplicates:

/usr/share/lighttpd/include-conf-enabled.pl line: 4 pos: 8

use File::Glob ':glob';

/etc/lighttpd/lighttpd.conf line: 28 pos: 1 (line 28 is actually the last line, which is blank, below is the line above it:

include_shell "/usr/share/lighttpd/include-conf-enabled.pl" 

Again, really trying to learn but I'm confused since I only see each of these occurring once. I appreciate any guidance.


Replies (2)

RE: Failing to start - Duplicate config variable in conditional 0 global: server.stat-cache-engine - I can't find a duplicate variable - Added by gstrauss about 5 years ago

Guideline for just about anyone: make one small change at a time and test it. If it breaks, look more closely.

From the above you seem to have multiple issues, so I would suggest reverting everything to the default package installation.

Unfortunately, there are many different lighttpd packages for many different linux distros, and this is forum for upstream development of lighttpd. Some distros are slow in picking up changes and bugfixes, and some make a mess of configuration files in an attempt to make things easier for amateurs. Intentions are good, but the results not always. To wit: the minimum configuration for lighttpd is a single file with a single line specifying server.document-root. This is not your fault, but at the same time, please do not expect us to have used every distro out there with each packaging quirk. Those are put together but others, though we do try to work with those who reach out to us.

Try commenting out that #server.stat-cache-engine = "disable" line. Disabling the approx one second cache is not recommended unless you have a very specific need to change it. As for the /usr/share/lighttpd/include-conf-enabled.pl, you can try commenting that out, too, to see if you get a basic webserver working. lighttpd has a better way to do this and some distros have started using include "/etc/lighttpd/conf-available/*.conf" (to an appropriate path) rather than using include_shell on a perl script.

RE: [Solved] Failing to start - Duplicate config variable in conditional 0 global: server.stat-cache-engine - I can't find a duplicate variable - Added by gstrauss about 5 years ago

grep stat-cache-engine -r /etc/lighttpd

You might need to put server.stat-cache-engine into a global { ... } block depending on the mess of your config. See Docs_Configuration

You probably should disable /etc/lighttpd/conf-enabled/89-dump1090.conf and try again.

    (1-2/2)