- Published on
AEM Dispatcher Series 7 - Dispatcher Troubleshooting
- Authors

- Name
- Khalil
- @Im_Khalil
This guide walks through a practical debugging approach for developers. We’ll explore how to read logs, recognize common problems, and fix them step by step — from cache invalidation to filter rule misfires.
1. Setting Up Dispatcher Logging
Before you can debug, make sure Dispatcher is actually logging enough information.
Set the log level in your Apache configuration:
DispatcherLogLevel 3
Log level meanings:
0– Emergencies only1– Critical errors2– Warnings3– Debug (recommended for development and troubleshooting)
Typical log file location:/var/log/apache2/dispatcher.log
Restart Apache after updating the configuration to apply changes and start collecting Dispatcher activity.
2. Reading dispatcher.log
Dispatcher logs are your first and most valuable debugging tool. Typical entries look like this:
Filtering URI '/bin/my-servlet' - denied
Cache MISS: /content/mysite/en/home.html
Cache HIT: /content/mysite/en/home.html
Invalidating: /content/mysite/en/about.html
Pay attention to these patterns:
Filtering or security issues —
If you seeFiltering URI ... - denied, the request is blocked by/filterrules.Caching behavior —
Cache HITmeans the page was served from cache.Cache MISSmeans the page was fetched from Publish and may now be cached.Invalidation events —
Invalidating:confirms that the flush agent triggered and Dispatcher marked related cached content as outdated.
3. Common Problems and Solutions
Problem 1: “My content isn’t updating after activation”
Possible causes:
The
.statfile isn’t updated (flush agent misconfiguration).Cache directory permissions block updates.
Incorrect
/statfileslevelsetting.
Debugging steps:
Check the
.statfile timestamp:ls -l /opt/dispatcher/cache/content/mysite/en/.statConfirm the flush agent IP is listed under
/allowedClients.Verify
/statfileslevelmatches your folder depth.
Problem 2: “I’m getting a 403 Forbidden”
Possible causes:
- The
/filtersection denies the requested path. - Missing allow rules for
/binor custom servlets.
Debugging steps:
- Review the
/filterconfiguration indispatcher.any. - Add explicit allow rules if needed:
/filter {
/0005 { /type "allow" /url "/bin/my-servlet" }
/0006 { /type "allow" /url "*.model.json" }
}
- Check
dispatcher.logfor denied URIs to confirm which path is blocked.
Problem 3: “I’m getting a 404 Not Found”
Possible causes:
- The resource doesn’t exist on the Publish instance.
- Dispatcher
/filteris blocking it. - Apache rewrite rules (vanity URLs) are incorrect.
Debugging steps:
Confirm the page exists on Publish:
curl -I http://publish1.mysite.com/content/mysite/en/page.htmlReview
/filterrules indispatcher.any.Check Apache rewrite configuration for vanity mappings.
Problem 4: “My component is cached when it shouldn’t be”
Possible causes:
/cache/rulesare too permissive.- Query parameters or personalization not handled correctly.
Debugging steps:
- Review the
/cache/rulessection:
/rules {
/0000 { /glob "*.html" /type "allow" }
/0001 { /glob "*.user.json" /type "deny" }
}
- Inspect
/ignoreUrlParams— query parameters might affect caching keys. - Test by manually clearing cache or updating
.statfiles.
4. Developer Debug Checklist
| Step | What to Check |
| ---- | ------------------------------------------------------------ |
| 1 | `dispatcher.log` for errors, denied URLs, and cache behavior |
| 2 | Cache directory permissions and `.stat` timestamps |
| 3 | `/filter` rules for blocked paths |
| 4 | `/cache` rules for stale or wrongly cached content |
| 5 | Flush agent configuration and `/allowedClients` IPs |
| 6 | `/renders` connectivity with Publish instances |
| 7 | Apache rewrite rules for vanity URLs |
| 8 | Session management for logged-in areas |
5. Quick Debug Commands
Check if a cached file exists:
ls -l /opt/dispatcher/cache/content/mysite/en/home.htmlCheck
.stattimestamp:ls -l /opt/dispatcher/cache/content/mysite/en/.statForce manual invalidation (testing only):
touch /opt/dispatcher/cache/content/mysite/en/.statTest path filtering:
curl -I http://dispatcher.mysite.com/bin/my-servletCheck cache HIT/MISS using headers or logs:
curl -I http://dispatcher.mysite.com/content/mysite/en/home.htmlLook for
X-Cache-Statusor similar headers if configured.
6. Developer Best Practices
Always test changes in lower environments before production.
Use debug logging temporarily — prolonged use can impact performance.
Check file permissions on cache and
.statdirectories.Document any custom
/filteror/cacherules to keep DevOps aligned.Collaborate with DevOps or AMS — Dispatcher issues often overlap with infrastructure settings.
You might also like to read
- 1.AEM Dispatcher Series 1 - A Developer’s Guide to What It Is and Why You Should Care
- 2.AEM Dispatcher Series 2 - Understanding the `dispatcher.any` File
- 3.AEM Dispatcher Series 3 - Securing Your AEM Site - Deep Dive into Dispatcher `/filter` Rules
- 4.AEM Dispatcher Series 4 - A Developer’s Guide to Dispatcher `/cache` Rules
- 5.AEM Dispatcher Series 5 - When and How to Clear Cache