Sitecore 10 SIF Installation - Failed to start service Sitecore Marketing Automation Engine

OS: Windows 10 Pro

Recently, while installing Sitecore 10 Website using the SIF PS script, I came across this error wherein the Marketing Automation Engine service wasn't getting started. While the PS Window Error didn't have much to offer, I happened to stick to my basics of checking the event logs. That proved lucky since I could find further error info and warnings there. I've attached screen shots and detailed error messages for better clarity below.  Also note that although the service was created, it wasn't able to start while trying to start the same manually:


So, based on what I saw in the event log warning generated at the same time as the errors, I found that the installer wasn't able to find the .NET target runtime. Note that I ran the prerequisites.json and my assumption was, it would take care of installing the necessary .NET framework too. Anyway, I opened the web.config located in the xConnect folder and noticed the target runtime version is 4.8 - 


I downloaded and installed the .NET framework 4.8. The installation was successful, 


One important point is, once the installation was over, the installer asked a machine restart for the installation to take effect. This wasn't the case after running the prerequisites.json: Although I saw prerequisites installing .NET framework 4.8. So, maybe the restart is the actual culprit but don't want to take anything out of the importance of reading logs, which is the main purpose of this blog!

Then, I re-launched the installation through my favourite tool - SCIA. Since my last installation failed, I want to start with a clean install. So, going to perform an uninstall:

1. I opened the SCIA installer, connected to the db using the DB Check button 

2. Entered the Site prefix name (in the Site Info tab) that stopped mid way and pressed next button

3. Then, in the Solr tab, added the solr url and pressed the Solr check button. 

4. Now, when I press the Validate All button the uninstall button will be enabled. Click the same

The PS uninstall run is successful.

Now, reopen the SIF installer from the SCIA main menu, do the same steps 1 to 4 listed above and then press the Install button to generate the SIF PS Script and launch the same:


The installation does cruise on this time.

Note that since I've already downloaded and setup the necessary prerequisites as part of my prior run, I just had to  perform the 4 steps listed above.

That's it about the importance of reading logs!

1. PS Window Error Screen Shot:


2. Event Log Screen Shot:

3. .NET Runtime Error Event Log Screen Shot:
4. Event Log Warning Screen Shot:



Event Log Warning:
System
- Provider
[ Name] ASP.NET 4.0.30319.0
- EventID 1310
[ Qualifiers] 32768
Level 3
Task 3
Keywords 0x80000000000000
- TimeCreated
[ SystemTime] 2020-12-12T00:55:53.307895300Z
EventRecordID 2134
Channel Application
Computer vm20201212
Security
- EventData
3008
A configuration error has occurred.
12/12/2020 12:55:53 AM
12/12/2020 12:55:53 AM
ce7404116ab84c0abd53d4555d32494b
1
1
0
/LM/W3SVC/3/ROOT-1-132522081520631669
Full
/
c:\inetpub\wwwroot\sc10sifxconnect.dev.local\
vm20201212
1276
w3wp.exe
IIS APPPOOL\sc10sifxconnect.dev.local
ConfigurationErrorsException
The 'targetFramework' attribute in the <compilation> element of the Web.config file is used only to target version 4.0 and later of the .NET Framework (for example, '<compilation targetFramework="4.0">'). The 'targetFramework' attribute currently references a version that is later than the installed version of the .NET Framework. Specify a valid target version of the .NET Framework, or install the required version of the .NET Framework. (c:\inetpub\wwwroot\sc10sifxconnect.dev.local\web.config line 27) at System.Web.Compilation.MultiTargetingUtil.ValidateTargetFrameworkMoniker(String targetFrameworkMoniker) at System.Web.Compilation.MultiTargetingUtil.InitializeTargetFrameworkName() at System.Web.Compilation.MultiTargetingUtil.EnsureFrameworkNamesInitialized() at System.Web.Compilation.BuildManager.Initialize() at System.Web.Compilation.BuildManager.InitializeBuildManager() at System.Web.HttpRuntime.HostingInit(HostingEnvironmentFlags hostingFlags, PolicyLevel policyLevel, Exception appDomainCreationException)
https://sc10sifxconnect.dev.local:443/configuration/models
/configuration/models
127.0.0.1
False
IIS APPPOOL\sc10sifxconnect.dev.local
6
IIS APPPOOL\sc10sifxconnect.dev.local
False
at System.Web.Compilation.MultiTargetingUtil.ValidateTargetFrameworkMoniker(String targetFrameworkMoniker) at System.Web.Compilation.MultiTargetingUtil.InitializeTargetFrameworkName() at System.Web.Compilation.MultiTargetingUtil.EnsureFrameworkNamesInitialized() at System.Web.Compilation.BuildManager.Initialize() at System.Web.Compilation.BuildManager.InitializeBuildManager() at System.Web.HttpRuntime.HostingInit(HostingEnvironmentFlags hostingFlags, PolicyLevel policyLevel, Exception appDomainCreationException)  

.NET Runtime Error in Event Log:
Application: Sitecore.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__DisplayClass33_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[])


Error Details in Event Log:

Faulting application name: Sitecore.MAEngine.exe, version: 6.0.0.0, time stamp: 0xf9ccf2e5

Faulting module name: KERNELBASE.dll, version: 10.0.17763.1518, time stamp: 0xff301d3c

Exception code: 0xe0434352

Fault offset: 0x00000000000396c9

Faulting process id: 0x2b74

Faulting application start time: 0x01d6d02186db8b55

Faulting application path: C:\inetpub\wwwroot\sc10sifxconnect.dev.local\App_Data\jobs\continuous\AutomationEngine\Sitecore.MAEngine.exe

Faulting module path: C:\windows\System32\KERNELBASE.dll

Report Id: 049075f7-f8ce-4054-9bc9-08af804a5520

Faulting package full name: 

Faulting package-relative application ID: 

Powershell Window Error:

Install-SitecoreConfiguration : Failed to start service 'Sitecore Marketing Automation Engine -

sc10sifxconnect.dev.local-MarketingAutomationService (sc10sifxconnect.dev.local-MarketingAutomationService)'.

At C:\scia\Sitecore 10.0.0 rev. 004346 (Setup XP0 Developer Workstation rev.

1.2.0-r64)\SCIA-sc10sifsc.dev.local_Install_Script.ps1:77 char:2

+  Install-SitecoreConfiguration @singleDeveloperParams *>&1 | Tee-Obje ...

+  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    + CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorException

    + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Install-SitecoreConfiguration


[TIME] 00:05:48

Start-Service : Failed to start service 'Sitecore Marketing Automation Engine -

sc10sifxconnect.dev.local-MarketingAutomationService (sc10sifxconnect.dev.local-MarketingAutomationService)'.

At C:\Program

Files\WindowsPowerShell\Modules\SitecoreInstallFramework\2.3.0\Public\Tasks\Invoke-ManageServiceTask.ps1:40 char:33

+                     $instance | Start-Service

+                                 ~~~~~~~~~~~~~

    + CategoryInfo          : OpenError: (System.ServiceProcess.ServiceController:ServiceController) [Start-Service],

   ServiceCommandException

    + FullyQualifiedErrorId : StartServiceFailed,Microsoft.PowerShell.Commands.StartServiceCommand

Comments

  1. This really is true. Once we suddenly started getting error in login. Our sitecore wasn't able to communicate with SAP to fetch user details. Nothing was in application logs.
    I checked windows log and they showed TLS version issue after windows update. We reverted TLS version changes and it fixed the issue.

    ReplyDelete
  2. Have you contacted the demo team on Sitecore Community Slack? I'm sure that would have been the better avenue to go instead of blogging about it.

    ReplyDelete

Post a Comment

Popular Posts