We’ve had a working version of CWAF running for a number of months. Now suddenly when starting the WHM plugin for CWAF I get the message
Internal Server Error 500
No response from subprocess (/usr/local/cpanel/whostmgr/docroot/cgi/addon_cwaf.cgi): The subprocess reported error number 2 when it ended.
Our server runs WHM 64 build 36
I found in an old forum post to run /var/cpanel/cwaf/scripts/update-client.pl which did update the WHM plugin to version 2.21 however I still see the same 500 error when trying to start the WHM plugin
please, send us some previous strings in /usr/local/cpanel/logs/error_log. For example:
Can’t use an undefined value as a symbol reference at /usr/local/cpanel/3rdparty/perl/524/lib64/perl5/cpanel_lib/Config/Crontab.pm line 299.
[2017-08-16 04:55:47 -0400] info [whostmgrd] Internal Server Error: “POST /cpsess1173053289/cgi/cwaf_main.cgi HTTP/1.1” 500 No response from subprocess (/usr/local/cpanel/whostmgr/docroot/cgi/cwaf_main.cgi): The subprocess reported error number 25 when it ended.
can’t read config /usr/local/apache/conf/modsec2.conf at /var/cpanel/cwaf/modules/CPAN/lib/Comodo/CWAF/ModSecurity.pm line 73.
After seeing that, I checked and /usr/local/apache/conf/modsec2.conf did not exist.
I copied that file into /usr/local/apache/conf/ from another site that has CWAF running correctly, and now the WHM plugin is working. I have no idea where that file went - CWAF was working correctly on this site for months and then stopped. It seems that replacing that file solved the problem.
I’ve pasted in some other relevant error log lines below. Please review and let me know if you see anything else that needs to be addressed.
thank you!
the errors below are from two attempts to start the CWAF WHM plugin:
can’t read config /usr/local/apache/conf/modsec2.conf at /var/cpanel/cwaf/modules/CPAN/lib/Comodo/CWAF/ModSecurity.pm line 73.
Compilation failed in require at /usr/local/cpanel/whostmgr/docroot/cgi/addon_cwaf.cgi line 21.
BEGIN failed–compilation aborted at /usr/local/cpanel/whostmgr/docroot/cgi/addon_cwaf.cgi line 21.
[2017-08-16 08:54:14 -0700] info [whostmgrd] Internal Server Error: “GET /cpsess5356100795/cgi/addon_cwaf.cgi HTTP/1.1” 500 No response from subprocess (/usr/local/cpanel/whostmgr/docroot/cgi/addon_cwaf.cgi): The subprocess reported error number 2 when it ended.
[2017-08-16 08:54:17 -0700] info [xml-api] Successfully verified signature for cpanel (key types: release).
[2017-08-16 08:54:17 -0700] info [xml-api] Successfully verified signature for cpanel (key types: release).
can’t read config /usr/local/apache/conf/modsec2.conf at /var/cpanel/cwaf/modules/CPAN/lib/Comodo/CWAF/ModSecurity.pm line 73.
Compilation failed in require at /usr/local/cpanel/whostmgr/docroot/cgi/addon_cwaf.cgi line 21.
BEGIN failed–compilation aborted at /usr/local/cpanel/whostmgr/docroot/cgi/addon_cwaf.cgi line 21.
[2017-08-16 08:54:18 -0700] info [whostmgrd] Internal Server Error: “GET /cpsess5356100795/cgi/addon_cwaf.cgi HTTP/1.1” 500 No response from subprocess (/usr/local/cpanel/whostmgr/docroot/cgi/addon_cwaf.cgi): The subprocess reported error number 2 when it ended.