アナリティクスのトラッキングを無効化した場合に「SessionEndPipeline failed 」エラーがログに出力される


概要

Sitecore.Analytics.Tracking.configファイルを無効化した場合、下記のエラーがSitecore XPのログに出力される場合があります。

ERROR SessionEndPipeline failed.
Exception: System.NullReferenceException
Message: Object reference not set to an instance of an object.
Source: Sitecore.Analytics.Automation
   at Sitecore.Analytics.Pipelines.VisitEnd.RunAutomation.RunAutomationX(Database database)
   at (Object , Object[] )
   at Sitecore.Pipelines.CorePipeline.Run(PipelineArgs args)
   at (Object , Object[] )
   at Sitecore.Pipelines.CorePipeline.Run(PipelineArgs args)
   at Sitecore.Web.Application.RaiseSessionEndEvent(HttpApplication context)

このエラーは、Webサイト閲覧時のSessionEndイベントの処理が終了される際に、システムがRunAutomationXメソッドを自動的に実行しようとした際に発生します。しかし、このロジックは、アナリティクスのトラッキングを無効にしているサーバー(例:ロールを分けた場合のContent Management、Processing、Reportingの各サーバー)では本来実行されるべきではないものです。

解決策

Sitecore.Support.97004.config ファイルをアナリティクスのトラッキングを無効にしているサーバーの「/App_Config/Include」フォルダーに配置してください。