AEM Dispatcher fails to restart due to missing ModSecurity debug log file
This article explains how to resolve an issue where Adobe Experience Manager (AEM) Dispatcher fails to start or restart because the ModSecurity debug log file is missing from the expected location.
Description description
Environment
Adobe Experience Manager (AEM) Dispatcher (all versions)
Symptoms
- Dispatcher service fails to start or restart.
- Error messages or logs reference a missing file path:
/var/log/httpd/modsec_debug.log - Manual inspection confirms that
modsec_debug.logdoesn’t exist in/var/log/httpd/.
Cause
The dispatcher can’t start because the ModSecurity debug log file (modsec_debug.log) is missing from the configured log directory, which prevents the logging subsystem from initializing properly.
Resolution resolution
Follow the steps below to resolve the issue:
-
Verify that the directory
/var/log/httpd/exists and is writable by the user running the dispatcher process. You may need root or sudo privileges for these steps. -
Determine the user and group running the dispatcher process. This is typically the user configured to run the web server (such as apache or www-data). You can check this by running:
code language-none ps aux | grep httpdor
code language-none ps aux | grep apache -
Create the missing log file by running:
code language-none sudo touch /var/log/httpd/modsec_debug.log -
Set the correct ownership and permissions for the log file, replacing
<user>and<group>with the actual user and group identified in step 2:code language-none sudo chown <user>:<group> /var/log/httpd/modsec_debug.log sudo chmod 640 /var/log/httpd/modsec_debug.log -
Restart the dispatcher service using your standard service management command. For example:
code language-none sudo systemctl restart httpd -
Verify that the dispatcher starts successfully and that there are no errors related to
modsec_debug.login the logs.