Update hangs due to 3rd Party ModSec Rules
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:
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:
[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:
-----
[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
-
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. 0
Please sign in to leave a comment.
Comments
2 comments