Sitecore / Sitecore.Demo.Headless

This repository is used to share Sitecore JSS PWA demo assets (and future “Sitecore Omni” related demo assets)
Mozilla Public License 2.0
22 stars 19 forks source link

Error occurred when executing task 'Start-XConnect-Service' in build.ps1 #103

Closed ashugoyal220 closed 4 years ago

ashugoyal220 commented 4 years ago

When running the build.ps1, the build is not completed successfully and displayed the below error message.

After that, even when I manually tried to start the service "FitAppxconnect.dev.local-MarketingAutomationService", the service is not getting started.

The MarketingAutomationService was running without any issue before executing the build.ps1. Version: Sitecore 9.3 XP0

Error while executing build.ps1

Publish-XConnect

======================================== Start-XConnect-Service

Attempting to start the service fitappxconnect.dev.local-MarketingAutomationService. Cake.exe : An error occurred when executing task 'Start-XConnect-Service'. At C:\projects\Sitecore.HabitatHome.Omni\fitness\server\build.ps1:241 char:1 &$CAKE_EXE $cakeArguments CategoryInfo : NotSpecified: (An error occurr...nnect-Service'.:String) [], RemoteException FullyQualifiedErrorId : NativeCommandError

Error: One or more errors occurred. Time out has expired and the operation has not been completed. PS C:\projects\Sitecore.HabitatHome.Omni\fitness\server>

Error in "log xconnect-log-Sitecore92-MarketingAutomation-20200205"

2020-02-05 16:30:24.582 +00:00 [Error] Error initializing XConnect client. System.AggregateException: One or more errors occurred. ---> Sitecore.XConnect.XdbCollectionUnavailableException: The HTTP response was not successful: InternalServerError at Sitecore.XConnect.Client.WebApi.ConfigurationWebApiClient.d6.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.d32.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.InitializeXConnectClientConfiguration(IServiceProvider provider, XConnectClientConfiguration config) ---> (Inner Exception #0) Sitecore.XConnect.XdbCollectionUnavailableException: The HTTP response was not successful: InternalServerError at Sitecore.XConnect.Client.WebApi.ConfigurationWebApiClient.d6.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.d32.MoveNext()<---

2020-02-05 16:30:24.643 +00: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.<>cDisplayClass1_0.b0(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.<>cDisplayClass1_0.b0(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.<>cDisplayClass1_0.b0(ServiceProviderEngineScope scope) at Microsoft.Extensions.DependencyInjection.ActivatorUtilities.ConstructorMatcher.CreateInstance(IServiceProvider provider) at Sitecore.XConnect.Configuration.Extensions.<>cDisplayClass28_0.b1(IServiceProvider provider) at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitScoped(ScopedCallSite scopedCallSite, ServiceProviderEngineScope scope) at Microsoft.Extensions.DependencyInjection.ServiceLookup.DynamicServiceProviderEngine.<>cDisplayClass1_0.b0(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.<>cDisplayClass1_0.b0(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.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)

ashugoyal220 commented 4 years ago

Guess the problem happens, when you try to set up the app in Sitecore 9.3.

The reason for the service not getting started was due to the internal server error - which is

Unknown referenced model ('{ "Name": "Sitecore.XConnect.Collection.Model", "Version": "9.0" }')

The problem seems to be in the version of "Sitecore.XConnect.Collection.Model" copied to xConnect website folder from the "Sitecore.HabitatHome.Fitness.Foundation.Analytics, 9.0" file in temp folders (C:\projects\Sitecore.HabitatHome.Omni\fitness\server\temp\xConnectRoot\App_Data\Models) & (C:\projects\Sitecore.HabitatHome.Omni\fitness\server\temp\xConnectIndexerRoot\App_Data\Models)

To resolve this service start issue – update the Sitecore.XConnect.Collection.Model to version 9.3 from 9.0 in the json file in “C:\projects\Sitecore.HabitatHome.Omni\fitness\server\src\Foundation\Analytics\xconnect\xmodels”

vtml commented 4 years ago

If that's the case, better make a branch for 9.3, and then do a PR back in.