0

I want to disable all Cortex services in my 10.2 XP1 environment.

I am getting the following in the log Connection string 'cortex.processing.engine' is not found. Because there is no Cortex Processing engine, and thus no connection string, but I don't know how to configure my instance so that it does not look for that connection string and any others relating to Cortex.

Here's the full error:

11788 13:42:56 ERROR Application error.
Exception: System.Web.HttpUnhandledException
Message: An unhandled exception occurred.
Source: Sitecore.Mvc
   at Sitecore.Mvc.Pipelines.MvcEvents.Exception.ShowAspNetErrorMessage.ShowErrorMessage(ExceptionContext exceptionContext, ExceptionArgs args)
   at Sitecore.Mvc.Pipelines.MvcEvents.Exception.ShowAspNetErrorMessage.Process(ExceptionArgs args)
   at (Object , Object )
   at Sitecore.Pipelines.CorePipeline.Run(PipelineArgs args)
   at Sitecore.Pipelines.DefaultCorePipelineManager.Run(String pipelineName, PipelineArgs args, String pipelineDomain, Boolean failIfNotExists)
   at Sitecore.Pipelines.DefaultCorePipelineManager.Run(String pipelineName, PipelineArgs args, String pipelineDomain)
   at Sitecore.Mvc.Pipelines.PipelineService.RunPipeline[TArgs](String pipelineName, TArgs args)
   at Sitecore.Mvc.Filters.PipelineBasedRequestFilter.OnException(ExceptionContext exceptionContext)
   at System.Web.Mvc.ControllerActionInvoker.InvokeExceptionFilters(ControllerContext controllerContext, IList`1 filters, Exception exception)
   at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass3_1.<BeginInvokeAction>b__1(IAsyncResult asyncResult)
   at System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeAction(IAsyncResult asyncResult)
   at System.Web.Mvc.Controller.<>c.<BeginExecuteCore>b__152_1(IAsyncResult asyncResult, ExecuteCoreState innerState)
   at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult)
   at System.Web.Mvc.Controller.EndExecuteCore(IAsyncResult asyncResult)
   at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult)
   at System.Web.Mvc.Controller.EndExecute(IAsyncResult asyncResult)
   at System.Web.Mvc.MvcHandler.<>c.<BeginProcessRequest>b__20_1(IAsyncResult asyncResult, ProcessRequestState innerState)
   at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult)
   at System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult)
   at Sitecore.Mvc.Routing.RouteHttpHandler.EndProcessRequest(IAsyncResult result)
   at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
   at System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step)
   at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

Nested Exception

Exception: System.InvalidOperationException
Message: Error while rendering view: '/sitecore/shell/client/Speak/Layouts/Layouts/Speak-Layout.cshtml' (model: 'Sitecore.Mvc.Presentation.RenderingModel, Sitecore.Mvc').

Source: Sitecore.Mvc
   at Sitecore.Mvc.Presentation.ViewRenderer.Render(TextWriter writer)
   at Sitecore.Mvc.Pipelines.Response.RenderRendering.ExecuteRenderer.Render(Renderer renderer, TextWriter writer, RenderRenderingArgs args)
   at Sitecore.Mvc.Pipelines.Response.RenderRendering.ExecuteRenderer.Process(RenderRenderingArgs args)
   at (Object , Object )
   at Sitecore.Pipelines.CorePipeline.Run(PipelineArgs args)
   at Sitecore.Pipelines.DefaultCorePipelineManager.Run(String pipelineName, PipelineArgs args, String pipelineDomain, Boolean failIfNotExists)
   at Sitecore.Pipelines.DefaultCorePipelineManager.Run(String pipelineName, PipelineArgs args, String pipelineDomain)
   at Sitecore.Mvc.Pipelines.PipelineService.RunPipeline[TArgs](String pipelineName, TArgs args)
   at Sitecore.Mvc.Presentation.RenderingView.Render(ViewContext viewContext, TextWriter writer)
   at System.Web.Mvc.ViewResultBase.ExecuteResult(ControllerContext context)
   at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList`1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult)
   at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList`1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult)
   at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList`1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult)
   at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultWithFilters(ControllerContext controllerContext, IList`1 filters, ActionResult actionResult)
   at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass3_1.<BeginInvokeAction>b__1(IAsyncResult asyncResult)

Nested Exception

Exception: System.InvalidOperationException
Message: Error while rendering view: '/sitecore/shell/client/Sitecore/ExperienceEditor/PageEditbar/PageEditBar.cshtml' (model: 'Sitecore.Mvc.Presentation.RenderingModel, Sitecore.Mvc').

Source: Sitecore.Mvc
   at Sitecore.Mvc.Presentation.ViewRenderer.Render(TextWriter writer)
   at Sitecore.Mvc.Pipelines.Response.RenderRendering.ExecuteRenderer.Render(Renderer renderer, TextWriter writer, RenderRenderingArgs args)
   at Sitecore.Mvc.Pipelines.Response.RenderRendering.ExecuteRenderer.Process(RenderRenderingArgs args)
   at (Object , Object )
   at Sitecore.Pipelines.CorePipeline.Run(PipelineArgs args)
   at Sitecore.Pipelines.DefaultCorePipelineManager.Run(String pipelineName, PipelineArgs args, String pipelineDomain, Boolean failIfNotExists)
   at Sitecore.Pipelines.DefaultCorePipelineManager.Run(String pipelineName, PipelineArgs args, String pipelineDomain)
   at Sitecore.Mvc.Pipelines.PipelineService.RunPipeline[TArgs](String pipelineName, TArgs args)
   at Sitecore.Mvc.Pipelines.Response.RenderPlaceholder.PerformRendering.Render(String placeholderName, TextWriter writer, RenderPlaceholderArgs args)
   at (Object , Object )
   at Sitecore.Pipelines.CorePipeline.Run(PipelineArgs args)
   at Sitecore.Pipelines.DefaultCorePipelineManager.Run(String pipelineName, PipelineArgs args, String pipelineDomain, Boolean failIfNotExists)
   at Sitecore.Pipelines.DefaultCorePipelineManager.Run(String pipelineName, PipelineArgs args, String pipelineDomain)
   at Sitecore.Mvc.Pipelines.PipelineService.RunPipeline[TArgs](String pipelineName, TArgs args)
   at Sitecore.Mvc.Helpers.SitecoreHelper.RenderPlaceholderCore(String placeholderName, TextWriter writer)
   at Sitecore.Mvc.Helpers.SitecoreHelper.Placeholder(String placeholderName)
   at ASP._sitecore_shell_client_Speak_Layouts_Layouts_Speak_Layout_cshtml.Execute()
   at System.Web.WebPages.WebPageBase.ExecutePageHierarchy()
   at System.Web.Mvc.WebViewPage.ExecutePageHierarchy()
   at System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage)
   at System.Web.Mvc.Html.PartialExtensions.Partial(HtmlHelper htmlHelper, String partialViewName, Object model, ViewDataDictionary viewData)
   at Sitecore.Mvc.Presentation.ViewRenderer.Render(TextWriter writer)

Nested Exception

Exception: System.InvalidOperationException
Message: Error while rendering view: '/sitecore/shell/client/Sitecore/Speak/Ribbon/Controls/QuickBar/QuickBar.cshtml' (model: 'Sitecore.Mvc.Presentation.RenderingModel, Sitecore.Mvc').

Source: Sitecore.Mvc
   at Sitecore.Mvc.Presentation.ViewRenderer.Render(TextWriter writer)
   at Sitecore.Mvc.Pipelines.Response.RenderRendering.ExecuteRenderer.Render(Renderer renderer, TextWriter writer, RenderRenderingArgs args)
   at Sitecore.Mvc.Pipelines.Response.RenderRendering.ExecuteRenderer.Process(RenderRenderingArgs args)
   at (Object , Object )
   at Sitecore.Pipelines.CorePipeline.Run(PipelineArgs args)
   at Sitecore.Pipelines.DefaultCorePipelineManager.Run(String pipelineName, PipelineArgs args, String pipelineDomain, Boolean failIfNotExists)
   at Sitecore.Pipelines.DefaultCorePipelineManager.Run(String pipelineName, PipelineArgs args, String pipelineDomain)
   at Sitecore.Mvc.Pipelines.PipelineService.RunPipeline[TArgs](String pipelineName, TArgs args)
   at Sitecore.Mvc.Pipelines.Response.RenderPlaceholder.PerformRendering.Render(String placeholderName, TextWriter writer, RenderPlaceholderArgs args)
   at (Object , Object )
   at Sitecore.Pipelines.CorePipeline.Run(PipelineArgs args)
   at Sitecore.Pipelines.DefaultCorePipelineManager.Run(String pipelineName, PipelineArgs args, String pipelineDomain, Boolean failIfNotExists)
   at Sitecore.Pipelines.DefaultCorePipelineManager.Run(String pipelineName, PipelineArgs args, String pipelineDomain)
   at Sitecore.Mvc.Pipelines.PipelineService.RunPipeline[TArgs](String pipelineName, TArgs args)
   at Sitecore.Mvc.Helpers.SitecoreHelper.RenderPlaceholderCore(String placeholderName, TextWriter writer)
   at Sitecore.Mvc.Helpers.SitecoreHelper.Placeholder(String placeholderName)
   at Sitecore.ExperienceEditor.Speak.PageEditbar.PageEditBar.Render(HtmlTextWriter output)
   at Sitecore.Web.UI.Controls.ComponentBase.Render()
   at Sitecore.ExperienceEditor.Speak.PageEditbar.ControlsExtension.PageEditBar(Controls controls, Rendering rendering, HtmlHelper`1 htmlHelper)
   at ASP._Page_sitecore_shell_client_Sitecore_ExperienceEditor_PageEditbar_PageEditBar_cshtml.Execute() in d:\websites\site.cm\sitecore\shell\client\Sitecore\ExperienceEditor\PageEditbar\PageEditBar.cshtml:line 4
   at System.Web.WebPages.WebPageBase.ExecutePageHierarchy()
   at System.Web.Mvc.WebViewPage.ExecutePageHierarchy()
   at System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage)
   at System.Web.Mvc.Html.PartialExtensions.Partial(HtmlHelper htmlHelper, String partialViewName, Object model, ViewDataDictionary viewData)
   at Sitecore.Mvc.Presentation.ViewRenderer.Render(TextWriter writer)

Nested Exception

Exception: System.InvalidOperationException
Message: Error while rendering view: '/sitecore/shell/client/Sitecore/Speak/Ribbon/Controls/QuickbarButton/QuickbarButton.cshtml' (model: 'Sitecore.Mvc.Presentation.RenderingModel, Sitecore.Mvc').

Source: Sitecore.Mvc
   at Sitecore.Mvc.Presentation.ViewRenderer.Render(TextWriter writer)
   at Sitecore.Mvc.Pipelines.Response.RenderRendering.ExecuteRenderer.Render(Renderer renderer, TextWriter writer, RenderRenderingArgs args)
   at Sitecore.Mvc.Pipelines.Response.RenderRendering.ExecuteRenderer.Process(RenderRenderingArgs args)
   at (Object , Object )
   at Sitecore.Pipelines.CorePipeline.Run(PipelineArgs args)
   at Sitecore.Pipelines.DefaultCorePipelineManager.Run(String pipelineName, PipelineArgs args, String pipelineDomain, Boolean failIfNotExists)
   at Sitecore.Pipelines.DefaultCorePipelineManager.Run(String pipelineName, PipelineArgs args, String pipelineDomain)
   at Sitecore.Mvc.Pipelines.PipelineService.RunPipeline[TArgs](String pipelineName, TArgs args)
   at Sitecore.Mvc.Extensions.EnumerableExtensions.Each[T](IEnumerable`1 source, Action`1 action)
   at Sitecore.Web.UI.Controls.Common.ItemRenderers.ItemRenderer.RenderItem(TextWriter output, Item item)
   at Sitecore.Web.UI.Controls.Common.ItemRenderers.ItemRenderer.Render(HtmlTextWriter output)
   at Sitecore.Web.UI.Controls.ComponentBase.Render()
   at Sitecore.ExperienceEditor.Speak.Ribbon.Controls.QuickBar.QuickBar.DoRender(HtmlTextWriter output)
   at Sitecore.Web.UI.Controls.ComponentBase.Render()
   at Sitecore.ExperienceEditor.Speak.Ribbon.Controls.QuickBar.ControlsExtension.QuickBar(Controls controls, Rendering rendering)
   at ASP._Page_sitecore_shell_client_Sitecore_Speak_Ribbon_Controls_QuickBar_QuickBar_cshtml.Execute() in d:\websites\site.cm\sitecore\shell\client\Sitecore\Speak\Ribbon\Controls\QuickBar\QuickBar.cshtml:line 4
   at System.Web.WebPages.WebPageBase.ExecutePageHierarchy()
   at System.Web.Mvc.WebViewPage.ExecutePageHierarchy()
   at System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage)
   at System.Web.Mvc.Html.PartialExtensions.Partial(HtmlHelper htmlHelper, String partialViewName, Object model, ViewDataDictionary viewData)
   at Sitecore.Mvc.Presentation.ViewRenderer.Render(TextWriter writer)

Nested Exception

Exception: System.TypeInitializationException
Message: The type initializer for 'Sitecore.ExperienceEditor.Speak.Ribbon.Controls.RibbonButtonBase' threw an exception.
Source: Sitecore.ExperienceEditor.Speak.Ribbon
   at Sitecore.ExperienceEditor.Speak.Ribbon.Controls.RibbonButtonBase.GetProcessComponentState()
   at Sitecore.ExperienceEditor.Speak.Ribbon.Controls.RibbonButtonBase.PreRender()
   at Sitecore.ExperienceEditor.Speak.Ribbon.Controls.RibbonIconButtonBase.PreRender()
   at Sitecore.Web.UI.Controls.ComponentBase.Render()
   at Sitecore.ExperienceEditor.Speak.Ribbon.Controls.QuickbarButton.ControlsExtension.QuickbarButton(Controls controls, Rendering rendering)
   at ASP._Page_sitecore_shell_client_Sitecore_Speak_Ribbon_Controls_QuickbarButton_QuickbarButton_cshtml.Execute() in d:\websites\site.cm\sitecore\shell\client\Sitecore\Speak\Ribbon\Controls\QuickbarButton\QuickbarButton.cshtml:line 4
   at System.Web.WebPages.WebPageBase.ExecutePageHierarchy()
   at System.Web.Mvc.WebViewPage.ExecutePageHierarchy()
   at System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage)
   at System.Web.Mvc.Html.PartialExtensions.Partial(HtmlHelper htmlHelper, String partialViewName, Object model, ViewDataDictionary viewData)
   at Sitecore.Mvc.Presentation.ViewRenderer.Render(TextWriter writer)

Nested Exception

Exception: System.TypeInitializationException
Message: The type initializer for 'Sitecore.ExperienceEditor.Speak.Server.RequestRepository' threw an exception.
Source: Sitecore.ExperienceEditor.Speak
   at Sitecore.ExperienceEditor.Speak.Server.RequestRepository..ctor()
   at Sitecore.ExperienceEditor.Speak.Ribbon.Controls.RibbonButtonBase..cctor()

Nested Exception

Exception: System.Reflection.TargetInvocationException
Message: Exception has been thrown by the target of an invocation.
Source: mscorlib
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
   at System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at Sitecore.Reflection.ReflectionUtil.CreateObject(Type type, Object[] parameters)
   at Sitecore.Configuration.DefaultFactory.CreateFromTypeName(XmlNode configNode, String[] parameters, Boolean assert)
   at Sitecore.Configuration.DefaultFactory.CreateObject(XmlNode configNode, String[] parameters, Boolean assert, IFactoryHelper helper)
   at Sitecore.Configuration.DefaultFactory.CreateObject(XmlNode configNode, Boolean assert)
   at Sitecore.Configuration.DefaultFactory.CreateObject[T](XmlNode configNode)
   at Sitecore.ExperienceEditor.Speak.Server.RequestRepository.Get()
   at Sitecore.ExperienceEditor.Speak.Server.RequestRepository..cctor()

Nested Exception

Exception: System.Configuration.ConfigurationErrorsException
Message: Connection string 'cortex.processing.engine' is not found.
Source: Sitecore.Processing.Engine.Client
   at Sitecore.Processing.Engine.Client.WebApiProcessingEngineClient.EnsureConnectionString(String name)
   at Sitecore.Processing.Engine.Client.WebApiProcessingEngineClient.CreateHttpClient()
   at Sitecore.Processing.Engine.Client.WebApiProcessingEngineClient..ctor(ILogger`1 logger)
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitConstructor(ConstructorCallSite constructorCallSite, RuntimeResolverContext context)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSiteMain(ServiceCallSite callSite, TArgument argument)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitRootCache(ServiceCallSite callSite, RuntimeResolverContext context)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSite(ServiceCallSite callSite, TArgument argument)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.Resolve(ServiceCallSite callSite, ServiceProviderEngineScope scope)
   at Microsoft.Extensions.DependencyInjection.ServiceProvider.CreateServiceAccessor(Type serviceType)
   at System.Collections.Concurrent.ConcurrentDictionary`2.GetOrAdd(TKey key, Func`2 valueFactory)
   at Microsoft.Extensions.DependencyInjection.ServiceProvider.GetService(Type serviceType, ServiceProviderEngineScope serviceProviderEngineScope)
   at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService(IServiceProvider provider, Type serviceType)
   at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService[T](IServiceProvider provider)
   at Sitecore.ContentTesting.Requests.ExperienceEditor.ShowSuggestedPersonalizationDialogRequest..ctor()
2
  • 1
    What version of sitecore are you running and what topology? Jun 14, 2022 at 18:09
  • Sitecore 10.2 XP1
    – Michael
    Jun 14, 2022 at 18:41

3 Answers 3

0

Sitecore has only one OOTB feature that uses Cortex and it is Personalization Suggestions in ContentTesting.

If you do not use Content Testing, you can disable it with setting in Sitecore.ContentTesting.config:

<setting name="ContentTesting.AutomaticContentTesting.Enabled" value="false" />

If it does not help, try to disable Sitecore.ContentTesting.* configs.

P.S. Almosl all Cortex references are related to Processing server role, but ContentTesting is linked to many roles: ContentManagement, ContentDelivery, Reporting, Processing. Keep this in mind as you use scaled topology.

1

Not sure but I checked about Cortex and according to Sitecore, the Cortex is machine learning within Sitecore and built on top of the Sitecore experience Database. Cortex will analyze any data within XDB. Cortex analyzes this data and provides insights to you.

The Sitecore Cortex™ Processing Tasks database temporarily stores tasks to be processed by the Sitecore Cortex Processing Engine service.

When I checked in the Sitecore 10.2 Vanilla instance and found that we need to specify these two settings to make it work.

 <add name="cortex.processing.engine" connectionString="https://sitecore10.2xconnect.dev.local" />
 
 <add name="cortex.processing.engine.client.certificate" connectionString="StoreName=My;StoreLocation=LocalMachine;FindType=FindByThumbprint;FindValue=3C31AAA842C89FE22C629525FAE49A8BFE67614F" />

So the reason maybe you don't have these in your Connection String. So if you can verify and use this, then I think the error will go.

The Thumbprint used in the cortex.processing.engine.client.certificate, the key needs to be matched with the validateCertificateThumbprint value given in the yourxconnectinstance\App_Config\AppSettings.config with this.

<add key="validateCertificateThumbprint" value="3C31AAA842C89FE22C629525FAE49A8BFE67614F" />

Hope this helps.

2
  • Sounds like you're saying that it can't be disabled? Not the answer I was hoping for, but I would like to have a definitive answer, if possible.
    – Michael
    Jun 15, 2022 at 11:17
  • This is all interesting and potentially useful but doesn't directly answer my question. My question was, "How do I disable Cortex services?" Your answer would be useful if I wanted to use Cortex, but was getting the reported error.
    – Michael
    Jun 17, 2022 at 16:00
0

We have had the exact same issue after upgrading to Sitecore 10.3.

ContentTesting.AutomaticContentTesting.Enabled was also set to false, however this exception still threw up.

This was 'resolved' by setting a false connection string, but this was of course not the desired solution:

<add name="cortex.processing.engine" connectionString="https://notused" />

After consulting Sitecore Support this could be resolved by removing the Optimization.ShowSuggestedPersonalization in App_Config\Sitecore\ContentTesting\Sitecore.ContentTesting.config.

The following Patch file can be used to get this fixed:

<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/">
  <sitecore>
    <!-- Remove Optimization.ShowSuggestedPersonalization to prevent issues with Experience Editor when there is no Cortex Processing Engine set up -->
      <sitecore.experienceeditor.speak.requests>
          <request name="Optimization.ShowSuggestedPersonalization" type="Sitecore.ContentTesting.Requests.ExperienceEditor.ShowSuggestedPersonalizationDialogRequest, Sitecore.ContentTesting">
              <patch:delete />
          </request>
     </sitecore.experienceeditor.speak.requests>
  </sitecore>
</configuration>

This site is temporarily in read-only mode and not accepting new answers.

Not the answer you're looking for? Browse other questions tagged .