2.18.1 on WHM/cPanel install/update is broken

Just tried to update from 2.17 to 2.18.1 and see this in the logs.

[2016-10-21 14:42:15 -0500] info [addon_cwaf] Missing owner for domain xxx.net, force lookup to root
| you may examine log file /tmp/cwaf_install.log.17433 for more info.
| LOG : Preparing file web/cpanel/addon_cwaf.cgi
| LOG : Preparing file web/cpanel/cwaf_catalog.cgi
| LOG : Preparing file web/cpanel/cwaf_cwatch.cgi
| LOG : Preparing file web/cpanel/cwaf_main.cgi
| LOG : Preparing file etc/addon_cwaf.conf
| LOG : Preparing file etc/cwaf.conf
| LOG : Preparing file scripts/cwaf-cli.pl
| LOG : Preparing file scripts/cwaf-wrapper.pl
| LOG : Preparing file scripts/uninstall_cwaf.sh
| LOG : Preparing file web/plesk/plugin/plib/modules/cwaf/meta.xml
| LOG : mode of web/cpanel/addon_cwaf.cgi' retained as 0775 (rwxrwxr-x) | LOG : mode of web/cpanel/cwaf_catalog.cgi’ retained as 0775 (rwxrwxr-x)
| LOG : mode of web/cpanel/cwaf_cwatch.cgi' retained as 0775 (rwxrwxr-x) | LOG : mode of web/cpanel/cwaf_main.cgi’ retained as 0775 (rwxrwxr-x)
| LOG : mode of scripts/cwaf-cli.pl' retained as 0775 (rwxrwxr-x) | LOG : mode of scripts/cwaf-wrapper.pl’ retained as 0775 (rwxrwxr-x)
| LOG : mode of scripts/uninstall_cwaf.sh' retained as 0775 (rwxrwxr-x) | LOG : mode of scripts/cwaf-wrapper.pl’ changed to 0100 (–x------)
| LOG : /var/cpanel/cwaf/etc/main.conf' -> /var/cpanel/cwaf/etc/main.conf-bak’
| LOG : /var/cpanel/cwaf/etc/httpd/custom_user.conf' -> /var/cpanel/cwaf/etc/httpd/custom_user.conf-bak’
| LOG : cp: cannot stat /var/cpanel/cwaf/etc/standalone-gui.conf': No such file or directory | LOG : Copying files to /var/cpanel/cwaf | LOG : /var/cpanel/cwaf/etc/main.conf-bak’ → /var/cpanel/cwaf/etc/main.conf' | LOG : /var/cpanel/cwaf/etc/httpd/custom_user.conf-bak’ → /var/cpanel/cwaf/etc/httpd/custom_user.conf' | LOG : cp: cannot stat /var/cpanel/cwaf/etc/standalone-gui.conf-bak’: No such file or directory
| LOG : removed /etc/cwaf' | LOG : /etc/cwaf’ → /var/cpanel/cwaf/etc' | LOG : etc/addon_cwaf.conf’ → `/var/cpanel/apps/addon_cwaf.conf’
| LOG : addon_cwaf registered
| /tmp/cwaf_install.log.17433
| /var/cpanel/cwaf/INFO.TXT
/var/cpanel/cwaf/tmp/install/cwaf_client_install.sh: line 415: cd: HOME not set
[2016-10-21 14:42:45 -0500] info [addon_cwaf] Missing owner for domain xxx.net, force lookup to root
Undefined subroutine &main::is_virtualmin called at /usr/local/cpanel/whostmgr/cgi/cwaf_sharedlib.pl line 138.
[2016-10-21 14:42:46 -0500] warn [cpsrvd] The subprocess (/usr/local/cpanel/whostmgr/docroot/cgi/addon_cwaf.cgi) exited with an error: The subprocess reported error number 2 when it ended. at /usr/local/cpanel/Cpanel/Server/Handlers/SubProcess.pm line 156.
[2016-10-21 14:44:48 -0500] info [addon_cwaf] Missing owner for domain xxx.net, force lookup to root
Undefined subroutine &main::is_virtualmin called at /usr/local/cpanel/whostmgr/cgi/cwaf_sharedlib.pl line 138.
[2016-10-21 14:44:49 -0500] warn [cpsrvd] The subprocess (/usr/local/cpanel/whostmgr/docroot/cgi/addon_cwaf.cgi) exited with an error: The subprocess reported error number 2 when it ended. at /usr/local/cpanel/Cpanel/Server/Handlers/SubProcess.pm line 156.
[2016-10-21 14:44:57 -0500] info [addon_cwaf] Missing owner for domain xxx.net, force lookup to root
Undefined subroutine &main::is_virtualmin called at /usr/local/cpanel/whostmgr/cgi/cwaf_sharedlib.pl line 138.
[2016-10-21 14:44:57 -0500] warn [cpsrvd] The subprocess (/usr/local/cpanel/whostmgr/docroot/cgi/addon_cwaf.cgi) exited with an error: The subprocess reported error number 2 when it ended. at /usr/local/cpanel/Cpanel/Server/Handlers/SubProcess.pm line 156.
[2016-10-21 14:45:23 -0500] info [addon_cwaf] Missing owner for domain xxx.net, force lookup to root
Undefined subroutine &main::is_virtualmin called at /usr/local/cpanel/whostmgr/cgi/cwaf_sharedlib.pl line 138.
[2016-10-21 14:45:25 -0500] warn [cpsrvd] The subprocess (/usr/local/cpanel/whostmgr/docroot/cgi/addon_cwaf.cgi) exited with an error: The subprocess reported error number 2 when it ended. at /usr/local/cpanel/Cpanel/Server/Handlers/SubProcess.pm line 156.

screenshot under lastest cpanel: 404 File Not Found - Jumpshare

Hello
/usr/local/cpanel/3rdparty/perl/522/lib64/perl5/cpanel_lib/Comodo/CWAF/Main.pm seems to be not updated.
Anyone who met this issue could send me e-mail by PM (private message) and get module. Path to module could be different of pointed above. So it needs to be found by:

locate Main.pm

Thanks, just replied to you. Getting this now.

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.
cpsrvd/11.58.0.32 Server at xxx.xxx.net (edited out server name)

Also getting this error when running from the CL

[/var/cpanel/cwaf/scripts]# ./update-client.pl
can’t read config %CWAF_PATH%/etc/main.conf: No such file or directory at /usr/local/cpanel/3rdparty/perl/522/lib64/perl5/cpanel_lib/Comodo/CWAF/Main.pm line 28.
Compilation failed in require at ./update-client.pl line 13.
BEGIN failed–compilation aborted at ./update-client.pl line 13.

Please, send me also log-files. Thanks.

BEGIN failed–compilation aborted at /usr/local/cpanel/whostmgr/docroot/cgi/addon_cwaf.cgi line 17.
[2016-10-21 16:15:11 -0500] info [cpsrvd] Internal Server Error: “GET /cpsess9923720002/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.

It’s a problem with Perl modules. We need some time to resolve it.

Thanks, just keep us tuned. It looks like mod_security/CWAF are still working, its just the plugin having issues?

Yes, ModSecurity works and all settings are unchanged.

The file in your latest update did the trick! :slight_smile:

Hi

I just upgraded WHM to Comodo WAF 2.18.1 Now the only thing I see in the main content area on the page is
Web Application Firewall | Free ModSecurity Rules from Comodo

The application is no longer visible - white screen. I understand the WAF is still working and this affects only the control panel plugin

please advise how to repair or revert - thank you

Please, show me this command result:

# locate Main.pm

and send me your e-mail in PM. Thanks.

Hi,

Same error, here is /usr/local/cpanel/logs/error_log

Undefined subroutine &main::is_virtualmin called at /usr/local/cpanel/whostmgr/cgi/cwaf_sharedlib.pl line 138.
[2016-10-25 10:17:00 +0200] warn [cpsrvd] The subprocess (/usr/local/cpanel/whostmgr/docroot/cgi/addon_cwaf.cgi) exited with an error: The subprocess reported error number 2 when it ended. at /usr/local/cpanel/Cpanel/Server/Handlers/SubProcess.pm line 156.
        Cpanel::Server::Handlers::SubProcess::_report_subprocess_errors(Cpanel::Server::Handlers::SubProcess=HASH(0x3f2b7f0)) called at /usr/local/cpanel/Cpanel/Server/Handlers/SubProcess.pm line 71
        Cpanel::Server::Handlers::SubProcess::handler(Cpanel::Server::Handlers::SubProcess=HASH(0x3f2b7f0), __CPANEL_HIDDEN__, __CPANEL_HIDDEN__, __CPANEL_HIDDEN__, IO::Handle=GLOB(0x3f26840), __CPANEL_HIDDEN__, GLOB(0x3f267f8)) called at cpsrvd.pl line 6206
        cpanel::cpsrvd::cgiHandler(__CPANEL_HIDDEN__, __CPANEL_HIDDEN__, __CPANEL_HIDDEN__, __CPANEL_HIDDEN__) called at cpsrvd.pl line 5699
        cpanel::cpsrvd::dodoc_whostmgrd() called at cpsrvd.pl line 1552
        cpanel::cpsrvd::dodoc(HASH(0xea5a58)) called at cpsrvd.pl line 1262
        cpanel::cpsrvd::handle_one_connection() called at cpsrvd.pl line 807
        cpanel::cpsrvd::script() called at cpsrvd.pl line 314

As I remember main info is above this string

Undefined subroutine &main::is_virtualmin called at /usr/local/cpanel/whostmgr/cgi/cwaf_sharedlib.pl line 138.

Here is:

[2016-10-25 10:14:47 +0200] info [tailwatchd] Updated chkservd ftpd driver from /usr/local/cpanel/src/chkservd/chkserv.d.
[2016-10-25 10:17:00 +0200] info [addon_cwaf] Missing IP for domain [hostname], using xxx.xxx.xxx.xxx
[2016-10-25 10:17:00 +0200] info [addon_cwaf] Missing ServerName for domain [hostname], using [hostname]
[2016-10-25 10:17:00 +0200] info [addon_cwaf] Missing port for domain [hostname], using 80
[2016-10-25 10:17:00 +0200] info [addon_cwaf] Missing user for domain [hostname], using nobody
[2016-10-25 10:17:00 +0200] info [addon_cwaf] Missing owner for domain [hostname], force lookup to root
[2016-10-25 10:17:00 +0200] info [addon_cwaf] Missing group for domain [hostname], using nobody
Undefined subroutine &main::is_virtualmin called at /usr/local/cpanel/whostmgr/cgi/cwaf_sharedlib.pl line 138.
[2016-10-25 10:17:00 +0200] warn [cpsrvd] The subprocess (/usr/local/cpanel/whostmgr/docroot/cgi/addon_cwaf.cgi) exited with an error: The subprocess reported error number 2 when it ended. at /usr/local/cpanel/Cpanel/Server/Handlers/SubProcess.pm line 156.
        Cpanel::Server::Handlers::SubProcess::_report_subprocess_errors(Cpanel::Server::Handlers::SubProcess=HASH(0x3f2b7f0)) called at /usr/local/cpanel/Cpanel/Server/Handlers/SubProcess.pm line 71
        Cpanel::Server::Handlers::SubProcess::handler(Cpanel::Server::Handlers::SubProcess=HASH(0x3f2b7f0), __CPANEL_HIDDEN__, __CPANEL_HIDDEN__, __CPANEL_HIDDEN__, IO::Handle=GLOB(0x3f26840), __CPANEL_HIDDEN__, GLOB(0x3f267f8)) called at cpsrvd.pl line 6206
        cpanel::cpsrvd::cgiHandler(__CPANEL_HIDDEN__, __CPANEL_HIDDEN__, __CPANEL_HIDDEN__, __CPANEL_HIDDEN__) called at cpsrvd.pl line 5699
        cpanel::cpsrvd::dodoc_whostmgrd() called at cpsrvd.pl line 1552
        cpanel::cpsrvd::dodoc(HASH(0xea5a58)) called at cpsrvd.pl line 1262
        cpanel::cpsrvd::handle_one_connection() called at cpsrvd.pl line 807
        cpanel::cpsrvd::script() called at cpsrvd.pl line 314

Perl modules are located in two directories:

/usr/local/cpanel/3rdparty/perl/522/lib64/perl5/ and /opt/cpanel/perl5/522/site_lib
So, please, do the next thing:


# mv /usr/local/cpanel/3rdparty/perl/522/lib64/perl5/cpanel_lib/Comodo /usr/local/cpanel/3rdparty/perl/522/lib64/perl5/cpanel_lib/Comodo.sav
# ln -s /opt/cpanel/perl5/522/site_lib/Comodo /usr/local/cpanel/3rdparty/perl/522/lib64/perl5/cpanel_lib/Comodo

Final paths might be slightly different. Everyone who met this issue needs to find Comodo directories, save it and create symlink for it.

Hi just updated from 2.17 to 2.18.1 plugin and now all says is Web Application Firewall | Free ModSecurity Rules from Comodo nothing more, any idea how i can fix this please.

please, send us extract from /usr/local/cpanel/logs/error_log about CWAF and it’s modules. thanks.

It’s ok going to remove it from all our servers sick of problems with it. Can you tell me is this the right command to remove it bash /var/cpanel/cwaf/scripts/uninstall_cwaf.sh

Yes, it’s a right command.