AEM - Web Tier pipeline execution failing during TestCacheInvalidation
In Adobe Experience Manager as a Cloud Service, if the Web Tier pipeline execution fails with an error during TestCacheInvalidation
, it’s important to check if the dispatcher configuration includes a vhost for dispatcher cache invalidation. You can follow the steps provided in this article to resolve the issue.
Description description
Environment
Adobe Experience Manager as a Cloud Service
Issue/Symptoms
The Web Tier pipeline execution fails with an error in log file:
=== RUN TestCacheInvalidation
main_test.go:237: Test fails. Expected header 'X-Vhost' to be existing and not: 'catch-all', got: 'catch-all'
--- FAIL: TestCacheInvalidation (0.00s)
FAIL
exit status 1
Resolution resolution
Steps to Resolve
- Confirm that your dispatcher configuration includes a vhost for dispatcher cache invalidation (call being done to host 127.0.0.1), e.g., as in https://github.com/adobe/aem-project-archetype/blob/master/src/main/archetype/dispatcher.cloud/src/conf.d/available_vhosts/default.vhost#L24
- If you have an X-Vhost header, make sure that it is not empty and that the request does not reach catch-all vhost with the X-Vhost header set to “catch-all”, as in https://github.com/adobe/aem-project-archetype/blob/master/src/main/archetype/dispatcher.cloud/src/conf.d/dispatcher_vhost.conf#L136
Note:
At least one enabled vhost must declare a ServerAlias value that includes either * OR 127.0.0.1 localhost. Including just 127.0.0.1 or just localhost in the ServerAlias is not guaranteed to handle cache invalidation requests in all versions of the dispatcher validator.
recommendation-more-help
3d58f420-19b5-47a0-a122-5c9dab55ec7f