EasyApache 4 2019-1-9: mod_lsapi reinstallation prevents Apache restart

WasChristine

Technical Analyst
Aug 10, 2018
57
11
83
Houston, TX
cPanel Access Level
Root Administrator
Greetings,

The most recent EasyApache 4 Maintenance release included the new ea-apache24-mod_lsapi package, which caused a problem for some customers that use CloudLinux. We have removed that package from our repository and will be working with the team at CloudLinux to ensure the problem does not reoccur. If your server was impacted by this problem then the current workaround would be:


Code:
yum remove ea-apache24-mod_lsapi ea-liblsapi
yum reinstall liblsapi
yum install ea-apache24-mod_lsapi


There has been a recent influx of tickets regarding the above workaround causing Apache to not start. The error reported in Apache's error log will look similar to:

Code:
[Thu Jan 10 11:22:23.742507 2019] [lsapi:error] [pid 2124688:tid 47522832098656] mod_lsapi:  version 1.1-33: initialization error: cannot stat file: (/etc/sysconfig/modlsapi.secret)
[Thu Jan 10 11:22:23.742515 2019] [:emerg] [pid 2124688:tid 47522832098656] AH00020: Configuration Failed, exiting
In the case that this occurs, the "modlsapi.secret" file would need to be regenerated. This can be done by running the following commands:

Code:
/bin/dd if=/dev/random of=/etc/sysconfig/modlsapi.secret bs=1 count=16

chmod -v 400 /etc/sysconfig/modlsapi.secret

/scripts/rebuildhttpdconf

/scripts/restartsrv_httpd
What this will do is regenerate the modlsapi.secret file with the specifications provided from CloudLinux's documentation on Apache mod_lsapi.

EDIT:
As an addendum to this while not directly related to the issue in this case, a side effect you may encounter is that your PHP handlers may be reset when installing ea-apache24-mod_lsapi. Once the workaround steps are complete it is extremely important to check your PHP handlers for any versions of PHP which were using lsapi. An example of the behavior you might see is as follows:
Code:
-bash-4.2# /usr/local/cpanel/bin/rebuild_phpconf --current | grep ea-php70
ea-php70 SAPI: lsapi
-bash-4.2# yum remove ea-apache24-mod_lsapi && yum install ea-apache24-mod_lsapi
....
-bash-4.2# /usr/local/cpanel/bin/rebuild_phpconf --current | grep ea-php70
ea-php70 SAPI: suphp
If you have further problems, please do reach out to your hosting provider, or to our technical support team.
 
Last edited by a moderator: