Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

LUA issues with EA3

Discussion in 'EasyApache' started by lorio, Aug 25, 2018.

  1. lorio

    lorio Well-Known Member

    Joined:
    Feb 25, 2004
    Messages:
    294
    Likes Received:
    13
    Trophy Points:
    168
    cPanel Access Level:
    Root Administrator
    EA3 WHM v72.0.11 stable CentOS 6
    ConfigServer cmc: v3.01 is installed.


    Get an build error with EA3 and mod security.
    Code:
    !! 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
    
    Code:
        --- /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<IfModule mod_security2.c>
        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<IfModule mod_ruid2.c>
        --- /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.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
    #1 lorio, Aug 25, 2018
    Last edited: Aug 25, 2018
  2. cPanelMichael

    cPanelMichael Technical Support Community Manager Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    47,335
    Likes Received:
    2,162
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    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:

    Code:
    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.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. lorio

    lorio Well-Known Member

    Joined:
    Feb 25, 2004
    Messages:
    294
    Likes Received:
    13
    Trophy Points:
    168
    cPanel Access Level:
    Root Administrator
    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.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  4. cPanelMichael

    cPanelMichael Technical Support Community Manager Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    47,335
    Likes Received:
    2,162
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    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:

    Code:
      '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.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice