Gravatar for

Question by Darko Markovic, May 25, 2015 11:56 PM

Coveo on Content Delivery instance without master database

We have designed our CD environment as farm of 2 servers with core, web and active_commerce databases without master database.

Coveo has installed on both instances and every instance has setup correctly to point on localhost instance (http://localhost/sitecore%20modules/Web/Coveo/Admin/CoveoDiagnosticPage.aspx show us that all component are setup and running)

Is this design allowed? We read recommendation on link

For setup Sitecore without master we are using SwitchMasterToWeb.config from recommendation on link

When we are going to Sitecore->Control Panel ->Index Manager, we are seeing just 3 indexes what we expect but when we start rebuilding indexes we are getting following error:

Job started: Index_Update_IndexName=sitecore_web_index|#Exception: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.InvalidOperationException: Could not find configuration node: databases/database[@id='master']
   at Sitecore.Diagnostics.Assert.IsTrue(Boolean condition, String message)
   at Sitecore.Configuration.Factory.GetConfigNode(String xpath, Boolean assert)
   at Sitecore.Configuration.Factory.CreateObject(String configPath, String[] parameters, Boolean assert)
   at Sitecore.Configuration.Factory.GetDatabase(String name)
   at Coveo.Framework.Databases.SitecoreFactoryWrapper.GetDatabase(String p_DatabaseName)
   at Coveo.AbstractLayer.FieldManagement.FacetItemsFetcher.FetchFacetItems()
   at Coveo.AbstractLayer.FieldManagement.AdminModuleFieldsHandler.CreateCompleteFieldConfigs(KeyedSet`2 p_FieldInfos, String p_FieldSetName, ForeignKeysConfiguration p_ForeignKeysConfiguration)
   at Coveo.AbstractLayer.FieldManagement.AdminModuleFieldsHandler.UpdateFieldSetAndFields(String p_FieldSetName, String p_IndexName, ForeignKeysConfiguration p_ForeignKeysConfiguration)
   at Coveo.AbstractLayer.Communication.CES.AdminModule.SetUpRequirements(String p_ServerUrl, String p_TargetSite, ForeignKeysConfiguration p_ForeignKeysConfiguration, IList`1 p_RankingIgnoredFields)
   at Coveo.AbstractLayer.Communication.CES.CESCommunication.InitializeAdminModule(String p_ServerUrl, String p_TargetSite, ForeignKeysConfiguration p_ForeignKeysConfiguration, IList`1 p_RankingIgnoredFields)
   at Coveo.SearchProvider.ProviderIndexBase.InitializeAdminModule()
   at Coveo.SearchProvider.ProviderIndexBase.PerformRebuild(IProviderUpdateContext p_Context, Action`1 p_CrawlerAction)
   at Coveo.SearchProvider.ProviderIndexBase.Rebuild(IndexingOptions p_IndexingOptions, IProviderUpdateContext p_Context, Action`1 p_CrawlerAction)
   at Coveo.SearchProvider.ProviderIndex.Rebuild()
   --- End of inner exception stack trace ---
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
   at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters)
   at (Object , Object[] )
   at Sitecore.Pipelines.CorePipeline.Run(PipelineArgs args)
   at Sitecore.Jobs.Job.ThreadEntry(Object state)
3 Replies
Gravatar for

Answer by Luc Bergeron, May 26, 2015 8:19 AM


I would suggest to run the "ShowConfig.aspx" page to get the effective Sitecore configuration and search for occurrences of the "master" database. I guess some search index is still referring to it. Here is the path of the "ShowConfig.aspx" page (http://yourInstance/sitecore/admin/showconfig.aspx).

I hope this helps

Gravatar for

Comment by Darko Markovic, May 26, 2015 3:13 PM

Thank you for answer. I find a lot of places where master has referenced but in node node which describe master index has commented

Do you have some suggestions which nodes I need to comment where master appear? Maybe I can send my showconfig.aspx file.

Gravatar for

Comment by Luc Bergeron, May 26, 2015 4:00 PM

The SwitchMasterToWeb.config file removes many things. But any remaining reference to the master database could break something on a CD.

The include files are processed in alphabetical order. Maybe the SwitchMasterToWeb file is processed too soon. Do you have any custom include file that could be processed after the SwitchMasterToWeb.config file? You can try to rename the file for zSwitchMasterToWeb.config or put it in a subfolder and see if you get less references to the master database left.

Let me know how it goes

Gravatar for

Answer by abhisfortitude, Jun 8, 2015 3:15 PM

We ran into similar issue and here is what we did: 1) In /Include folder, create a new folder and rename is something like zzzzLastConfig and moved the default Sitecore Out of the box, SwitchMasterToWeb.config into this folder. 2) Removed reference to Coveo Master Index from CD by adding following transformation to SwitchMasterToWeb.config

<configuration type="Coveo.SearchProvider.Configuration.CoveoSearchConfiguration, Coveo.SearchProvider">
      <!-- PATCH: Remove coveo master index (note: uses syncMaster strategy and the only indexed locations are in master, so I assume it should go) -->
      <index id="YOUR_COVEO_MASTER_INDEX">
        <patch:delete />
Gravatar for

Answer by howejr, Jun 8, 2015 4:26 PM

I think I had a similar issue a while back.

See if the following helps:

In Step 2F

You remove your index definitions except for the "pub" database. This error was caused by the combination of the removal of the "sitecorecoreindex" definition from this step and the reference to it in the xActiveCommerce.ContentSearch.Config file:

<index id="Coveo_core_index"> 
  <patch:attribute name="id">sitecore_core_index</patch:attribute> 

Either commenting out the above mentioned section of the config file or adding the index definition back into the Coveo.SearchProvider.config file stopped the error. I ended up adding the index back into the Coveo.SearchProvider.config file.

Gravatar for

Comment by yuralee, Jul 14, 2015 3:11 PM

I'm afraid I'm still getting this error message. My coveo.searchprovider.config file only has references to the pub index, like mentioned above. What else can I do?

Ask a question