Gravatar for erkan.yildiz@avanade.com

Question by erkany, Feb 27, 2015 10:51 AM

There was an error in the Coveo Index Configuration.: Either the SitecoreUsername or SitecorePassword configuration value is invalid. Please enter valid credentials.

Hi,

Receiving this in a multiserver Sitecore environment. I checked the CD CoveoSearchProvider configs and verified I have the correct sitecore user name and password.

Any tips on further troubleshooting / debugging this? I have one CA and 3 CD servers

Coveo for sitecore version: Coveo for Sitecore 75 3.0 (863)

      <!-- The SitecoreUsername element allows to specify the user identity used by the CES security provider. -->
      <SitecoreUsername>sitecore\admin</SitecoreUsername>
      <SitecorePassword>b</SitecorePassword>

Line that fails on our customized CoveoSearchView.cshtml: Line 28: var bx = Model.ToCoveoFieldName("Brand") + "==" + brandName ;

--

Full Error:

[CoveoIndexConfigurationException: There was an error in the Coveo Index Configuration.: Either the SitecoreUsername or SitecorePassword configuration value is invalid. Please enter valid credentials.]
   Coveo.Framework.Configuration.CoveoIndexConfiguration.Validate() +374
   Coveo.SearchProvider.ProviderIndexBase.Initialize(IIndexDocumentPropertyMapper`1 p_DocumentTypeMapper) +2148
   Coveo.SearchProvider.ProviderIndex.Initialize() +131
   Coveo.SearchProvider.Configuration.CoveoSearchConfiguration.AddIndex(ISearchIndex p_Index) +433

[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.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments) +76
   System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) +211
   System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters) +35
   Sitecore.Configuration.Factory.AssignProperties(Object obj, Object[] properties) +832
   Sitecore.Configuration.Factory.AssignProperties(XmlNode configNode, String[] parameters, Object obj, Boolean assert, Boolean deferred, IFactoryHelper helper) +759
   Sitecore.Configuration.Factory.CreateObject(XmlNode configNode, String[] parameters, Boolean assert, IFactoryHelper helper) +296
   Sitecore.Configuration.Factory.CreateObject(String configPath, String[] parameters, Boolean assert) +666
   Sitecore.ContentSearch.ContentSearchManager.get_SearchConfiguration() +281
   Sitecore.ContentSearch.Pipelines.GetContextIndex.FetchIndex.GetContextIndex(IIndexable indexable, GetContextIndexArgs args) +69
   Coveo.SearchProvider.Processors.FetchCoveoIndex.GetContextIndex(IIndexable p_Indexable, GetContextIndexArgs p_Args) +45
   Sitecore.ContentSearch.Pipelines.GetContextIndex.FetchIndex.Process(GetContextIndexArgs args) +40
   (Object , Object[] ) +83
   Sitecore.Pipelines.CorePipeline.Run(PipelineArgs args) +365
   Sitecore.ContentSearch.Pipelines.GetContextIndex.GetContextIndexPipeline.Run(ICorePipeline pipeline, GetContextIndexArgs args) +40
   Sitecore.ContentSearch.ContentSearchManager.GetIndex(IIndexable indexable) +94
   Coveo.UI.Helpers.FieldHelper.ToCoveoFieldName(IIndexable p_Indexable, String p_SitecoreField, Boolean p_UsePrefix) +240
   ASP._Page_Areas_GlobalComponents_Views_Shared_Global_Components_Search_EMSCoveoSearchView_cshtml.Execute() in c:\inetpub\wwwroot\EMSSTAGECDLB1\Website\Areas\GlobalComponents\Views\Shared\Global\Components\Search\EMSCoveoSearchView.cshtml:28
   System.Web.WebPages.WebPageBase.ExecutePageHierarchy() +280
   System.Web.Mvc.WebViewPage.ExecutePageHierarchy() +126
   System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage) +125
   System.Web.Mvc.Html.PartialExtensions.Partial(HtmlHelper htmlHelper, String partialViewName, Object model, ViewDataDictionary viewData) +167
   Sitecore.Mvc.Presentation.ViewRenderer.Render(TextWriter writer) +223

[InvalidOperationException: Error while rendering view: '/Areas/GlobalComponents/Views/Shared/Global/Components/Search/EMSCoveoSearchView.cshtml' (model: 'Sanofi.EMS.GlobalComponents.Custom.Coveo.CustomCoveoSearchResultsModel, Sanofi.EMS.GlobalComponents.Custom').]
   Sitecore.Mvc.Presentation.ViewRenderer.Render(TextWriter writer) +773
   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) +365
   Sitecore.Mvc.Pipelines.PipelineService.RunPipeline(String pipelineName, TArgs args) +186
   Sitecore.Mvc.Pipelines.Response.RenderPlaceholder.PerformRendering.Render(String placeholderName, TextWriter writer, RenderPlaceholderArgs args) +192
   (Object , Object[] ) +83
   Sitecore.Pipelines.CorePipeline.Run(PipelineArgs args) +365
   Sitecore.Mvc.Pipelines.PipelineService.RunPipeline(String pipelineName, TArgs args) +186
   Sitecore.Mvc.Helpers.SitecoreHelper.Placeholder(String placeholderName) +323
   Score.Data.Extensions.MvcExtensions.SitecoreHelper.DynamicPlaceholder(SitecoreHelper helper, String dynamicKey) +181
   ASP._Page_areas_ScoreBootstrapUI_views_shared_Containers_Page__Column1_cshtml.Execute() in c:\inetpub\wwwroot\EMSSTAGECDLB1\Website\Areas\ScoreBootstrapUI\Views\Shared\Containers\Page\_Column1.cshtml:13
   System.Web.WebPages.WebPageBase.ExecutePageHierarchy() +280
   System.Web.Mvc.WebViewPage.ExecutePageHierarchy() +126
   System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage) +125
   System.Web.Mvc.Html.PartialExtensions.Partial(HtmlHelper htmlHelper, String partialViewName, Object model, ViewDataDictionary viewData) +167
   Sitecore.Mvc.Presentation.ViewRenderer.Render(TextWriter writer) +223

[InvalidOperationException: Error while rendering view: '/areas/ScoreBootstrapUI/views/shared/Containers/Page/_Column1.cshtml' (model: 'Sitecore.Mvc.Presentation.RenderingModel, Sitecore.Mvc').]
   Sitecore.Mvc.Presentation.ViewRenderer.Render(TextWriter writer) +773
   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) +365
   Sitecore.Mvc.Pipelines.PipelineService.RunPipeline(String pipelineName, TArgs args) +186
   Sitecore.Mvc.Pipelines.Response.RenderPlaceholder.PerformRendering.Render(String placeholderName, TextWriter writer, RenderPlaceholderArgs args) +192
   (Object , Object[] ) +83
   Sitecore.Pipelines.CorePipeline.Run(PipelineArgs args) +365
   Sitecore.Mvc.Pipelines.PipelineService.RunPipeline(String pipelineName, TArgs args) +186
   Sitecore.Mvc.Helpers.SitecoreHelper.Placeholder(String placeholderName) +323
   ASP._Page_Areas_GlobalComponents_Views_Layouts_Main_cshtml.Execute() in c:\inetpub\wwwroot\EMSSTAGECDLB1\Website\Areas\GlobalComponents\Views\Layouts\Main.cshtml:66
   System.Web.WebPages.WebPageBase.ExecutePageHierarchy() +280
   System.Web.Mvc.WebViewPage.ExecutePageHierarchy() +126
   System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage) +125
   System.Web.Mvc.Html.PartialExtensions.Partial(HtmlHelper htmlHelper, String partialViewName, Object model, ViewDataDictionary viewData) +167
   Sitecore.Mvc.Presentation.ViewRenderer.Render(TextWriter writer) +223

[InvalidOperationException: Error while rendering view: '/Areas/GlobalComponents/Views/Layouts/Main.cshtml' (model: 'Score.Data.ViewModels.Base.ContentPage, Score.Data').]
   Sitecore.Mvc.Presentation.ViewRenderer.Render(TextWriter writer) +773
   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) +365
   Sitecore.Mvc.Pipelines.PipelineService.RunPipeline(String pipelineName, TArgs args) +186
   Sitecore.Mvc.Presentation.RenderingView.Render(ViewContext viewContext, TextWriter writer) +294
   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
Gravatar for jflheureux@coveo.com

Comment by Jean-François L'Heureux, Feb 27, 2015 11:44 AM

What's your Coveo for Sitecore version? Do you have encrypted SitecorePassword value? Do you have any other nested exception or exception just before/after this one in the Coveo for Sitecore logs?

Gravatar for erkan.yildiz@avanade.com

Comment by erkany, Feb 27, 2015 11:49 AM

Hi, I updated the question with all the info - could you check and let me know what else I can check?

1 Reply
Gravatar for jflheureux@coveo.com

Answer by Jean-François L'Heureux, Feb 27, 2015 5:19 PM

  1. Is this error happening only on your CDs?
  2. On the instances where you have the error, did you configure Sitecore to block login attempts? (e.g. Deleting /Website/sitecore/login or /Website/sitecore/shell/applications folders, Modifying settings…)
  3. On the instances where you have the error, can you give me the content of the sitecore/authentication node in ShowConfig?

On my CA instance, the sitecore/authentication node looks like this:

<sitecore>
  <authentication defaultProvider="forms">
    <providers>
      <clear/>
      <add name="forms" type="Sitecore.Security.Authentication.FormsAuthenticationProvider, Sitecore.Kernel"/>
    </providers>
  </authentication>
</sitecore>
Gravatar for erkan.yildiz@avanade.com

Comment by erkany, Mar 2, 2015 4:41 PM

hey, thank you for the response

  1. yes, the CA server publish/preview search page is working fine.
  2. I think we are blocking logins from CD servers - correct ( but not sure how team implemented it ). On the other hand this is same on our multiserver QA environment too and search works fine there.
  3. How can I get this for a specific CD server? When I created bindings on a CD server and viewed the site locally and tried to access /sitecore/admin/showconfig.aspx it showed me sitecore login page. I try to login but page does not accept username and password (sitecore/admin and b works on CA)
Gravatar for jflheureux@coveo.com

Comment by Jean-François L'Heureux, Mar 3, 2015 10:17 AM

  1. Ok.
  2. Are you sure login is disabled in your QA environment? Can you access the ShowConfig.aspx page on a QA CD server and log in successfully?
  3. The authentication section is defined in the Sitecore instance Web.config file. You can check there and hope it isn't patched by any other configuration file.
Ask a question