0

We have four instances of Apache, with four distinct IP addresses, running on an Ubuntu 20.04 system on Azure. The instances look something like this:

apache2 apache2-suffix1 apache2-suffix2 apache2-suffix3

We had been running Apache 2.4.48 with no issues since July. Today we updated Apache to 2.4.50. There were no errors during the update. We restarted Apache and all sites worked fine.

However, after rebooting the Ubuntu server itself, only the primary Apache (apache2) instance starts up. The other instances all have an error that looks like this:

apache2@suffix1.service - The Apache HTTP Server Loaded: loaded (/lib/systemd/system/apache2@.service; enabled; vendor preset: enabled)

 Active: failed (Result: exit-code) since Wed 2021-10-06 22:11:17 UTC; 19min ago
   Docs: https://httpd.apache.org/docs/2.4/
Process: 816 ExecStart=/usr/sbin/apachectl start (code=exited, status=127)

Oct 06 22:11:17 SERVER systemd[1]: Starting The Apache HTTP Server...

Oct 06 22:11:17 SERVER apachectl[848]: /usr/sbin/apachectl: 174: /usr/sbin/apache2-suffix1: not found

Oct 06 22:11:17 SERVER apachectl[816]: Action 'start' failed.

Oct 06 22:11:17 SERVER apachectl[816]: The Apache error log may have more information.

Oct 06 22:11:17 SERVER systemd[1]: apache2@stauberusa.service: Control process exited, code=exited, status=127/n/a

Oct 06 22:11:17 SERVER systemd[1]: apache2@stauberusa.service: Failed with result 'exit-code'.

Oct 06 22:11:17 SERVER systemd[1]: Failed to start The Apache HTTP Server.

There is nothing in the error log because the system never starts. Any help is appreciated.

0
0

I figured it out. I looked through the documentation on on Apache.org to follow through what was supposed to happen when Apache starts. There is a script located in /usr/sbin/ called apachectl. In the 2.4.48 version, line 78 looks like this:

HTTPD=${APACHE_HTTPD:-usr/sbin/apache2}

In the 2.4.49 and later versions, this line looks like this:

HTTPD=${APACHE_HTTPD:-usr/sbin/apache2$SUFFIX}

Where $SUFFIX is the name of the other Apache instances. This variable sets the location for the Apache binary, so appending the suffix makes it look in a directory that doesn’t exist.

1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.