AEM - TestCacheInvalidation期间Web层管道执行失败
在Adobe Experience Manager as a Cloud Service中,如果Web层管道执行在TestCacheInvalidation期间失败并出现错误,则务必检查Dispatcher配置是否包含 vhost,以使Dispatcher缓存失效。 您可以按照本文中提供的步骤来解决问题。
描述 description
环境
Adobe Experience Manager as a Cloud Service
问题/症状
Web层管道执行失败,并在日志文件中出现错误:
=== 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
解决步骤
- 确认您的Dispatcher配置包含用于使Dispatcher缓存失效的vhost(正在对主机127.0.0.1执行调用),例如https://github.com/adobe/aem-project-archetype/blob/master/src/main/archetype/dispatcher.cloud/src/conf.d/available_vhosts/default.vhost#L24中的
- 如果您有X-Vhost标头,请确保该标头不为空,并且请求不会到达将X-Vhost标头设置为“catch-all”的catch-all vhost,如https://github.com/adobe/aem-project-archetype/blob/master/src/main/archetype/dispatcher.cloud/src/conf.d/dispatcher_vhost.conf#L136所示
注意:
至少有一个启用的 vhost 必须声明包含*或127.0.0.1 localhost的 ServerAlias 值。 不能保证在 ServerAlias 中仅包含127.0.0.1或仅包含localhost来处理所有版本的Dispatcher验证器中的缓存失效请求。
recommendation-more-help
3d58f420-19b5-47a0-a122-5c9dab55ec7f