LUA issues with EA3
EA3 WHM v72.0.11 stable CentOS 6
ConfigServer cmc: v3.01 is installed.
Get an build error with EA3 and mod security.
I wonder why the lua line is no longer commented out (LoadFile /opt/lua/lib/liblua.so). But that might not be root cause of that issue. I cannot remember removing the # of the lua line. When commenting out "LoadFile /opt/lua/lib/liblua.so" again, I still get the same error with no # in front of LoadFile /opt/lua/lib/liblua.so? Sounds crazy, I know. Any idea where to look? And hint, what breaks the process? When I remove line 2 " LoadFile /opt/lua/lib/liblua.so" from /usr/local/apache/conf/modsec2.conf and let EA3 build again. The error log still shows the old /usr/local/apache/conf/modsec2.conf with " LoadFile /opt/lua/lib/liblua.so" on line 2. Thanks in advance.
!! The "/usr/local/apache/bin/httpd" command (process 15970) reported error number 1 when it ended.
Configuration problem detected on line 3 of file /usr/local/apache/conf/modsec2.conf: : Cannot load modules/mod_security2.so into server: /usr/local/apache/modules/mod_security2.so: undefined symbol: lua_pcallk
--- /usr/local/apache/conf/modsec2.conf ---
1LoadFile /opt/xml2/lib/libxml2.so
2 LoadFile /opt/lua/lib/liblua.so
3 ===> LoadModule security2_module modules/mod_security2.so <===
4
5# See http://www.modsecurity.org/documentation/ModSecurity-Migration-Matrix.pdf
6# "Add the rules that will do exactly the same as the directives"
7# SecFilterCheckURLEncoding On
8# SecFilterForceByteRange 0 255
9
--- /usr/local/apache/conf/modsec2.conf ---I wonder why the lua line is no longer commented out (LoadFile /opt/lua/lib/liblua.so). But that might not be root cause of that issue. I cannot remember removing the # of the lua line. When commenting out "LoadFile /opt/lua/lib/liblua.so" again, I still get the same error with no # in front of LoadFile /opt/lua/lib/liblua.so? Sounds crazy, I know. Any idea where to look? And hint, what breaks the process? When I remove line 2 " LoadFile /opt/lua/lib/liblua.so" from /usr/local/apache/conf/modsec2.conf and let EA3 build again. The error log still shows the old /usr/local/apache/conf/modsec2.conf with " LoadFile /opt/lua/lib/liblua.so" on line 2. Thanks in advance.
-
Hello @lorio, This is a known issue reported as part of internal case EAL-3220. The current workaround is to install the lua-devel package before starting the EasyApache 3 build: yum install lua-devel
Can you check and verify if this addresses the issue? Also, is there anything in-particular that's preventing you from updating this server to EasyApache 4 that we could possibly assist with? EasyApache 3 is nearing EOL status and cases like EAL-3220 may not receive as much priority. Thank you.0 -
yum install lua-devel
Can you check and verify if this addresses the issue?
Thanks, I can confirm that this solves the issue. Any background info about that? I still don't understand why I cannot comment the lua line out. The /usr/local/apache/conf/modsec2.conf file seems to get composed from a different source, which is preventing any change. To answer your question about EA3->EA4. Yes, I will move to EA4 soon. But I like to post bugs and get them solved. Since nobody posted something about that issue, now we have thread. There might be others which can profit from that. Might save some tickets on your side, too. Thanks again. I only checked the LUA installation. Didn't thought a second about trying the development package.0 -
Thanks, I can confirm that this solves the issue. Any background info about that?
I still don't understand why I cannot comment the lua line out. The /usr/local/apache/conf/modsec2.conf file seems to get composed from a different source, which is preventing any change.
Internal case EAL-3220 notes the issue relates to /var/cpanel/perl/easy/Cpanel/Easy/ModSec.pm where it incorrectly adds the lua line to the /usr/local/apache/conf/modsec2.conf file on systems using EasyApache 3. The lines in ModSec.pm at the root of the issue area:'7.1' => { 'name' => 'lua Loadfile if necessary', 'command' => sub { my ($self) = @_; my $conf = '/usr/local/apache/conf/modsec2.conf'; if ( -d $self->{'__'}{'lua_path'} && -e $self->{'__'}{'lua_path'} . 'lib/liblua.so' && -e $conf ) { <=========> my $rc = Cpanel::FileUtils::regex_rep_file( $conf, { qr{^[\s]*[#](\s*LoadFile\s*/opt/lua/lib/liblua[.]so)} => q{$1}, }, {}, ); $self->print_alert( q{Could not add '[_1]' to '[_2]'}, 'lua LoadFile', $conf ) if !$rc; } return ( 1, 'ok' ); }, },
Thank you.0
Please sign in to leave a comment.
Comments
3 comments