• Please be aware: Kaspersky Anti-Virus has been deprecated
    With the upgrade to Plesk Obsidian 18.0.64, "Kaspersky Anti-Virus for Servers" will be automatically removed from the servers it is installed on. We recommend that you migrate to Sophos Anti-Virus for Servers.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

Resolved Modsecurity can't start Apache2

Alaa Mansour

Basic Pleskian
Hello,
I have chose Atomic corp basic rules, but accidentally I have run the following command on linux:
aum -u
  • plesk sbin modsecurity_ctl --disable
  • plesk sbin modsecurity_ctl --enable
  • service httpd restart
and now apache2 service can't run, and give me the following error:

Code:
Error: modsecurity_ctl failed: START httpd_modules_ctl --disable security2
/opt/psa/admin/sbin/pleskrc execution failed:
Job for apache2.service failed because the control process exited with error code. See "systemctl status apache2.service" and "journalctl -xe" for details.
websrvmng: /opt/psa/admin/sbin/apache_control_adapter execution failed:
INFO: [Fri Sep 20 12:03:09 CEST 2019]: Service: apache2, Action: start
Trying to start service apache2... failed
Sep 20 12:03:10 plesk.mns.ps apache2[25100]: Output of config test was:
Sep 20 12:03:10 plesk.mns.ps apache2[25100]: [Fri Sep 20 12:03:09.969686 2019] [so:warn] [pid 25109] AH01574: module unique_id_module is already loaded, skipping
Sep 20 12:03:10 plesk.mns.ps apache2[25100]: AH00526: Syntax error on line 24 of /etc/apache2/modsecurity.d/rules/tortix/modsec/tortix_waf.conf:
Sep 20 12:03:10 plesk.mns.ps apache2[25100]: ModSecurity: failed to load IPs from: /etc/asl/whitelist Could not open ipmatch file "/etc/asl/whitelist": No such file or directory
Sep 20 12:03:10 plesk.mns.ps apache2[25100]: Action 'configtest' failed.
Sep 20 12:03:10 plesk.mns.ps apache2[25100]: The Apache error log may have more information.
Sep 20 12:03:10 plesk.mns.ps systemd[1]: apache2.service: Control process exited, code=exited status=1
Sep 20 12:03:10 plesk.mns.ps systemd[1]: Failed to start LSB: Apache2 web server.
Sep 20 12:03:10 plesk.mns.ps systemd[1]: apache2.service: Unit entered failed state.
Sep 20 12:03:10 plesk.mns.ps systemd[1]: apache2.service: Failed with result 'exit-code'.

WARNING!
Some problems are found during start service apache2(see log file: /var/log/plesk/rc_actions.log)

Continue...

/opt/psa/admin/sbin/pleskrc execution failed:
Job for apache2.service failed because the control process exited with error code. See "systemctl status apache2.service" and "journalctl -xe" for details.
websrvmng: /opt/psa/admin/sbin/apache_control_adapter execution failed:
INFO: [Fri Sep 20 12:03:09 CEST 2019]: Service: apache2, Action: start
Trying to start service apache2... failed
Sep 20 12:03:10 plesk.mns.ps apache2[25100]: Output of config test was:
Sep 20 12:03:10 plesk.mns.ps apache2[25100]: [Fri Sep 20 12:03:09.969686 2019] [so:warn] [pid 25109] AH01574: module unique_id_module is already loaded, skipping
Sep 20 12:03:10 plesk.mns.ps apache2[25100]: AH00526: Syntax error on line 24 of /etc/apache2/modsecurity.d/rules/tortix/modsec/tortix_waf.conf:
Sep 20 12:03:10 plesk.mns.ps apache2[25100]: ModSecurity: failed to load IPs from: /etc/asl/whitelist Could not open ipmatch file "/etc/asl/whitelist": No such file or directory
Sep 20 12:03:10 plesk.mns.ps apache2[25100]: Action 'configtest' failed.
Sep 20 12:03:10 plesk.mns.ps apache2[25100]: The Apache error log may have more information.
Sep 20 12:03:10 plesk.mns.ps systemd[1]: apache2.service: Control process exited, code=exited status=1
Sep 20 12:03:10 plesk.mns.ps systemd[1]: Failed to start LSB: Apache2 web server.
Sep 20 12:03:10 plesk.mns.ps systemd[1]: apache2.service: Unit entered failed state.
Sep 20 12:03:10 plesk.mns.ps systemd[1]: apache2.service: Failed with result 'exit-code'.

WARNING!
Some problems are found during start service apache2(see log file: /var/log/plesk/rc_actions.log)

Continue...

/opt/psa/admin/sbin/pleskrc execution failed:
Job for apache2.service failed because the control process exited with error code. See "systemctl status apache2.service" and "journalctl -xe" for details.

systemctl status apache2.service:

Code:
● apache2.service - LSB: Apache2 web server
   Loaded: loaded (/etc/init.d/apache2; bad; vendor preset: enabled)
  Drop-In: /lib/systemd/system/apache2.service.d
           └─apache2-systemd.conf
   Active: failed (Result: exit-code) since Fri 2019-09-20 12:01:21 CEST; 40s ago
     Docs: man:systemd-sysv-generator(8)
  Process: 23255 ExecStop=/etc/init.d/apache2 stop (code=exited, status=0/SUCCESS)
  Process: 23515 ExecStart=/etc/init.d/apache2 start (code=exited, status=1/FAILURE)

Sep 20 12:01:21 plesk.mns.ps apache2[23515]: [Fri Sep 20 12:01:21.490035 2019] [so:warn] [pid 23525] AH01574: module security2_module is already loaded, skipping
Sep 20 12:01:21 plesk.mns.ps apache2[23515]: [Fri Sep 20 12:01:21.490104 2019] [so:warn] [pid 23525] AH01574: module unique_id_module is already loaded, skipping
Sep 20 12:01:21 plesk.mns.ps apache2[23515]: AH00526: Syntax error on line 24 of /etc/apache2/modsecurity.d/rules/tortix/modsec/tortix_waf.conf:
Sep 20 12:01:21 plesk.mns.ps apache2[23515]: ModSecurity: failed to load IPs from: /etc/asl/whitelist Could not open ipmatch file "/etc/asl/whitelist": No such file
Sep 20 12:01:21 plesk.mns.ps apache2[23515]: Action 'configtest' failed.
Sep 20 12:01:21 plesk.mns.ps apache2[23515]: The Apache error log may have more information.
Sep 20 12:01:21 plesk.mns.ps systemd[1]: apache2.service: Control process exited, code=exited status=1
Sep 20 12:01:21 plesk.mns.ps systemd[1]: Failed to start LSB: Apache2 web server.
Sep 20 12:01:21 plesk.mns.ps systemd[1]: apache2.service: Unit entered failed state.
Sep 20 12:01:21 plesk.mns.ps systemd[1]: apache2.service: Failed with result 'exit-code'.
~

when I try to start the service I have this error also:
Code:
Unable to start service: Unable to manage service by apache_control_adapter: ('start', 'web'). Error: INFO: [Fri Sep 20 12:11:26 CEST 2019]: Service: apache2, Action: start Trying to start service apache2... failed Sep 20 12:11:26 plesk.mns.ps apache2[3896]: Output of config test was: Sep 20 12:11:26 plesk.mns.ps apache2[3896]: [Fri Sep 20 12:11:26.751446 2019] [so:warn] [pid 3905] AH01574: module unique_id_module is already loaded, skipping Sep 20 12:11:26 plesk.mns.ps apache2[3896]: AH00526: Syntax error on line 24 of /etc/apache2/modsecurity.d/rules/tortix/modsec/tortix_waf.conf: Sep 20 12:11:26 plesk.mns.ps apache2[3896]: ModSecurity: failed to load IPs from: /etc/asl/whitelist Could not open ipmatch file "/etc/asl/whitelist": No such file or directory Sep 20 12:11:26 plesk.mns.ps apache2[3896]: Action 'configtest' failed. Sep 20 12:11:26 plesk.mns.ps apache2[3896]: The Apache error log may have more information. Sep 20 12:11:26 plesk.mns.ps systemd[1]: apache2.service: Control process exited, code=exited status=1 Sep 20 12:11:26 plesk.mns.ps systemd[1]: Failed to start LSB: Apache2 web server. Sep 20 12:11:26 plesk.mns.ps systemd[1]: apache2.service: Unit entered failed state. Sep 20 12:11:26 plesk.mns.ps systemd[1]: apache2.service: Failed with result 'exit-code'. WARNING! Some problems are found during start service apache2(see log file: /var/log/plesk/rc_actions.log) Continue... /opt/psa/admin/sbin/pleskrc execution failed: Job for apache2.service failed because the control process exited with error code. See "systemctl status apache2.service" and "journalctl -xe" for details.
 
Last edited:
Hi,

i had the same this morning after packet issues with mod_security.

my solution:

create empty file: /etc/asl/whitelist with your fav editor, save it, restart apache

This fixed my issue.

regards
Schneidi
 
@Alaa Mansour and @Schneidi

This issue is very likely to be related with a more general ModSec issue that Plesk had a couple of days ago - it was related to update dependencies of aum package.

In essence, it would be recommended to uninstall ModSecurity and reinstall it via the command line installer, in specific the command : plesk sbin autoinstaller.

The whole idea behind this recommendation is that you will get a clean installation of ModSec packages AND the required micro-updates (and in particular micro-update #68 that is intended to patch the whole issue).

Please note that simply removing or editing a file would not be a good idea, since that would imply that the remainder of the old files and config related to ModSec and/or the older version of aum package could still exist on your system - this is very likely to cause problems in the near future.

Hope the above helps a bit.

Kind regards............
 
Hi Trialotto,

i tried this 1^st and got an error message depenting on the issue with the mod_security package, so this module was already re-installed. ;)

regards
DocSchneidi
 
Back
Top