500 Internal Server Error

I have an install that’s worked for quite a while, just noticed this error when trying to access from WHM, any help is much appreciated…

No response from subprocess (/usr/local/cpanel/whostmgr/docroot/cgi/addon_cwaf.cgi): The subprocess reported error number 2 when it ended.

cpsrvd/11.56.0.1 Server at www.myserver.com

wondering how to track this down, also see this error in cpanel log:

[2016-04-12 12:43:14 -0700] warn [cpsrvd] The subprocess (/usr/local/cpanel/whostmgr/docroot/cgi/changelog.cgi) exited with an error: The subprocess reported error number 255 when it ended. at /usr/local/cpanel/Cpanel/Server/Handlers/SubProcess.pm line 155.
Cpanel::Server::Handlers::SubProcess::_report_subprocess_errors(Cpanel::Server::Handlers::SubProcess=HASH(0x3d65df0)) called at /usr/local/cpanel/Cpanel/Server/Handlers/SubProcess.pm line 72
Cpanel::Server::Handlers::SubProcess::handler(Cpanel::Server::Handlers::SubProcess=HASH(0x3d65df0), CPANEL_HIDDEN, CPANEL_HIDDEN, CPANEL_HIDDEN, IO::Handle=GLOB(0x3d63408), CPANEL_HIDDEN, GLOB(0x3d64348)) called at cpsrvd.pl line 6301
cpanel::cpsrvd::cgiHandler(CPANEL_HIDDEN, CPANEL_HIDDEN, CPANEL_HIDDEN, CPANEL_HIDDEN) called at cpsrvd.pl line 5792
cpanel::cpsrvd::dodoc_whostmgrd() called at cpsrvd.pl line 1674
cpanel::cpsrvd::dodoc(HASH(0xeda028)) called at cpsrvd.pl line 1347
cpanel::cpsrvd::handle_one_connection() called at cpsrvd.pl line 841
cpanel::cpsrvd::script() called at cpsrvd.pl line 334
==> cpsrvd 11.56.0.1 started
==> cpsrvd: loading security policy…Done
==> cpsrvd: Setting up native SSL support … Done
==> cpsrvd: transferred port bindings
==> cpsrvd: bound to ports
Can’t locate Comodo/CWAF/Main.pm in @INC (you may need to install the Comodo::CWAF::Main module) (@INC contains: /usr/local/cpanel /usr/local/cpanel/whostmgr/docroot/cgi /usr/local/cpanel/3rdparty/perl/522/lib64/perl5/cpanel_lib/x86_64-linux-64int /usr/local/cpanel/3rdparty/perl/522/lib64/perl5/cpanel_lib /usr/local/cpanel/3rdparty/perl/522/lib64/perl5/5.22.1/x86_64-linux-64int /usr/local/cpanel/3rdparty/perl/522/lib64/perl5/5.22.1 /opt/cpanel/perl5/522/site_lib/x86_64-linux-64int /opt/cpanel/perl5/522/site_lib) at /usr/local/cpanel/whostmgr/docroot/cgi/addon_cwaf.cgi line 17.
BEGIN failed–compilation aborted at /usr/local/cpanel/whostmgr/docroot/cgi/addon_cwaf.cgi line 17.

We reproduced this issue and got the same result:


Can't locate Comodo/CWAF/Main.pm in @INC (you may need to install the Comodo::CWAF::Main module) (@INC contains: /usr/local/cpanel /usr/local/cpanel/whostmgr/docroot/cgi /usr/local/cpanel/3rdparty/perl/522/lib64/perl5/cpanel_lib/x86_64-linux-64int /usr/local/cpanel/3rdparty/perl/522/lib64/perl5/cpanel_lib /usr/local/cpanel/3rdparty/perl/522/lib64/perl5/5.22.1/x86_64-linux-64int /usr/local/cpanel/3rdparty/perl/522/lib64/perl5/5.22.1 /opt/cpanel/perl5/522/site_lib/x86_64-linux-64int /opt/cpanel/perl5/522/site_lib) at /usr/local/cpanel/whostmgr/docroot/cgi/addon_cwaf.cgi line 17.
BEGIN failed--compilation aborted at /usr/local/cpanel/whostmgr/docroot/cgi/addon_cwaf.cgi line 17.
[2016-04-13 15:44:53 +0300] info [cpsrvd] Internal Server Error: "GET /cpsess3000648998/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.

There are two ways to resolve it:

cp -avr /var/cpanel/cwaf/modules/CPAN/lib/* /usr/local/cpanel/3rdparty/perl/522/lib64/perl5/cpanel_lib

or copy to one of another directories mentioned above

  1. backup /var/cpanel/cwaf and reinstall plug-in

I used method 1 copying the files. that appears to have restored WAF. thanks.

Hi so do i just run this command below to fix my problem ? or will there be an update so the plugin works with cpanel 56

cp -avr /var/cpanel/cwaf/modules/CPAN/lib/* /usr/local/cpanel/3rdparty/perl/522/lib64/perl5/cpanel_lib

This issue doesn’t depend on our plug-in. The matter is after cPanel update new perl modules are installed in //perl

Thanks so do i jsut run this command cp -avr /var/cpanel/cwaf/modules/CPAN/lib/* /usr/local/cpanel/3rdparty/perl/522/lib64/perl5/cpanel_lib

Yes, if modules are located in /usr/local/cpanel/3rdparty/perl/522/lib64/perl5/cpanel_lib

I suppose now more correct way is to make symlink for necessary directory.

This issue has returned again, after working for about 8 months. I’ve tried both previous suggested solutions again and now still getting the 500 server errors.

Any other ideas I might try? thanks.

Please, see this topic:
https://forums.comodo.com/free-modsecurity-rules-comodo-web-application-firewall/internal-server-error-cpanel-116201-t117790.0.html
If you updated cPanel up to 11.62 it could be a reason of this issue. Send me your e-mail in PM and I’ll send you whmlib.pm.