Project

General

Profile

unable to start custom build of lighttpd 1.4.77

Added by maxentry 4 days ago

I compiled lighttpd 1.4.77 and running it with systemd on ubuntu but it fails to start with the error below:

I compiled and installed it the same way I did the previous version (1.4.76 - this runs OK) using the following:

./autogen.sh
./configure -C --enable-mmap --with-brotli --with-bzip2 --with-lua --with-maxminddb --with-openssl=/usr/openssl/openssl-3.2.1 --with-pcre2 --with-zstd --with-h2 --prefix=/usr/local/sbin/1.4.77
make -j 4
make install

And here's how I run the service:

PS: I tried rebooting and it still will not start.
Anything obvious I am doing wrong?


Replies (12)

RE: unable to start lighttpd 1.4.77 - Added by avij 4 days ago

Maybe have a look at /var/log/messages and /var/log/lighttpd/error_log (or wherever your error_log resides).

RE: unable to start lighttpd 1.4.77 - Added by maxentry 4 days ago

Nothing in the logs worthy of mention - only shows shutting down 1.4.76.

RE: unable to start lighttpd 1.4.77 - Added by gstrauss 4 days ago

Anything obvious I am doing wrong?

@maxentry, please start with the basics.
See the very first entry in FrequentlyAskedQuestions and How to get support for basic troubleshooting commands.

RE: unable to start lighttpd 1.4.77 - Added by gstrauss 4 days ago

I am going to guess that you need to set LD_LIBRARY_PATH in the startup script for your custom lighttpd build to find your custom openssl build.

You might have the systemd service call a script, say /usr/local/sbin/lighttpd.sh which sets LD_LIBRARY_PATH and executes your /usr/local/sbin/1.4.77/sbin/lighttpd, and then you modify the script for new versions as needed, rather than the systemd service. Just another option.

RE: unable to start lighttpd 1.4.77 - Added by avij 4 days ago

Running "/usr/local/sbin/1.4.77/sbin/lighttpd -tt -f /etc/lighttpd/lighttpd-minimal_tls.conf" may also show something.

RE: unable to start lighttpd 1.4.77 - Added by maxentry 4 days ago

avij wrote in RE: unable to start lighttpd 1.4.77:

Running "/usr/local/sbin/1.4.77/sbin/lighttpd -tt -f /etc/lighttpd/lighttpd-minimal_tls.conf" may also show something.

That simply shows: Syntax OK

RE: unable to start lighttpd 1.4.77 - Added by maxentry 4 days ago

gstrauss wrote in RE: unable to start lighttpd 1.4.77:

I am going to guess that you need to set LD_LIBRARY_PATH in the startup script for your custom lighttpd build to find your custom openssl build.

You might have the systemd service call a script, say /usr/local/sbin/lighttpd.sh which sets LD_LIBRARY_PATH and executes your /usr/local/sbin/1.4.77/sbin/lighttpd, and then you modify the script for new versions as needed, rather than the systemd service. Just another option.

1. I still have 1.4.76 installed and simply changing the systemd service to point to it (i.e ExecStart=/usr/local/sbin/1.4.76/sbin/lighttpd -f /etc/lighttpd/lighttpd-minimal_tls.conf > ExecStart=/usr/local/sbin/1.4.77/sbin/lighttpd -f /etc/lighttpd/lighttpd-minimal_tls.conf) it runs without issue.

2. As mentioned, both versions were compiled using the very same commands (listed in op), statically linked to openssl

RE: unable to start lighttpd 1.4.77 - Added by maxentry 4 days ago

gstrauss wrote in RE: unable to start lighttpd 1.4.77:

Anything obvious I am doing wrong?

@maxentry, please start with the basics.
See the very first entry in FrequentlyAskedQuestions and How to get support for basic troubleshooting commands.

The output from journalctl --unit=lighttpd seems to have something.

However, the file is present in the directory!

(plugin.c.221) dlopen() failed for: /usr/local/sbin/1.4.77/lib/mod_openssl.so /usr/local/sbin/1.4.77/lib/mod_openssl.so: undefined symbol: ERR_new

RE: unable to start lighttpd 1.4.77 - Added by gstrauss 4 days ago

However, the file is present in the directory!

(plugin.c.221) dlopen() failed for: /usr/local/sbin/1.4.77/lib/mod_openssl.so /usr/local/sbin/1.4.77/lib/mod_openssl.so: undefined symbol: ERR_new

The error is not "file not found". The error is "undefined symbol: ERR_new".
You probably compiled lighttpd against a different set of headers for openssl.

Try ./configure --with-openssl=/usr/openssl/openssl-3.2.1 --with-openssl-includes=/usr/openssl/openssl-3.2.1/include

2. As mentioned, both versions were compiled using the very same commands (listed in op), statically linked to openssl

Where did you mention statically linked? You did not share how you built openssl.

RE: unable to start lighttpd 1.4.77 - Added by maxentry 4 days ago

gstrauss wrote in RE: unable to start lighttpd 1.4.77:

However, the file is present in the directory!

(plugin.c.221) dlopen() failed for: /usr/local/sbin/1.4.77/lib/mod_openssl.so /usr/local/sbin/1.4.77/lib/mod_openssl.so: undefined symbol: ERR_new

The error is not "file not found". The error is "undefined symbol: ERR_new".
You probably compiled lighttpd against a different set of headers for openssl.

I have not changed anything in the build process since I compiled openssl-3.2.1 then lighttpd 1.4.76 - I simply compiled lighttpd 1.4.77
PS> openssl has NOT been updated

Try ./configure --with-openssl=/usr/openssl/openssl-3.2.1 --with-openssl-includes=/usr/openssl/openssl-3.2.1/include

OK will try this and update here

2. As mentioned, both versions were compiled using the very same commands (listed in op), statically linked to openssl

Where did you mention statically linked? You did not share how you built openssl.

Never mind - my bad on this.

RE: unable to start lighttpd 1.4.77 - Added by gstrauss 4 days ago

I have not changed anything in the build process since I compiled openssl-3.2.1 then lighttpd 1.4.76 - I simply compiled lighttpd 1.4.77

You seem unable to fathom the concept that something that might be incorrect -- but accidentally worked -- might break in the future.

undefined symbol: ERR_new tells me that the problem is somewhere in your environment (build and/or deploy). Plenty of distros are running lighttpd 1.4.77 without the issue you are having.

RE: unable to start lighttpd 1.4.77 - Added by maxentry 4 days ago

gstrauss wrote in RE: unable to start lighttpd 1.4.77:

You seem unable to fathom the concept that something that might be incorrect -- but accidentally worked -- might break in the future.

undefined symbol: ERR_new tells me that the problem is somewhere in your environment (build and/or deploy). Plenty of distros are running lighttpd 1.4.77 without the issue you are having.

I love lighty and have been using it for over a decade, but crickey! What is this "something that could be incorrect but accidentally worked" thing?
1. The build does not give ANY errors
2. The deploy is simply the make install and changing the service to point to the new binary (i.e change a single number from 6 to 7 in this case)

    (1-12/12)