Gravatar for dan@getfishtank.ca

Question by Dan Cruickshank, Mar 13, 2015 9:54 AM

COMException: Object is invalid - WebConnector

Hey everyone!

Using the Web Connector on CES 7.0 x64 Build 6607.0 to index another source. Coveo For Sitecore has been up and running successfully.

In "dev" and "qa" environments everything works. But on the "staging" and "production" when I click start to run the web crawler I get the following error on both servers.

System.Runtime.InteropServices.COMException (0x80040216): The object is invalid. 
at Coveo.CES.Interops.CESAdmin.ISource.Refresh(RefreshTypeEnumeration p_RefreshType) 
at Coveo.CES.Admin.CesSource.Refresh(RefreshType p_RefreshType) 
at Coveo.CES.Web.Admin.Index.Sources.Source.BTNStartSource_Click(Object sender, EventArgs e) 
at System.Web.UI.WebControls.LinkButton.OnClick(EventArgs e) 
at System.Web.UI.WebControls.LinkButton.RaisePostBackEvent(String eventArgument) 
at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) 
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) 

To my knowledge, I've set up Coveo identically on each server. What could be the root cause of that error?

I don't have full control of the servers so I'm not sure what would be enabled / disabled within them. While the error was occurring the URL's could be reach from a web browser on the server.

And now this morning, "prod" is working, "staging" isn't. And all I haven't changed anything. Any insights into this would be great.

Gravatar for jflheureux@coveo.com

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

How did you configure the web source on your environments? Manually through the CES Administration Tool or by copying CES config file sections from one server to another?

Gravatar for dan@getfishtank.ca

Comment by Dan Cruickshank, Mar 13, 2015 10:05 AM

Manually. Each CES environment is crawling a different URL and within the instances there are different users/passwords and things. So I had my steps and went screen-to-screen copying everything.

1 Reply
Gravatar for jflheureux@coveo.com

Answer by Jean-François L'Heureux, Mar 13, 2015 10:10 AM

I think this kind of error may happen when some CES configuration settings become very long. In the CES Administration Tool, can you give me the number of "Field Set" you have in the Configuration/Fields section?

Gravatar for jflheureux@coveo.com

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

This error indicates that a configuration object is invalid in the Administration Tool memory. Recycling the AppPool of the Administration Tool will create new valid configuration objects. Automatic IIS recycling is probably the reason why your "prod" environment started to work without change.

Gravatar for dan@getfishtank.ca

Comment by Dan Cruickshank, Mar 13, 2015 10:21 AM

Whoa. For individual fields sets there are 46. I see about 12 that I know could be deleted. The server have looks like it was created by cloning. Web Connector is using the Default Scheme with 2 added fields + preconversion script.

Default Scheme
The default fields set.
Field set for Coveo_core_index - CALCMSPA-domain
Field set for Coveo_core_index - CALCMSPA-domain
Field set for Coveo_core_index - CALCMSPCD1-domain
Field set for Coveo_core_index - CALCMSPCD1-domain
Field set for Coveo_core_index - CALCMSPCD2-domain
Field set for Coveo_core_index - CALCMSPCD2-domain
...
Gravatar for jflheureux@coveo.com

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

Each Sitecore database (Web, Master, Core…) of each Sitecore instance have its own fields set. Also, when you change the <SourceName> of an index in Coveo.SearchProvider.config file, new fields sets and sources are created but the old ones aren't automatically deleted.

Each fields set have a large list of facet fields, multi-value facet fields and sort fields. The concatenation of all those fields names is stored in the CES configuration. If it becomes too long, it may cause the kind of error you experienced in the Administration Tool.

Gravatar for jflheureux@coveo.com

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

Deleting old and unused fields sets and sources is a best practice. This will reduce the delay it takes to commit each configuration change.

Unfortunately, deleting a fields set doesn't remove its fields from the facet fields, multi-value facet fields and sort fields lists in the CES configuration because some indexed documents may still use those fields. I asked the developers to implement a cleaning of those fields lists. This may be included in a future release of CES.

Gravatar for dan@getfishtank.ca

Comment by Dan Cruickshank, Mar 13, 2015 10:38 AM

so ya - with the 3 prods and then the "pub" index are going to have quite a few fieldsets. :)

There are many other orphaned field sets - server looks to be cloned from previous environments down stream. I assume that's why it has dev, test, uat field sets in it as well.

Plan of action - delete extra field sets, try again. Thank you very much for your help Jean-François.

Gravatar for jflheureux@coveo.com

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

Don't forget to recycle the Administration Tool IIS AppPool if it doesn't work. I think the configuration object will still be in an invalid state until you recycle the AppPool.

Ask a question