「Master」データベースがない場合にEmailReportsTask が失敗する


説明

「Master」データベースで構成されていない場合に、Sitecore Analyticsが有効になっているSitecore インスタンスのSitecore ログ ファイルで、次のエラーが記録される場合があります。

以下のエラーは、Sitecoreが「Sitecore.Analytics.Tasks.EmailReportsTask」スケジュール タスクを実行する際に発生し、通常の構成ではCD環境で発生します。
ERROR Exception
Exception: System.Reflection.TargetInvocationException
Message: Exception has been thrown by the target of an invocation.
Source: mscorlib
   at System.RuntimeMethodHandle._InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeType typeOwner)
   at System.RuntimeMethodHandle.InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeType typeOwner)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters)
   at (Object , Object[] )
   at Sitecore.Pipelines.CorePipeline.Run(PipelineArgs args)
   at Sitecore.Jobs.Job.ThreadEntry(Object state)
Nested Exception
Exception: System.InvalidOperationException
Message: Could not find configuration node: databases/database[@id='master']
Source: Sitecore.Kernel
   at Sitecore.Diagnostics.Assert.IsTrue(Boolean condition, String message)
   at Sitecore.Configuration.Factory.GetConfigNode(String xpath, Boolean assert)
   at Sitecore.Configuration.Factory.CreateObject(String configPath, String[] parameters, Boolean assert)
   at Sitecore.Configuration.Factory.GetDatabase(String name)
   at Sitecore.Analytics.Tasks.EmailReportsTask.GetLastRun()
   at Sitecore.Analytics.Tasks.EmailReportsTask.IsDue()
   at Sitecore.Analytics.Tasks.EmailReportsTask.Run()

解決策

Scaling Guide」ドキュメントの「Configuring Scheduling」節の手順を適用して、タスクを無効にするか、別のデータベースを使用するように構成してください。