Gravatar for ncipollina@captechconsulting.com

Question by ncipollina, Jul 18, 2016 2:11 PM

Could not find configuration node: databases/database[@id='web']

I am in the process of setting up Coveo for a CM/CD environment and I have run into this issue with my Coveo renderings. Our current setup is as follows:

For our CM environment we have a master and a web database.

For our CD environment we have a web database called pubweb.

Since I am indexing master, web and pubweb as separate databases I am trying to remove the "web" database from the CD configuration completely and only have pubweb. (Along with Core but I'm leaving that out of the question since all environments have core). When trying to render the coveo Rendering I get the following error message:

Server Error in '/' Application.

Could not find configuration node: databases/database[@id='web']

Description: An unhandled exception occurred. 

Exception Details: System.InvalidOperationException: Could not find configuration node: databases/database[@id='web']

Source Error: 


Line 18: 
Line 19: <!-- End Tastings search results -->
Line 20: @Html.Sitecore().Placeholder("search")

Source File: d:\Sitecore\va-abc-cd-81\website\Views\Page\TastingListing.cshtml    Line: 20 

Stack Trace: 


[InvalidOperationException: Could not find configuration node: databases/database[@id='web']]
  Sitecore.Diagnostics.Assert.IsTrue(Boolean condition, String message) +57
  Sitecore.Configuration.Factory.GetConfigNode(String xpath, Boolean assert) +296
  Sitecore.Configuration.Factory.CreateObject(String configPath, String[] parameters, Boolean assert) +270
  Sitecore.Configuration.Factory.GetDatabase(String name) +169
  Sitecore.ContentSearch.Maintenance.Strategies.BaseAsynchronousStrategy..ctor(String database) +145

[TargetInvocationException: Exception has been thrown by the target of an invocation.]
  System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) +0
  System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) +694
  Sitecore.Reflection.ReflectionUtil.CreateObject(Type type, Object[] parameters) +229
  Sitecore.Configuration.Factory.CreateFromTypeName(XmlNode configNode, String[] parameters, Boolean assert) +120
  Sitecore.Configuration.Factory.CreateObject(XmlNode configNode, String[] parameters, Boolean assert, IFactoryHelper helper) +141
  Sitecore.Configuration.Factory.CreateObject(String configPath, String[] parameters, Boolean assert) +618
  Sitecore.Configuration.Factory.CreateFromReference(XmlNode configNode, String[] parameters, Boolean assert) +187
  Sitecore.Configuration.Factory.CreateObject(XmlNode configNode, String[] parameters, Boolean assert, IFactoryHelper helper) +118
  Sitecore.Configuration.Factory.GetInnerObject(XmlNode paramNode, String[] parameters, Boolean assert) +1058
  Sitecore.Configuration.Factory.AssignProperties(XmlNode configNode, String[] parameters, Object obj, Boolean assert, Boolean deferred, IFactoryHelper helper) +577
  Sitecore.Configuration.Factory.CreateObject(XmlNode configNode, String[] parameters, Boolean assert, IFactoryHelper helper) +296
  Sitecore.Configuration.Factory.GetInnerObject(XmlNode paramNode, String[] parameters, Boolean assert) +1058
  Sitecore.Configuration.Factory.AssignProperties(XmlNode configNode, String[] parameters, Object obj, Boolean assert, Boolean deferred, IFactoryHelper helper) +577
  Sitecore.Configuration.Factory.CreateObject(XmlNode configNode, String[] parameters, Boolean assert, IFactoryHelper helper) +296
  Sitecore.Configuration.Factory.CreateObject(String configPath, String[] parameters, Boolean assert) +618
  Sitecore.ContentSearch.ContentSearchManager.get_SearchConfiguration() +261
  Sitecore.ContentSearch.ContentSearchManager.get_Indexes() +12
  Coveo.SearchProvider.Processors.FetchCoveoIndexOnly.GetCoveoContextIndex(IIndexable p_Indexable, GetContextIndexArgs p_Args) +66
  Coveo.SearchProvider.Utils.FetchCoveoIndexUtilities.GetIndexName(IIndexable p_Indexable, GetContextIndexArgs p_Args, Func`3 p_GetContextIndexNameDelegate) +228
  Sitecore.ContentSearch.Pipelines.GetContextIndex.FetchIndex.Process(GetContextIndexArgs args) +40
  (Object , Object[] ) +83
  Sitecore.Pipelines.CorePipeline.Run(PipelineArgs args) +445
  Coveo.Framework.Pipelines.PipelineRunner.Run(String p_PipelineName, PipelineArgs p_Args) +712
  Coveo.SearchProvider.ContentSearch.CoveoIndexFetcher.GetCoveoSearchIndex(IIndexable p_Indexable) +63
  Coveo.UI.Mvc.Models.BaseModel.InitializeHelpers(IRendering p_Rendering) +577
  Coveo.UI.Mvc.Models.SearchModel.InitializeHelpers(IRendering p_Rendering) +25
  Coveo.UI.Mvc.Models.BaseModel.Initialize(Rendering p_Rendering) +251
  (Object , Object[] ) +83
  Sitecore.Pipelines.CorePipeline.Run(PipelineArgs args) +445
  Sitecore.Mvc.Pipelines.PipelineService.RunPipeline(String pipelineName, TArgs args) +202
  Sitecore.Mvc.Pipelines.PipelineService.RunPipeline(String pipelineName, TArgs args, Func`2 resultGetter) +197
  Sitecore.Mvc.Presentation.Rendering.GetModel() +337
  Sitecore.Mvc.Presentation.Rendering.get_Model() +27
  Sitecore.Mvc.Presentation.ViewRenderer.get_Model() +167
  Sitecore.Mvc.Presentation.ViewRenderer.Render(TextWriter writer) +319

[InvalidOperationException: Error while rendering view: '/Views/Search/SearchView.cshtml'.
]
  Sitecore.Mvc.Presentation.ViewRenderer.Render(TextWriter writer) +906
  Sitecore.Mvc.Pipelines.Response.RenderRendering.ExecuteRenderer.Render(Renderer renderer, TextWriter writer, RenderRenderingArgs args) +27
  Sitecore.Mvc.Pipelines.Response.RenderRendering.ExecuteRenderer.Process(RenderRenderingArgs args) +62
  (Object , Object[] ) +83
  Sitecore.Pipelines.CorePipeline.Run(PipelineArgs args) +445
  Sitecore.Mvc.Pipelines.PipelineService.RunPipeline(String pipelineName, TArgs args) +202
  Sitecore.Mvc.Pipelines.Response.RenderPlaceholder.PerformRendering.Render(String placeholderName, TextWriter writer, RenderPlaceholderArgs args) +192
  (Object , Object[] ) +83
  Sitecore.Pipelines.CorePipeline.Run(PipelineArgs args) +445
  Sitecore.Mvc.Pipelines.PipelineService.RunPipeline(String pipelineName, TArgs args) +202
  Sitecore.Mvc.Helpers.SitecoreHelper.Placeholder(String placeholderName) +323
  ASP._Page_Views_Page_TastingListing_cshtml.Execute() in d:\Sitecore\va-abc-cd-81\website\Views\Page\TastingListing.cshtml:20
  System.Web.WebPages.WebPageBase.ExecutePageHierarchy() +280
  System.Web.Mvc.WebViewPage.ExecutePageHierarchy() +126
  System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage) +110
  System.Web.Mvc.ViewResultBase.ExecuteResult(ControllerContext context) +380
  System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList`1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult) +109
  System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList`1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult) +890
  System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList`1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult) +890
  System.Web.Mvc.ControllerActionInvoker.InvokeActionResultWithFilters(ControllerContext controllerContext, IList`1 filters, ActionResult actionResult) +97
  System.Web.Mvc.ControllerActionInvoker.InvokeAction(ControllerContext controllerContext, String actionName) +879

Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.34274

It looks like something within the CoveoIndexFetcher is trying to use the web database and I don't have a web database defined anymore. Any ideas on what I might be doing wrong?

Thanks in advance, Nick

2 Replies
Gravatar for ncipollina@captechconsulting.com

Answer by ncipollina, Jul 18, 2016 3:23 PM

I found my issue. I hadn't updated the database that the lucene async strategies were using. The Coveo Index Fetcher was using Sitecore's ContentManager to retrieve the indexes which were trying to validate the configuration. I just hadn't removed all references to web from the site.

Gravatar for amoreau@coveo.com

Answer by amoreau, Jul 18, 2016 2:32 PM

Hello Nick, Have you added a node in you SwtichMastertoWeb.Coveo.config file? It is documented at step 3b here: https://developers.coveo.com/display/public/SitecoreV4/Installing+Coveo+for+Sitecore+in+a+CM+or+CD+Configuration#InstallingCoveoforSitecoreinaCMorCDConfiguration-AdditionalConfigurationStepsforDeployingCoveoforSitecoreonOtherContentDeliveryHostsOnly

I feel this could solve your problem. Feel free to browse the rest of the documentation page; it has just been reworked and tested. Let me know if it worked.

-Alex

Gravatar for ncipollina@captechconsulting.com

Comment by ncipollina, Jul 18, 2016 2:40 PM

I have followed those directions. In the past when setting up a CD environment for Sitecore (without Coveo mind you), the CD environment doesn't have a "pub" database, it only has a "web" database that just happens to point to the same database that the CM environment calls "pub". Introducing Coveo complicates this because Coveo is actually expecting the database to be called pub. So immediately upon completing the directions from the link, using any page with a Coveo Search Result Model fails the old "pindex must not be null" error. This is because the directions have you remove the coveowebindex in favor of the coveopub_index, but do not instruct you to update the website site definition to use the pub database. After I updated that definition to use the pub database things started to work. The problem though is that my CD environment still had a web and pubweb database definition (they both pointed to the same physical database though). In attempting to remove the web database completely is where I've run into issues. All of my non-Coveo renderings are working correctly, it's the Coveo Renderings that are not working correctly.

Ask a question