Gravatar for nallen@nonlinear.ca

Question by nallen, Jun 9, 2015 12:31 PM

Forms Authentication Error - Fresh Installation in Sitecore 8

I have installed the following components:

  • Sitecore 8 Update 2 (local development machine)
  • CES 7.0 x64 7599 (remote coveo VM)
  • Coveo Search API 8.0.493 (remove coveo VM)
  • Coveo for Sitecore 80 3.0 1026 (local development machine)

I also enabled and configured the search provider and rest config files as instructed to do so when working with a remote installation of CES and the search API.

I installed Sitecore first, then CES, then the search API and finally the Coveo for Sitecore package. Now any window I try to open in Sitecore results in an error 500 and I see my log files flooded with:

ManagedPoolThread #8 09:57:50 ERROR An error while Initializing occurred
Exception: System.NullReferenceException
Message: Object reference not set to an instance of an object.
Source: System.Web
   at System.Web.Security.FormsAuthentication.SetAuthCookie(String userName, Boolean createPersistentCookie, String strCookiePath)
   at Sitecore.Security.Authentication.FormsAuthenticationProvider.Login(String userName, Boolean persistent)
   at Coveo.Framework.Configuration.CoveoIndexConfiguration.Validate()
   at Coveo.SearchProvider.ProviderIndexBase.Initialize(IIndexDocumentPropertyMapper`1 p_DocumentTypeMapper)

The Coveo for Sitecore installation also did not seem to provision a CES license because the admin panel for CES is still asking for a license.

Any help here would be much appreciated.

Update: Here is the exception got when trying to rebuild the indexes:

Job started: Index_Update_IndexName=Coveo_master_index|#Exception: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.ServiceModel.FaultException`1[System.ServiceModel.ExceptionDetail]: The starting address * is invalid. 

Server stack trace: 
   at System.ServiceModel.Channels.ServiceChannel.ThrowIfFaultUnderstood(Message reply, MessageFault fault, String action, MessageVersion version, FaultConverter faultConverter)
   at System.ServiceModel.Channels.ServiceChannel.HandleReply(ProxyOperationRuntime operation, ProxyRpc& rpc)
   at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
   at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
   at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)

Exception rethrown at [0]: 
   at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
   at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
   at Coveo.AdminService.AdminService.IAdminService.SourceInCollectionNoCleanup(CesMasterInformation p_Info, SourceConfig p_SourceConfig, String p_CollectionName)
   at Coveo.AdminService.AdminServiceClientWrapper.PerformAdminServiceCall(Action p_Action)
   at Coveo.AdminService.AdminServiceClientWrapper.CreateSource(SourceConfig p_SourceConfig, String p_CollectionName)
   at Coveo.AbstractLayer.Communication.CES.AdminModule.CreateSource(SourceConfig p_SourceConfig)
   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)

Update: Sitecore log file exception when rebuilding coveomasterindex

ManagedPoolThread #1 10:01:44 INFO  Job started: Index_Update_IndexName=Coveo_master_index
ManagedPoolThread #1 10:01:44 WARN  The index Coveo_master_index has already been initialized.
ManagedPoolThread #1 10:01:44 INFO  Using existing collection 'Sitecore Search Provider'.
ManagedPoolThread #1 10:01:45 INFO  Getting Sitecore fields with databases: master
ManagedPoolThread #1 10:01:45 INFO  Total Field Count : 1655, Actual Field Count : 976
ManagedPoolThread #1 10:01:47 INFO  Creating source 'Coveo_master_index - MACHINENAME-PROJECTNAME'.
ManagedPoolThread #1 10:01:48 ERROR An error while rebuilding occurred
Exception: System.ServiceModel.FaultException`1[[System.ServiceModel.ExceptionDetail, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]
Message: The starting address * is invalid. 
Source: mscorlib

Server stack trace: 
   at System.ServiceModel.Channels.ServiceChannel.ThrowIfFaultUnderstood(Message reply, MessageFault fault, String action, MessageVersion version, FaultConverter faultConverter)
   at System.ServiceModel.Channels.ServiceChannel.HandleReply(ProxyOperationRuntime operation, ProxyRpc& rpc)
   at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
   at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
   at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)

Exception rethrown at [0]: 
   at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
   at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
   at Coveo.AdminService.AdminService.IAdminService.SourceInCollectionNoCleanup(CesMasterInformation p_Info, SourceConfig p_SourceConfig, String p_CollectionName)
   at Coveo.AdminService.AdminServiceClientWrapper.PerformAdminServiceCall(Action p_Action)
   at Coveo.AdminService.AdminServiceClientWrapper.CreateSource(SourceConfig p_SourceConfig, String p_CollectionName)
   at Coveo.AbstractLayer.Communication.CES.AdminModule.CreateSource(SourceConfig p_SourceConfig)
   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)
2 Replies
Gravatar for vlambert@coveo.com

Answer by vince, Jun 9, 2015 12:39 PM

There is a troubleshooting guide relating this particular issue here: https://developers.coveo.com/display/SC201505/Problem+Accessing+the+Coveo+Admin+Service

And for the CES license, it will be filled up automatically when the indexing will start, based on the Coveo for Sitecore license you entered into Sitecore. Check this link for changing your license. You do not have anything to enter for CES directly.

Gravatar for nallen@nonlinear.ca

Comment by nallen, Jun 9, 2015 12:50 PM

Thanks for the quick response. I have verified that all of the required Coveo services are running on the remote vm. I checked the AdminServiceUri node on my local machine, it is set to http://servername/AdminService. I opened the url in a browser and got a 404 error. I logged onto the Coveo vm and went to http://localhost:80/AdminService and it says "This page can't be displayed". So this seems to be the problem but I'm not sure why that service would be unavailable?

Gravatar for jflheureux@coveo.com

Comment by Jean-François L'Heureux, Jun 9, 2015 1:08 PM

While installing CES, did you secure the Admin Service? If you did, you should change your <AdminServiceUri> to HTTPS and fill the <Username> and <Password> element values.

Gravatar for nallen@nonlinear.ca

Comment by nallen, Jun 9, 2015 3:58 PM

Ah yes, I did secure it. Now to get around the issue I re-installed CES without securing it and now I don't get that error anymore but I do get an error in the diagnostics page saying "No security provider was found with name 'Sitecore Security Provider for LOCALMACHINENAME-PROJECTNAME' on instance default"

I thought I should login to the CES admin panel to configure the security provider but I get a license error on the control panel "The license is invalid". It is my understanding that installing the Sitecore package provisions the license, this doesn't seem to have happened.

Gravatar for nallen@nonlinear.ca

Comment by nallen, Jun 9, 2015 3:59 PM

On the diagnostics page the REST endpoint is also returning (400) Bad Request…. at Coveo.SearchProvider.Applications.StateVerifier…

Gravatar for jflheureux@coveo.com

Comment by Jean-François L'Heureux, Jun 9, 2015 4:19 PM

The REST Endpoint and Sitecore Security Provider errors will disappear once you'll index your first item (rebuild or re-index tree).

All the CES and the Search API configuration is done just before indexing items. Every time you index items, the configuration is synchronized between Sitecore and CES. The CES sources, field sets, security provider and user identity will be automatically created by Coveo for Sitecore at indexing time. Same thing for the CES license. It will be updated automatically by Coveo for Sitecore at indexing time.

Gravatar for nallen@nonlinear.ca

Comment by nallen, Jun 9, 2015 4:40 PM

Ah ok, good to know thanks. I tried to rebuild the coveomasterindex using the index manager and I got an exception, which I assumed was related to the errors on the diagnostics page but now I know it is the other way around…

Job started: IndexUpdateIndexName=Coveomasterindex|#Exception: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.ServiceModel.FaultException`1[System.ServiceModel.ExceptionDetail]: The starting address * is invalid.

Gravatar for jflheureux@coveo.com

Comment by Jean-François L'Heureux, Jun 9, 2015 5:21 PM

Was there something else after this error message?

Can you open the CES Administration Tool and check whether the index is in read-only mode by any chance? Here's where to look for that information : https://onlinehelp.coveo.com/en/ces/7.0/administrator/togglingtheindexbetweentheread-writeandread-onlymodes.htm

The CES index needs at least 3GB of free space on the index disk. If there's not enough space, CES switch to read-only mode and such errors can happen.

Gravatar for nallen@nonlinear.ca

Comment by nallen, Jun 9, 2015 5:34 PM

The stack trace was too large for the comment box. I added it as an additional "answer" instead. I can't login to the CES admin tool because no index has happened yet so I get the invalid license message if I try to use any of admin console. There is 11gb free on the server

Gravatar for nallen@nonlinear.ca

Comment by nallen, Jun 9, 2015 5:38 PM

I just tried again to index the master db but this time I had the CES console open on the Coveo VM and a message popped up that said Invalid Crawler ID: CESCC.DotNetCrawler#Queue

Gravatar for jflheureux@coveo.com

Comment by Jean-François L'Heureux, Jun 9, 2015 5:39 PM

Thanks. I moved it in your original question for clarity.

If you get a CES source starting address exception while performing the CreateSource call, the license should be already updated in your CES instance and you should be able to acces the CES Administration Tool now.

If not, try an iisreset on both servers and retry the rebuild after.

Gravatar for jflheureux@coveo.com

Comment by Jean-François L'Heureux, Jun 9, 2015 5:47 PM

Do you have a Coveo for Sitecore free edition or enterprise edition license? It seems either:

  • The CES license enclosed in your Coveo for Sitecore enterprise edition license is missing the Queue connector.
  • The Queue connector DLL (Coveo.CES.CustomCrawlers.Queue.dll) is missing in your CES bin directory (C:\Program Files\Coveo Enterprise Search 7\Bin).
Gravatar for nallen@nonlinear.ca

Comment by nallen, Jun 10, 2015 8:44 AM

I am using Coveo for Sitecore free edition. I restarted IIS on both servers, the CES admin console still takes me to the /Configuration/License/License.aspx page and says "The license is invalid". I checked the bin folder on the Coveo server, Coveo.CES.CustomCrawlers.Queue.dll is there.

Gravatar for jflheureux@coveo.com

Comment by Jean-François L'Heureux, Jun 10, 2015 9:52 AM

To initialize the CES license, Coveo for Sitecore relies on an exception returned by CES.

Can you check the Sitecore logs for an error that contains the text "An exception occurred while retrieving the CES license. Probably because the license isn't set yet."? It should be followed by an exception. If you find it, please copy the entire exception in your original post.

I guess you tried to set the CES license in the Admin Tool with the Coveo for Sitecore license. Then, CES doesn't return the same exception as when the license was never set.

Gravatar for nallen@nonlinear.ca

Comment by nallen, Jun 10, 2015 10:07 AM

I added the Sitecore log to the original question… doesn't mention any license issues.

Yes I did try the Sitecore license on the CES panel just to see what would happen.

Gravatar for jflheureux@coveo.com

Comment by Jean-François L'Heureux, Jun 10, 2015 10:43 AM

The exception I look for isn't thrown at indexing time but when Coveo for Sitecore initializes itself. It should be near the beginning of the Sitecore log file. Anyway. I think you may have a license setup in CES but it turns out to be invalid instead of missing.

To clear the CES license, follow these steps:

  1. Stop the CES Service (there's a shortcut for this in the start menu).
  2. Delete the C:\Program Files\Coveo Enterprise Search 7\Doc\Instance\License.txt file.
  3. Start the CES Service (there's a shortcut for this in the start menu).
Gravatar for nallen@nonlinear.ca

Comment by nallen, Jun 10, 2015 4:56 PM

YES! That was the final problem. Once I cleared out the license, the index rebuild is now working and I can see that the license has been re-populated.

Thank you very much for your diligent responses.

Gravatar for jflheureux@coveo.com

Comment by Jean-François L'Heureux, Jun 10, 2015 5:45 PM

Wow, that was a long way to the solution! I'm glad it worked. You can than mark this answer as the accepted one.

I still do not understand why you had a probably invalid license file at that location.

Do you mind sending me your log files for analysis? Please include:

  • All the CES system logs (C:\CES7\Log\System_*.log)
  • All the Sitecore logs ([Your Sitecore instance path]\Data\logs\log.*.txt)

Thank you and have a great time with Coveo for Sitecore!

Gravatar for jflheureux@coveo.com

Answer by Jean-François L'Heureux, Jun 9, 2015 12:55 PM

Is your Sitecore admin user "sitecore\admin" and his password "b"? If that's not the case, you need to change the administrator credentials (see Configuring the Sitecore Credentials) to resolve this issue.

Gravatar for nallen@nonlinear.ca

Comment by nallen, Jun 9, 2015 12:56 PM

Yes my admin user is the default sitecore\admin "b"

Ask a question