Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing "core" database error on CD role of an v9.1u1 XP1 instance #57

Open
jermdavis opened this issue Apr 26, 2019 · 3 comments
Open
Assignees

Comments

@jermdavis
Copy link

Not sure if this is something I've done wrong or not, so I've no issue with this being closed if I've just misread the instructions - but here's the issue I'm seeing:

I have an instance of V9.1u1 installed onto a single machine using the "XP1-SingleDeveloper.ps1" script. It's vanilla Sitecore - not a Habitat site. As far as I can see it's running ok. No errors in the logs for the CM or CD roles at least, after I browse about a bit.

I installed the package currently linked from your repo's root page (which is described as compatible with v9.1) and it completed ok. I then followed the instructions the package shows for scaled deployments. I unzipped the "files" folder from the package onto the CD instance, and edited the config on the CM instance to say it was a scaled deployment.

When I go to the Experience Generator page, and configure it to look at the CD URL, I can start a generation operation, but the CD server's log gets errors like this:

10388 15:21:59 ERROR [Sitecore Services]: HTTP GET
URL http://sc911.cd/clientapi/xgen/websites

Exception System.InvalidOperationException: Could not find configuration node: databases/database[@id='core']
   at Sitecore.Configuration.DefaultFactory.GetConfigNode(String xpath, Boolean assert)
   at Sitecore.Configuration.DefaultFactory.CreateObject(String configPath, String[] parameters, Boolean assert)
   at Sitecore.Configuration.DefaultFactory.GetDatabase(String name, Boolean assert)
   at Sitecore.Configuration.DefaultFactory.GetDatabase(String name)
   at Sitecore.Sites.SiteContext.get_Database()
   at ExperienceGenerator.Client.Controllers.SiteRepository.<>c.<GetSites>b__9_1(SiteContext site)
   at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
   at System.Linq.Buffer`1..ctor(IEnumerable`1 source)
   at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source)
   at ExperienceGenerator.Client.Controllers.SiteRepository.GetSites()
   at ExperienceGenerator.Client.Controllers.SiteRepository.get_Sites()
   at ExperienceGenerator.Client.Controllers.SiteRepository.GetValidSites()
   at ExperienceGenerator.Client.Controllers.SiteRepository.get_ValidSites()
   at ExperienceGenerator.Client.Controllers.ExperienceGeneratorActionsController.Websites(Boolean all)
   at lambda_method(Closure , Object , Object[] )
   at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.<>c__DisplayClass6_1.<GetExecutor>b__3(Object instance, Object[] methodParameters)
   at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ExecuteAsync(HttpControllerContext controllerContext, IDictionary`2 arguments, CancellationToken cancellationToken)
--- 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 System.Web.Http.Controllers.ApiControllerActionInvoker.<InvokeActionAsyncCore>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 System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__6.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__6.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 System.Web.Http.Filters.ActionFilterAttribute.<ExecuteActionFilterAsyncCore>d__5.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 System.Web.Http.Controllers.ActionFilterResult.<ExecuteAsync>d__5.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 System.Web.Http.Filters.AuthorizationFilterAttribute.<ExecuteAuthorizationFilterAsyncCore>d__3.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 System.Web.Http.Dispatcher.HttpControllerDispatcher.<SendAsync>d__15.MoveNext()

That looks to me like the code makes reference to the Core DB - but I don't think V9.1 deploys a connection to Core with the CD role any more? I can see some references directly to the Core DB in the SettingsRepository classes - could they be the issue here perhaps?

Is there something I should be doing on my deployment to fix / work around the error? Or is it a bug that needs resolving in the code?

Any help appreciated...

@jeanfrancoislarente
Copy link
Member

Hey @jermdavis
Curious why you're trying to deploy / access xGenerator on a CD?

@jermdavis
Copy link
Author

Probably just getting the wrong end of the stick - but the readme when you install the package says:

If You are installing this package on distributed environment,
please follow next steps:

  1. In App_config/Include/ExperienceGenerator/ExperienceGenerator.config
    set ExperienceGenerator.DistributedEnvironment setting to 'true'

  2. Extract this package as zip archive.
    Copy all extracted files from 'files' folder to your CD instance.

And then the Experience Generator form asks for a CD url:
(Though the default value is the CM url - as shown here)

Untitled

I assumed an XP1 deployment was "distributed" even if all the roles were on the same machine?

@jeanfrancoislarente
Copy link
Member

Thanks for the clarification - our team hasn't tested on a CM/CD deployment however @scottmulligan will be able to provide some colour commentary I'm sure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants