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!

Update hangs due to 3rd Party ModSec Rules

Discussion in 'Security' started by Tanner_W, Dec 13, 2018.

Tags:
  1. Tanner_W

    Tanner_W Member

    Joined:
    Feb 2, 2015
    Messages:
    10
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    DataCenter Provider
    Updating cPanel/WHM via WebUI -- when using 3rd party ModSecurity ruleset provider malware.expert

    WebUI process sticks at 94% and never progresses past this point. If I leave the UI page and come back, it reports it is still in progress and shows me the log file with the same contents -- up to the existing point:

    Code:
    [2018-12-13 12:54:56 -0700]    - Processing command `/usr/local/cpanel/scripts/setup_modsec_db`
    [2018-12-13 12:54:56 -0700]    - Finished command `/usr/local/cpanel/scripts/setup_modsec_db` in 0.074 seconds
    [2018-12-13 12:54:56 -0700]    - Processing command `/usr/local/cpanel/scripts/modsec_vendor update --auto`
    
    
    I am on cPanel/WHM 76.0.13 and attempting to update to 76.0.14.
    This morning I installed (successfully according to the ModSecurity Vendors UI) the free one-month trial of malware.expert's modsec rules. ( https :// malware . expert/modsecurity-rules/ )



    If I try to run the command manually where it is stuck, this is my output:
    Code:
    -----
    [root@server ~]# /usr/local/cpanel/scripts/modsec_vendor update --auto
    
    info [modsec_vendor] Updates are in progress for all of the installed ModSecurity vendors with automatic updates enabled.
    
    Cpanel::Exception::Timeout/(XID zqyf9q) The system failed to lock the file “/etc/apache2/conf/httpd.conf” after 197 seconds.
    
     at /usr/local/cpanel/Cpanel/SafeFile.pm line 735.
    
    Cpanel::SafeFile::_timeout_exception("/etc/apache2/conf/httpd.conf", 197) called at /usr/local/cpanel/Cpanel/SafeFile.pm line 766
    
    Cpanel::SafeFile::_die_if_file_is_flocked_cuz_already_waited_a_while("/etc/apache2/conf/httpd.conf", 197) called at /usr/local/cpanel/Cpanel/SafeFile.pm line 834
    
    Cpanel::SafeFile::_lock_wait("/etc/apache2/conf/httpd.conf") called at /usr/local/cpanel/Cpanel/SafeFile.pm line 355
    
    Cpanel::SafeFile::_safelock("/etc/apache2/conf/httpd.conf") called at /usr/local/cpanel/Cpanel/SafeFile.pm line 558
    
    Cpanel::SafeFile::_safe_open(undef, "<", "/etc/apache2/conf/httpd.conf", CODE(0x1ba2ba8), "safeopen") called at /usr/local/cpanel/Cpanel/SafeFile.pm line 115
    
    Cpanel::SafeFile::safeopen(undef, "<", "/etc/apache2/conf/httpd.conf") called at /usr/local/cpanel/Cpanel/HttpUtils/ApRestart/Defer.pm line 94
    
    Cpanel::HttpUtils::ApRestart::Defer::block_restarts(Cpanel::HttpUtils::ApRestart::Defer=HASH(0x292cfa0)) called at /usr/local/cpanel/scripts/modsec_vendor line 161
    
    scripts::modsec_vendor::update("--auto") called at /usr/local/cpanel/scripts/modsec_vendor line 46
    
    scripts::modsec_vendor::run("update", "--auto") called at /usr/local/cpanel/scripts/modsec_vendor line 25
    
    
     
  2. Tanner_W

    Tanner_W Member

    Joined:
    Feb 2, 2015
    Messages:
    10
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    DataCenter Provider
    To clarify... what I am asking and suggesting here to cPanel staff is that I think that the update script needs to be improved to detect the cause of this, and then to be able to handle it -- whether it means skipping over a specific ruleset provider and continuing on with the update, etc.
     
  3. cPanelMichael

    cPanelMichael Technical Support Community Manager Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    47,328
    Likes Received:
    2,157
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hello @Tanner_W,

    Can you open a support ticket so we can take a closer look at the affected system to see what happened during the cPanel update attempt? You can post the ticket number here and we'll link this thread to it.

    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