3

Can't start the Sitecore Marketing Automation Engine on my Sitecore 9.1 instance.

When I try to do so, that's what I get on my log file:

19:02:11 15:56:15 ERROR Exception when executing agent aggregation/aggregator
Exception: Sitecore.XConnect.XdbCollectionUnavailableException
Message: An error occurred while sending the request.
Source: Sitecore.Xdb.Common.Web
   at Sitecore.Xdb.Common.Web.Synchronous.SynchronousExtensions.SuspendContextLock[TResult](Func`1 taskFactory)
   at Sitecore.XConnect.Client.XConnectSynchronousExtensions.SuspendContextLock(Func`1 taskFactory)
   at Sitecore.XConnect.Client.Configuration.SitecoreXConnectClientConfiguration.Initialize(XmlNode configNode)
   at Sitecore.Configuration.DefaultFactory.CreateObject(XmlNode configNode, String[] parameters, Boolean assert, IFactoryHelper helper)
   at Sitecore.Configuration.DefaultFactory.CreateObject(XmlNode configNode, String[] parameters, Boolean assert)
   at Sitecore.Configuration.DefaultFactory.CreateObject(String configPath, String[] parameters, Boolean assert)
   at Sitecore.XConnect.Client.Configuration.SitecoreXConnectClientConfiguration.GetClient(String clientConfigPath)
   at Sitecore.Analytics.Aggregation.XConnect.DefaultXdbContextFactory.CreateReadOnly()
   at Sitecore.Analytics.Processing.AsyncPoolScheduler`2..ctor(IAsyncProcessingPool`1 pool, IXdbContextFactory xdbContextFactory, ExpandOptions options, Int16 maxBatchSize)
   at Sitecore.Analytics.Aggregation.InteractionAggregationAgent.<ExecuteCoreAsync>d__15.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Sitecore.Analytics.Core.Agent.<ExecuteAsync>d__1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Sitecore.Analytics.Core.AsyncBackgroundService.<ExecuteAgentAsync>d__22.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Sitecore.Analytics.Core.AsyncBackgroundService.<RunAsync>d__26.MoveNext()

Nested Exception

Exception: System.Net.Http.HttpRequestException
Message: An error occurred while sending the request.
Source: mscorlib
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Sitecore.Xdb.Common.Web.CommonWebApiClient`1.<ExecuteAsync>d__41.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Sitecore.Xdb.Common.Web.CommonWebApiClient`1.<ExecuteGetAsync>d__36.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Sitecore.XConnect.Client.WebApi.ConfigurationWebApiClient.<Refresh>d__4.MoveNext()

Nested Exception

Exception: System.Net.WebException
Message: The request was aborted: Could not create SSL/TLS secure channel.
Source: System
   at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult)
   at System.Net.Http.HttpClientHandler.GetResponseCallback(IAsyncResult ar)

It's worth noting that I've been playing with my instance Certificates so I'm pretty sure it must be something related to it.

But I can't point exactly what I missed.

Any help would be appreciated.

4
  • 1
    In the connectionstrings.config file, in the folder xconnect\App_Data\jobs\continuous\AutomationEngine\App_Config The thumbnail in xconnect.collection.certificate does not match the xconnect client certificate. Or the url in the app setting xconnect.collection does not match your xconnect url.
    – Chris Auer
    Commented Feb 12, 2019 at 2:05
  • Please check xConnect site loading properly?
    – Amit Kumar
    Commented Feb 12, 2019 at 2:12
  • 1
    Please check this answer for some things you can check and try sitecore.stackexchange.com/a/15311/1278 Commented Feb 12, 2019 at 11:22
  • Thanks @ChrisAuer, that was not the only issue I had but opened my eyes to the fact that Sitecore loves duplicating information across different folders. Commented Feb 12, 2019 at 14:40

3 Answers 3

3

Finally found the issue.

When you decide to change manually the XConnect Certificate Thumbprint, make sure you know all the places you must change before taking for granted that the job is done.

  • .sc\App_Config\ConnectionStrings.config
  • .xconnect\App_Config\AppSettings.config
  • .xconnect\App_Data\jobs\continuous\AutomationEngine\App_Config\ConnectionStrings.config
  • .xconnect\App_Data\jobs\continuous\ProcessingEngine\App_Config\ConnectionStrings.config

As bonus track, this is the only the place you must change when replacing the Identity Server Certificate Thumbprint:

  • .identityserver\Config\production\Sitecore.IdentityServer.Host.xml

And don't forget to update these certificates on your IIS websites as well.

0

One other cause of this error is that the certificate does exist, the thumbprints are correct but the service fails to load the certificate when starting. You can see this error in the logs

2019-07-29 10:25:58.656 +01:00 [Error] Error initializing XConnect client.
System.AggregateException: One or more errors occurred. ---> Sitecore.XConnect.XdbCollectionUnavailableException: An error occurred while sending the request. ---> System.InvalidOperationException: The certificate was not found. Store: My, Location: LocalMachine, FindType: FindByThumbprint, FindValue: 4B368AFC943D1EF31DA5A5A3A98DF63769412BC5, InvalidAllowed: False.
   at Sitecore.Xdb.Common.Web.CertificateHttpClientHandlerModifier.Process(HttpClientHandler handler)
   at Sitecore.Xdb.Common.Web.CommonWebApiClient`1.CreateRequestHandler()
   at Sitecore.Xdb.Common.Web.CommonWebApiClient`1.CreateClient()
   at System.Lazy`1.CreateValue()
   at System.Lazy`1.LazyInitValue()
   at Sitecore.Xdb.Common.Web.CommonWebApiClient`1.<ExecuteAsync>d__41.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Sitecore.Xdb.Common.Web.CommonWebApiClient`1.<ExecuteGetAsync>d__36.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Sitecore.XConnect.Client.WebApi.ConfigurationWebApiClient.<Refresh>d__4.MoveNext()
   --- End of inner exception stack trace ---
   at Sitecore.XConnect.Client.WebApi.ConfigurationWebApiClient.<Refresh>d__4.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Sitecore.XConnect.Client.XConnectClientConfiguration.<InitializeAsync>d__32.MoveNext()
   --- End of inner exception stack trace ---
   at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
   at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
   at Sitecore.XConnect.Client.Configuration.XConnect.Extensions.ServiceCollectionExtensions.<>c__DisplayClass1_0.<UseXConnectClientConfiguration>b__0(IServiceProvider provider)
---> (Inner Exception #0) Sitecore.XConnect.XdbCollectionUnavailableException: An error occurred while sending the request. ---> System.InvalidOperationException: The certificate was not found. Store: My, Location: LocalMachine, FindType: FindByThumbprint, FindValue: 4B368AFC943D1EF31DA5A5A3A98DF63769412BC5, InvalidAllowed: False.
   at Sitecore.Xdb.Common.Web.CertificateHttpClientHandlerModifier.Process(HttpClientHandler handler)
   at Sitecore.Xdb.Common.Web.CommonWebApiClient`1.CreateRequestHandler()
   at Sitecore.Xdb.Common.Web.CommonWebApiClient`1.CreateClient()
   at System.Lazy`1.CreateValue()
   at System.Lazy`1.LazyInitValue()

You may not have added the certificate or the thumbprint may be wrong but you can also have an issue if the cert issue is not in the correct authority in the local store.

I've found that the sitecore installation framework can often add the SitecoreRootCert that it uses to issue other certs to the Intermediate Authority which may not be enough.
enter image description here

This can results in the xconnect cert not being found because its not considered valid. If you move the cert to the root store then try and start the service this can fix the issue.

0

I had a similar issue with Sitecore 9.3 installation. I double checked all certificates and thumbprints and they were correct.

Eventually I found that my antivirus software was replacing xConnect SSL certificate behind the scenes. As soon as I disabled this feature in antivirus, Marketing Automation Engine started without errors and Sitecore installation completed successfully.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.