installation failure, fails to start marketing automation service

I have tried multiple times, following 

this series of posts: https://www.markvanaalst.com/blog/2018/03/21/prerequisites/

this video series: https://www.youtube.com/playlist?list=PLBDqdodEhG7-9-hX5R_m2UAvpMKEZp-xY

this blog: https://tothecore.sk/2018/11/28/sitecore-9-1-initial-release-installation-guide-for-development-machine/

 

Every attempt has resulted in the same thing.  The installer chugs along for some time, doing many things, then it eventually craps out with the following:

Install-SitecoreConfiguration : Failed to start service 'Sitecore Marketing Automation Engine -
sc910.xconnect-MarketingAutomationService (sc910.xconnect-MarketingAutomationService)'.
At C:\Sitecore\XP0-SingleDeveloper.ps1:74 char:1
+ Install-SitecoreConfiguration @singleDeveloperParams *>&1 | Tee-Objec ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorException
    + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Install-SitecoreConfiguration
 
[TIME] 00:06:06
Start-Service : Failed to start service 'Sitecore Marketing Automation Engine - sc910.xconnect-MarketingAutomationService
(sc910.xconnect-MarketingAutomationService)'.
At C:\Program Files\WindowsPowerShell\Modules\SitecoreInstallFramework\2.0.0\Public\Tasks\Invoke-ManageServiceTask.ps1:40
char:33
+                     $instance | Start-Service
+                                 ~~~~~~~~~~~~~
    + CategoryInfo          : OpenError: (System.ServiceProcess.ServiceController:ServiceController) [Start-Service], Servi
   ceCommandException
    + FullyQualifiedErrorId : StartServiceFailed,Microsoft.PowerShell.Commands.StartServiceCommand

 

It is always the same error.  Something is not right somewhere but I have no idea what.  Anyone have any thoughts.

 

Thanks,
John

  • Sorry for the double post but the first one took so long to show up I thought it got lost. Anyway, I have just spent a few hours uninstalling everything and starting fresh using the official 9.1 installation blog and I get the exact same result. Marketing Automation Engine failed to start. Soooo frustrating.

    I am happy to supply any logs or screenshots or anything that may help figure this out. I am almost a month into my trial developer license and haven't even got the product installed yet.

    Thanks,
    John
  • In reply to John Bull:

    I am getting same error. Did you get any answer from any other sources? Thanks in advance.
  • 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
  • In reply to Rakesh Bindal:

    Hi Rakesh, I'm also getting the same errors. I tried running the PowerShell script you supplied but it didn't return any results. Do you have any further suggestions?
  • Hello,

    Similar situation trying to install 9.1 on my local machine. The Sitecore Marketing Automation service won't start. I've tried running the powershell commands and all the folder permissions, hosts file, etc.

    In order for Rakesh's scripts to return results I had to export the certs' from Personal to Trusted Root certificate store. After running his suggested PS scripts, I attempted to start the service and it failed. Next I attempted to rerun the XP0-SingleInstaller again and it again threw the same error in the same step on PS "failed to start service"

    I see the following in the Event Viewer

    Application Error:
    Faulting application name: maengine.exe, version: 3.0.0.0, time stamp: 0xc338dcf1
    Faulting module name: KERNELBASE.dll, version: 10.0.16299.820, time stamp: 0xe0e03037
    Exception code: 0xe0434352
    Fault offset: 0x00000000000454d8
    Faulting process id: 0x4930
    Faulting application start time: 0x01d4a3b180625e93
    Faulting application path: C:\inetpub\wwwroot\new.xconnect.sitename.com\App_Data\jobs\continuous\AutomationEngine\maengine.exe
    Faulting module path: C:\WINDOWS\System32\KERNELBASE.dll
    Report Id: 4f47e1b8-5234-44b0-8902-779ddb3d39f5
    Faulting package full name:
    Faulting package-relative application ID:

    >NET Runtime
    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 Jay Smithson:

    UPDATE: I was able to overcome this obstacle, and have now successfully installed Sitecore 9. The ultimate solution, I think, was having a proper license in the "resources" directory. I replaced what was in there with the license from our existing installation. (it is 8.1, but we already had the perpetual license for 9)

    After all else had failed. I decided to start over from scratch. I changed the prefix for my installation from "new" to "nova" so that it would install a clean instance.
    There were only a few differences from this round of the installation versus the first troubled one.
    -The license as mentioned above
    -the permissions on the resources folder for local service/iusr/iis_user
    -deleted the previous certifications under "new" prefix

    At this time I still have service names and IIS sites from the new prefix which i'll need to delete to have everything clean again.

    That was quite a ride.
  • In reply to Jay Smithson:

    What the heck.... I just started from scratch again and it worked!

    I am both elated that it finally worked and also really annoyed that it took over a month and I think the issue all along was.... well, I'm not sure what the issue was.  The only thing I did differently this time was to give local service/iusr/iis_user full rights on the folder where all the installation files were (c:/resourcefiles) as suggested by Jay above.  Is this what it was all along?  Is this documented somewhere and I just missed it?  Or is it completely unrelated to this and there was something else involved?  Not sure if I'll ever know... but hey, it's working now, so onward and upward.

    Thank you to all who provided input and suggestions on this and my other thread.  It was really, really appreciated and kept me trying instead of just throwing in the towel.

    Kind regards,
    John

     

  • In reply to John Bull:

    I was stuck on this same issue as well. I tried all the suggestions here to no avail, and no cert issues. Error message matched the above in both automation log and event viewer "Service cannot be started. System.InvalidOperationException: This configuration has not been initialized. Please call the initialize method before using it." All other logs were clean and healthy; XConnect was running.

    After combing through event viewer I noticed a SQL server information entry around the time I tried manually starting the service; it said collectionuser login failed. At some point the generated sql user login password no longer matched the marketing automation connection string config. I updated the SQL login password to match and the service started. I then continued the installation successfully (removed tasks from the json files that already completed).

    That was a doozy for sure.

    I tried 5 different new prefixes after applying all suggestions, service would not start, even manually. Then after sitting for an hour a manual start worked; didn't change a thing. Went back to my original attempt, and it still wouldn't start which is when I noticed the failed login information for that one. Maybe re-running the installer creates a new password and writes the connstring, but doesn't update the SQL user. Still not sure what was affecting my clean installs, but I'll save that for another day. By the way, I had no issues installing 9.1 on other machines. Only hit this issue recently on this machine.

    Cheers,
    James
  • For Sitecore 9.1
    1)open Windows PowerShell (run as administrator)
    2)Go to sc91_install path(Installation path)
    3)execute Install-SitecoreConfiguration .\prerequisites.json
  • In reply to Rohan Mohapatra:

    Yes I had done that. With more tinkering I believe the issue is the timing with my new xconnect instance. With a standard harddrive my Disk I/O was maxing out. The marketing automation server requires it to be up and running... but times out trying because it is not ready. I was able to start the marketing automation service an hour later without issue because xconnect was up after 15 minutes. Oddly, there are no errors in xconnect log or event viewer. I upgraded my machine to the recommended SSD. Now when xconnect starts disk i/o is low, but RAM spikes to 12 GB (I only have 16 GB total) and maxes out, still taking 15 minutes to come up (then RAM drops to normal amount). I've tried clearing event queue, history, and publish queue with no change in behavior. Anyone else seeing these initial spikes when starting sitecore 9.1? I experience this same spike when either first requesting xconnect, sitecore identity server, or sitecore app. No errors in any logs. Of my two machines one machine has this issue for every clean 9.1 install; My other machine has had none of these problems.
  • In reply to John Bull:

    What in the end worked for me was getting latest Windows updates. Have you checked that your system was not updated in between your initial try and the successful try?
  • In reply to Jesper Hossy:

    I had the same marketing automation service issue and the only thing it worked for me was to install latest Windows updates.
  • We faced same time of Issue and finally we found the reason is xconnect service url is not accessible by the windows service of Sitecore.

    Root cause

    1. local url having sc91.sc  sc91.xconnect doesnt work on some AD login and corporate machines.

    Solution

    Change the Installation Script with below Update

     

    $Prefix = "sc91"

    # The name for the XConnect service.

    $XConnectSiteName = "sc91xconnect"

    # The Sitecore site instance name.

    $SitecoreSiteName = "sc91"

    # Identity Server site name

    $IdentityServerSiteName = "sc91identityserver"

     

    Above will address the issue of Accessing Xconnect from the marketing automation windows service

     

    Note: This has worked fine in our machines which uses AD login mechanism.

    Reference Link

  • I am getting this same issue. I am trying to install sitecore on an AWS workspace. I have tried all of the above. Anyone else have a fix?
  • I provided "Full Permission" to "Everyone" to folder "c:\resourcefiles" and reinstall with new instance name which finally installed Sitecore 9.2 successfully.