Installation error: Failed to start service 'Sitecore Marketing Automation Engine

I have followed both the blog and the video series and both times my installation failed in the same way.  If anyone can provide guidance on how to resolve this it would be greatly appreciated.

Regards,
John

  • Hi John,

    We faced same issue during sitecore 9 installation. We just give the proper rights on server folder. go to services find service and then go to the folder and give IUSER, IISUSER and local service full rights. after this run the script again. it should work.

    Thanks,
    Ketan Garala
  • In reply to Ketan Garala:

    Hi Ketan,

    Thank you so much for taking the time to reply.  The folder you are referring to is the AutomationEngine folder?  i.e. the one that contains "maengine.exe"?  I tried adding user permissions to this folder as you suggested (I do not have IUSER or IISUSER from what I can see on my windows 10 machine, but I did give"LOCAL SERVICE" and IIS_IUSR full rights)  but I still get the same error.

    One thing I did notice while poking around is that if I try to navigate to the xconnect website that is created during the install, I get a certificate error.  Not sure if this is related to my current issue, or something else I will need to figure out later, or just due to the installation not finishing...

    If you have any other ideas, or can think of things for me to check, log files to look at, any information I can provide to help solve this just let me know.  I am so frustrated with this whole process at the moment.  I feel like me trial license is going to expire before I get the product installed.

    Thanks,
    John

  • In reply to John Bull:

    Hi

    Please check the following this

    1) Your https certificate is installed in your local machine trusted root .

    2)Please also check your Sitecore License inlcude xDB license.

    3)Check in the folder (your xconnect site)\App_data\jobs\continuous\IndexWorker\App_data and also in same path \AutomationEngine\ folder proper license is there or not .

    4)IN your machine search service and see the Sitecore Marketing Automation Engine is running or not

    Hope this will help
  • Hi John,

    Check for any non-self-signed certificates, execute below PowerShell script to find out:
    Get-Childitem cert:\LocalMachine\root -Recurse | Where-Object {$_.Issuer -ne $_.Subject}

    If you found any result item from the above powershell script then execute below PowerShell command to move these non-self-signed certificates into the Intermediate Certification Authorities store :
    Get-Childitem cert:\LocalMachine\root -Recurse | Where-Object {$_.Issuer -ne $_.Subject} | Move-Item -Destination Cert:\LocalMachine\CA


    After doing this , close the powershell window and reopen to execute your sitecore installation script.


    Regards,
    Rakesh Bindal
  • Hi John,

    We faced a similar issue a while back. The problem during our installation was that the license we were using for installation was expired. Hope this helps.

    Thanks,
    Shamsher Singh Dhillon
  • In reply to DEBAL SAHA:

    Hi Debal,

    Thank you for taking the time to reply.  I am back at this after taking a break for the holidays.

    I have some follow up questions based on your suggestions...

    1) Your https certificate is installed in your local machine trusted root .
    Can you expand on this?  What https certificate am I checking for?  The installer seems to be adding three different certificates, all with "DO_NOT_TRUST" added to the beginning of their name.  They seem to get added to a number of locations (Personal, Trusted Root Authority and Intermediate).  I don't know what certs are supposed to be installed where...

    2)Please also check your Sitecore License inlcude xDB license.
    How do I know if my license includes an xDB license?  I assume it includes everything I need.  It is the developer license from sitecore…

    3)Check in the folder (your xconnect site)\App_data\jobs\continuous\IndexWorker\App_data and also in same path \AutomationEngine\ folder proper license is there or not .
    I have license.xml files in both these folders

    4)IN your machine search service and see the Sitecore Marketing Automation Engine is running or not
    the Sitecore Marketing Automation Engine is not running and will not start.  This is the basic issue I am facing.  The installer fails when it tries to start this service.  I also tried manually starting it but it fails.

     

    Kind regards,
    John "can't install sitecore" Bull

  • In reply to Rakesh Bindal:

    Hi Rakesh,

    I tried these scripts and there were a couple results when I ran the first one, but after running the second one the installer still failed :-(

    Regards,
    John
  • In reply to John Bull:

    Hi

    Please type mmc.exe in your windows and see the certificates under personal and trusted root. the sc.xconect.client.crt Generally certificate can be found in you c drive certificates folder.

    In the trusted root see the DO_NOT_TRUST_SITECORERootCert Expiration date.

    See the license.xml expiry date.

    N.B: One thing I have noticed as per the above comments you attach one image there it is showing https sc9102.xconnect is giving you 403 certificate not trusted error but where in your question image there it is written Sitecore marketing automation engine - sc900.xconnect , so is there any name mismatch or certificate name mismatch like sc900 or sc9102 ?

    Another more as far I know Sitecore 9.0 installation SIF version is required 1.2.1 but in your image,  it is showing 2.0.0 , could you please also have a look in that using the below command

    Find-Module -Name SitecoreInstallFramework -AllVersions 


    If none of this works then I would like to say delete the DO_NOT_TRUST_SITECORERootCert from certificate management console trusted root , and also delete other sc.xconnect.cet from the personal or trusted root.

    If your license comes for 60 day trial from Sitecore (I am also using that) and expiry date is not passed over then, try to reinstall the SIF using Powershell, be sure solr is working fine with https.

  • In reply to DEBAL SAHA:

    Hi Debal,

    I checked and I don't have any certs in Personal, I have one in Trusted Root.  Here is a screenshot:

    The expiration on my license is January 9th I think.  Maybe I'll get the product installed just in time for it to expire...
    <expiration>20190108T000000</expiration>

    Here is the list of Install Frameworks on my machine.  I'm guessing there are so many because I have tried downloading and running this installer so many times....

    I will try again starting from scratch, although I have tried this numerous times already and always end up with the same error so there must be something I am doing wrong, or missing a step somewhere.  I wish there was a way to see exactly why the Marketing Automation Engine fails to start.  I checked the Event Viewer but it wasn't very helpful.  Maybe there is a helpful log file or some way to get some output that will give a clue to what is making it fail?

    Should I uninstall some of those SitecoreInstallFramework versions?  I will also remove all certs, all websites an databases, and all new services.  Anything else?  I confirmed that solr is working fine with https.

    Thanks again,
    John

  • In reply to John Bull:

    Here is what the Event Viewer spits out when I try to manually start the maengine.exe as a service...Not very helpful I think, but you never know...

    Application: maengine.exe
    Framework Version: v4.0.30319
    Description: The process was terminated due to an unhandled exception.
    Exception Info: System.InvalidOperationException
    at Sitecore.XConnect.Client.XConnectClientConfiguration.CheckInitialized()
    at Sitecore.XConnect.Client.XConnectClientConfiguration.get_CurrentModel()
    at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitScoped(Microsoft.Extensions.DependencyInjection.ServiceLookup.ScopedCallSite, Microsoft.Extensions.DependencyInjection.ServiceLookup.ServiceProviderEngineScope)
    at Microsoft.Extensions.DependencyInjection.ServiceLookup.DynamicServiceProviderEngine+<>c__DisplayClass1_0.<RealizeService>b__0(Microsoft.Extensions.DependencyInjection.ServiceLookup.ServiceProviderEngineScope)
    at Microsoft.Extensions.DependencyInjection.ActivatorUtilities+ConstructorMatcher.CreateInstance(System.IServiceProvider)
    at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitScoped(Microsoft.Extensions.DependencyInjection.ServiceLookup.ScopedCallSite, Microsoft.Extensions.DependencyInjection.ServiceLookup.ServiceProviderEngineScope)
    at Microsoft.Extensions.DependencyInjection.ServiceLookup.DynamicServiceProviderEngine+<>c__DisplayClass1_0.<RealizeService>b__0(Microsoft.Extensions.DependencyInjection.ServiceLookup.ServiceProviderEngineScope)
    at Microsoft.Extensions.DependencyInjection.ActivatorUtilities+ConstructorMatcher.CreateInstance(System.IServiceProvider)
    at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitScoped(Microsoft.Extensions.DependencyInjection.ServiceLookup.ScopedCallSite, Microsoft.Extensions.DependencyInjection.ServiceLookup.ServiceProviderEngineScope)
    at Microsoft.Extensions.DependencyInjection.ServiceLookup.DynamicServiceProviderEngine+<>c__DisplayClass1_0.<RealizeService>b__0(Microsoft.Extensions.DependencyInjection.ServiceLookup.ServiceProviderEngineScope)
    at Microsoft.Extensions.DependencyInjection.ActivatorUtilities+ConstructorMatcher.CreateInstance(System.IServiceProvider)
    at Sitecore.XConnect.Configuration.Extensions+<>c__DisplayClass15_0.<UseServiceDecorator>b__1(System.IServiceProvider)
    at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitScoped(Microsoft.Extensions.DependencyInjection.ServiceLookup.ScopedCallSite, Microsoft.Extensions.DependencyInjection.ServiceLookup.ServiceProviderEngineScope)
    at Microsoft.Extensions.DependencyInjection.ServiceLookup.DynamicServiceProviderEngine+<>c__DisplayClass1_0.<RealizeService>b__0(Microsoft.Extensions.DependencyInjection.ServiceLookup.ServiceProviderEngineScope)
    at Microsoft.Extensions.DependencyInjection.ActivatorUtilities+ConstructorMatcher.CreateInstance(System.IServiceProvider)
    at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitTransient(Microsoft.Extensions.DependencyInjection.ServiceLookup.TransientCallSite, Microsoft.Extensions.DependencyInjection.ServiceLookup.ServiceProviderEngineScope)
    at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitIEnumerable(Microsoft.Extensions.DependencyInjection.ServiceLookup.IEnumerableCallSite, Microsoft.Extensions.DependencyInjection.ServiceLookup.ServiceProviderEngineScope)
    at Microsoft.Extensions.DependencyInjection.ServiceLookup.DynamicServiceProviderEngine+<>c__DisplayClass1_0.<RealizeService>b__0(Microsoft.Extensions.DependencyInjection.ServiceLookup.ServiceProviderEngineScope)
    at Microsoft.Extensions.DependencyInjection.ActivatorUtilities+ConstructorMatcher.CreateInstance(System.IServiceProvider)
    at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitScoped(Microsoft.Extensions.DependencyInjection.ServiceLookup.ScopedCallSite, Microsoft.Extensions.DependencyInjection.ServiceLookup.ServiceProviderEngineScope)
    at Microsoft.Extensions.DependencyInjection.ServiceLookup.DynamicServiceProviderEngine+<>c__DisplayClass1_0.<RealizeService>b__0(Microsoft.Extensions.DependencyInjection.ServiceLookup.ServiceProviderEngineScope)
    at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetService[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]](System.IServiceProvider)
    at Sitecore.Xdb.MarketingAutomation.Engine.App.ServiceConfiguration.get_Engine()
    at Sitecore.Xdb.MarketingAutomation.Engine.App.EngineService.OnStart(System.String[])
    at System.ServiceProcess.ServiceBase.ServiceQueuedMainCallback(System.Object)
    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
    at System.ServiceProcess.ServiceBase.Run(System.ServiceProcess.ServiceBase[])
    at Sitecore.Xdb.MarketingAutomation.Engine.App.Program.RunAsService()
    at Sitecore.Xdb.MarketingAutomation.Engine.App.Program.Main(System.String[])
  • In reply to John Bull:

    Here's some gobbledygook from a log file I found at C:\inetpub\wwwroot\sc9102.xconnect\App_Data\jobs\continuous\AutomationEngine\App_Data\Logs


    2018-12-29 15:02:37.932 -06:00 [Error] Error initializing XConnect client.
    System.AggregateException: One or more errors occurred. ---> Sitecore.XConnect.XdbCollectionUnavailableException: An error occurred while sending the request. ---> System.Net.Http.HttpRequestException: An error occurred while sending the request. ---> System.Net.WebException: The underlying connection was closed: An unexpected error occurred on a send. ---> System.IO.IOException: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host. ---> System.Net.Sockets.SocketException: An existing connection was forcibly closed by the remote host
    at System.Net.Sockets.Socket.EndReceive(IAsyncResult asyncResult)
    at System.Net.Sockets.NetworkStream.EndRead(IAsyncResult asyncResult)
    --- End of inner exception stack trace ---
    at System.Net.TlsStream.EndWrite(IAsyncResult asyncResult)
    at System.Net.ConnectStream.WriteHeadersCallback(IAsyncResult ar)
    --- End of inner exception stack trace ---
    at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult)
    at System.Net.Http.HttpClientHandler.GetResponseCallback(IAsyncResult ar)
    --- End of inner exception stack trace ---
    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()
    --- 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.Net.Http.HttpRequestException: An error occurred while sending the request. ---> System.Net.WebException: The underlying connection was closed: An unexpected error occurred on a send. ---> System.IO.IOException: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host. ---> System.Net.Sockets.SocketException: An existing connection was forcibly closed by the remote host
    at System.Net.Sockets.Socket.EndReceive(IAsyncResult asyncResult)
    at System.Net.Sockets.NetworkStream.EndRead(IAsyncResult asyncResult)
    --- End of inner exception stack trace ---
    at System.Net.TlsStream.EndWrite(IAsyncResult asyncResult)
    at System.Net.ConnectStream.WriteHeadersCallback(IAsyncResult ar)
    --- End of inner exception stack trace ---
    at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult)
    at System.Net.Http.HttpClientHandler.GetResponseCallback(IAsyncResult ar)
    --- End of inner exception stack trace ---
    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()
    --- 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()<---

    2018-12-29 15:02:37.997 -06:00 [Error] Failed to start the Marketing Automation Engine service.
    System.InvalidOperationException: This configuration has not been initialized. Please call the initialize method before using it.
    at Sitecore.XConnect.Client.XConnectClientConfiguration.CheckInitialized()
    at Sitecore.XConnect.Client.XConnectClientConfiguration.get_CurrentModel()
    at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitScoped(ScopedCallSite scopedCallSite, ServiceProviderEngineScope scope)
    at Microsoft.Extensions.DependencyInjection.ServiceLookup.DynamicServiceProviderEngine.<>c__DisplayClass1_0.<RealizeService>b__0(ServiceProviderEngineScope scope)
    at Microsoft.Extensions.DependencyInjection.ActivatorUtilities.ConstructorMatcher.CreateInstance(IServiceProvider provider)
    at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitScoped(ScopedCallSite scopedCallSite, ServiceProviderEngineScope scope)
    at Microsoft.Extensions.DependencyInjection.ServiceLookup.DynamicServiceProviderEngine.<>c__DisplayClass1_0.<RealizeService>b__0(ServiceProviderEngineScope scope)
    at Microsoft.Extensions.DependencyInjection.ActivatorUtilities.ConstructorMatcher.CreateInstance(IServiceProvider provider)
    at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitScoped(ScopedCallSite scopedCallSite, ServiceProviderEngineScope scope)
    at Microsoft.Extensions.DependencyInjection.ServiceLookup.DynamicServiceProviderEngine.<>c__DisplayClass1_0.<RealizeService>b__0(ServiceProviderEngineScope scope)
    at Microsoft.Extensions.DependencyInjection.ActivatorUtilities.ConstructorMatcher.CreateInstance(IServiceProvider provider)
    at Sitecore.XConnect.Configuration.Extensions.<>c__DisplayClass15_0.<UseServiceDecorator>b__1(IServiceProvider provider)
    at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitScoped(ScopedCallSite scopedCallSite, ServiceProviderEngineScope scope)
    at Microsoft.Extensions.DependencyInjection.ServiceLookup.DynamicServiceProviderEngine.<>c__DisplayClass1_0.<RealizeService>b__0(ServiceProviderEngineScope scope)
    at Microsoft.Extensions.DependencyInjection.ActivatorUtilities.ConstructorMatcher.CreateInstance(IServiceProvider provider)
    at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitTransient(TransientCallSite transientCallSite, ServiceProviderEngineScope scope)
    at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitIEnumerable(IEnumerableCallSite enumerableCallSite, ServiceProviderEngineScope scope)
    at Microsoft.Extensions.DependencyInjection.ServiceLookup.DynamicServiceProviderEngine.<>c__DisplayClass1_0.<RealizeService>b__0(ServiceProviderEngineScope scope)
    at Microsoft.Extensions.DependencyInjection.ActivatorUtilities.ConstructorMatcher.CreateInstance(IServiceProvider provider)
    at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitScoped(ScopedCallSite scopedCallSite, ServiceProviderEngineScope scope)
    at Microsoft.Extensions.DependencyInjection.ServiceLookup.DynamicServiceProviderEngine.<>c__DisplayClass1_0.<RealizeService>b__0(ServiceProviderEngineScope scope)
    at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetService[T](IServiceProvider provider)
    at Sitecore.Xdb.MarketingAutomation.Engine.App.ServiceConfiguration.get_Engine()
    at Sitecore.Xdb.MarketingAutomation.Engine.App.EngineService.OnStart(String[] args)
  • In reply to John Bull:

    Also, I cannot connect to "https://sc9102.xconnect/" on my machine... not sure if I am supposed to be able to, but it says "Cannot connect securely to this page". In the Event Viewer it says "An error occurred while using SSL configuration for endpoint sc9102.xconnect:443. The error status code is contained within the returned data".

    I would hate to be focusing on the wrong thing by thinking it is a certificate error, but something tells me it is. But just not sure....and why can't the installer do them correctly?
  • In reply to John Bull:

    You should also be getting logs in your C:\sitecore directory where you are running the install script, which might point to the problem, particularly search for the DO_NOT_TRUST bits to see what is happening with the certs. You could consider editing the install script to only run the xconnect-createcert.json step, and run it over and over again until you are sure it completes successfully. (all you need for this are around the first 20 lines of the .ps1 you mention in the OP)

    But, yes, you should be able to browse to the xconnect site and it will give you a time stamp.