Gravatar for yura.lee@avanade.com

Question by yuralee, Jun 23, 2015 12:57 PM

Error HRESULT E_FAIL has been returned from a call to a COM component.

Upgrading to the April 2015 release. Just installed the Coveo Search API and followed steps of installation. However, Coveo Search API isn't running (and will terminate unexpectedly). Looked into systems logs and looks like it can't find the license, even though it's there.

212301879468469611|ERROR|2015-06-23|16:17:51|0|class CGLFile::FileCannotOpenException: An error occurred while opening the read-only file "C:\Program Files\Coveo Enterprise Search 7\instance/License.txt". (The system cannot find the file specified. [0x00000002])|||

Does it have to do with the face that there's a </> instead of a <\>? Isn't that weird?

I think therefore, diagnostics is telling me there's a 500 on the security service and also a 503 on the REST endpoint.

3 Replies
Gravatar for yura.lee@avanade.com

Answer by yuralee, Jun 26, 2015 3:16 PM

Hi, so the error disappeared for a while but then reappeared again, which was weird. I looked at the Even Viewer and found this:

Request format is unrecognized for URL unexpectedly ending in '/GetVersion'.
at System.Web.Services.Protocols.WebServiceHandlerFactory.CoreGetHandler(Type type, HttpContext context, HttpRequest request, HttpResponse response)
at System.Web.Services.Protocols.WebServiceHandlerFactory.GetHandler(HttpContext context, String verb, String url, String filePath)
at System.Web.Script.Services.ScriptHandlerFactory.GetHandler(HttpContext context, String requestType, String url, String pathTranslated)
at System.Web.HttpApplication.MaterializeHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

https://<websitename>/sitecore modules/Web/Coveo/webservice/sitecorewebservice.asmx/GetVersion 
/sitecore modules/Web/Coveo/webservice/sitecorewebservice.asmx/GetVersion 
Gravatar for jflheureux@coveo.com

Comment by Jean-François L'Heureux, Jun 26, 2015 3:27 PM

This is indeed a weird behavior. GetVersion is an actual method on this webservice. It is only accessible in HTTP POST. When accessed in HTTP GET, ASP.Net throws this exact exception.

I have a look at what can be the cause of these HTTP GET calls and get back to you shortly.

Gravatar for yura.lee@avanade.com

Comment by yuralee, Jun 26, 2015 4:35 PM

thanks, looking forward to it. really appreciate your help.

Gravatar for yura.lee@avanade.com

Comment by yuralee, Jul 2, 2015 10:39 PM

were you able to find anything? any assistance on this issue would help a lot. thanks.

Gravatar for jflheureux@coveo.com

Comment by Jean-François L'Heureux, Jul 3, 2015 5:52 PM

Sorry for the delay. I just looked at the code and we always have called this method in HTTP POST. You said to have upgraded the Coveo Search API and Coveo for Sitecore products from the December 2014 release to the April 2015 release. I wonder if you have also upgraded Coveo Enterprise Search 7 to the April 2015 release (7.0.7599) prior to upgrading the other 2 products? It is mandatory for the Coveo Search API and Coveo for Sitecore to work properly to have CES upgraded first.

Gravatar for yura.lee@avanade.com

Comment by yuralee, Jul 5, 2015 10:39 PM

Yes from December to April. CES7 is also upgraded as well as the Search API and Coveo for Sitecore.

Gravatar for jflheureux@coveo.com

Comment by Jean-François L'Heureux, Jul 6, 2015 11:08 AM

What was the date and time of the error you found in the Windows event viewer? I doubt it is related to your error in the diagnostic page. To find the real problem, do the following:

  1. Note the actual date and time.
  2. Open the Coveo for Sitecore diagnostics page.
  3. Open the Sitecore logs and find the error related to the Coveo component that is in error (probably "Coveo Security Service") at the time the diagnostic page was opened.
  4. Open the Windows event viewer and find the error logged at the time the diagnostic page was opened.

Thanks

Gravatar for jflheureux@coveo.com

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

Did you get it working?

I learned today that this component is sometimes shown in a false positive error state. This happens when the diagnostic page is loaded from another computer than the Sitecore server itself. Is it your case?

Try to open a remote desktop session on the Sitecore server and loading the diagnostic page with the local URL of your Sitecore website http://YourInstanceName/sitecore%20modules/Web/Coveo/Admin/CoveoDiagnosticPage.aspx

Gravatar for yura.lee@avanade.com

Comment by yuralee, Jul 13, 2015 10:18 AM

I ended up uninstalling and reinstalling the entire Coveo package, so I haven't been getting the message anymore.

That would make sense, though. We've accessed the Sitecore server via our local machines, and through that we would also load the Diagnostics page. I've also noticed that if I load the diagnostics page from my local machine, the results would differ from when I open the page from the Sitecore server.

Gravatar for jflheureux@coveo.com

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

What is the user running the CES service? Is this user have permission to read/write the license file?

Gravatar for yura.lee@avanade.com

Comment by yuralee, Jun 23, 2015 1:36 PM

User is admin and shouldn't have a problem with read/write permissions.

Gravatar for jflheureux@coveo.com

Answer by Jean-François L'Heureux, Jun 23, 2015 2:53 PM

When you install CES and start the service for the first time, this is normal that there is no license. It will be set by Coveo for Sitecore at the first indexing operation.

When you install the Coveo Search API, its config.yml file isn't configured to connect to your local CES instance. This is why it stops when you try to start it. This is normal. It will be configured and started by Coveo for Sitecore at the first indexing operation.

After installing Coveo for Sitecore, if you open its diagnostic page, it is normal to see an error for the following 2 components because no indexing operation was performed yet in Sitecore:

  • Coveo Search REST Endpoint ()
  • Coveo Security Provider

The installation documentation of Coveo for Sitecore states that after installing the softwares, the next action is to rebuild your indexes (see Installing Coveo for Sitecore on a Single Host). At the first indexing operation (and all subsequent indexing operations too), Coveo for Sitecore will configure the Coveo Search API if it is not already running. It will also set the CES license if it cannot be found. It will then create or update the CES collection, sources, field sets, user identity and security provider automatically.

Then, if you refresh the Coveo for Sitecore diagnostic page, all the components should be green.

Gravatar for yura.lee@avanade.com

Comment by yuralee, Jun 23, 2015 4:53 PM

Ok, I rebuilt my indexes. I refreshed the diagnostics page but I'm still getting a 503 server unavailable error for Coveo Search REST Endpoint. I tried instancename/coveo/rest and got a "unable to connect to the remote server message". I started Coveo Search API via services but it seems to stop almost instantaneously after.

My rest.config file points to 8087 which is consistent with config.yml.

Anything else?

Gravatar for jflheureux@coveo.com

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

You can check the Coveo Search API logs in the C:\Program Files\Coveo Search API 8\logs folder. The reason of the failure to start should be indicated there. Maybe the port is already used by another application or your YML file has formatting problems. YML format is very picky. You should always use spaces instead of tabs. To define the port, you should do it in the http section like this:

http:
  port: 8087
Gravatar for yura.lee@avanade.com

Comment by yuralee, Jun 23, 2015 6:08 PM

So I see there that there's a space between http: and port:. Is that how the formatting should be? A space between every line?

Also, what do you mean by the port is already opened? As in it's already in use by something else? I've chosen 8087 specifically for REST endpoint.

Gravatar for yura.lee@avanade.com

Comment by yuralee, Jun 23, 2015 10:59 PM

I'm not sure if my YML has formatting problems since I haven't really touched it much except for editing the port.

What do you mean by the port is already opened?

Also, Coveo Search API still won't start. I changed my logon account to an admin (consistent to that of the Admin Service and Diagnostic Tool). I am still getting a 500 on the security service and also a 503 on the REST endpoint. Any other suggestions?

Gravatar for jflheureux@coveo.com

Comment by Jean-François L'Heureux, Jun 24, 2015 8:53 AM

Yes, I wanted to say "port already opened by another application". Sorry for the confusion.

Did you check the Coveo Search API logs as I suggested?

Gravatar for yura.lee@avanade.com

Comment by yuralee, Jun 24, 2015 10:02 AM

Yes, logs display an error… not sure what it means though:

01:27:11.747 [main] ERROR com.coveo.search.api.server.Main$ - Unhandled exception!
org.yaml.snakeyaml.parser.ParserException: while parsing a block collection; expected <block end>, but found Key;  in 'reader', line 27, column 4:
       secret: EMS Application Secret
       ^

So this is a formatting issue? Not sure where I went wrong with my config file

Gravatar for yura.lee@avanade.com

Comment by yuralee, Jun 24, 2015 10:02 AM

(contd) at org.yaml.snakeyaml.parser.ParserImpl$ParseBlockSequenceEntry.produce(ParserImpl.java:514) ~[coveo-search-api-server.jar:na] at org.yaml.snakeyaml.parser.ParserImpl.peekEvent(ParserImpl.java:158) ~[coveo-search-api-server.jar:na] at org.yaml.snakeyaml.parser.ParserImpl.checkEvent(ParserImpl.java:143) ~[coveo-search-api-server.jar:na] at org.yaml.snakeyaml.composer.Composer.composeSequenceNode(Composer.java:199) ~[coveo-search-api-server.jar:na]

Gravatar for yura.lee@avanade.com

Comment by yuralee, Jun 24, 2015 10:03 AM

at org.yaml.snakeyaml.composer.Composer.composeNode(Composer.java:153) ~[coveo-search-api-server.jar:na] at org.yaml.snakeyaml.composer.Composer.composeMappingNode(Composer.java:233) ~[coveo-search-api-server.jar:na] at org.yaml.snakeyaml.composer.Composer.composeNode(Composer.java:155) ~[coveo-search-api-server.jar:na] at org.yaml.snakeyaml.composer.Composer.composeDocument(Composer.java:122) ~[coveo-search-api-server.jar:na] at org.yaml.snakeyaml.composer.Composer.getSingleNode(Composer.java:105) ~[coveo-search-api-server.jar:na]

Gravatar for yura.lee@avanade.com

Comment by yuralee, Jun 24, 2015 10:03 AM

at org.yaml.snakeyaml.constructor.BaseConstructor.getSingleData(BaseConstructor.java:120) ~[coveo-search-api-server.jar:na] at org.yaml.snakeyaml.Yaml.loadFromReader(Yaml.java:481) ~[coveo-search-api-server.jar:na] at org.yaml.snakeyaml.Yaml.load(Yaml.java:412) ~[coveo-search-api-server.jar:na] at com.coveo.search.api.config.ConfigLoader$.loadFromYaml(ConfigLoader.scala:24) ~[coveo-search-api-server.jar:na]

Gravatar for yura.lee@avanade.com

Comment by yuralee, Jun 24, 2015 10:03 AM

at com.coveo.search.api.config.ConfigLoader$.loadFromFile(ConfigLoader.scala:16) ~[coveo-search-api-server.jar:na] at com.coveo.search.api.server.Main$.main(Main.scala:39) ~[coveo-search-api-server.jar:na] at com.coveo.search.api.server.Main.main(Main.scala) [coveo-search-api-server.jar:na]

Gravatar for jflheureux@coveo.com

Comment by Jean-François L'Heureux, Jun 24, 2015 11:36 AM

It seems a formatting issue to me. I am unable to reproduce the same error but the end of your config.yml file should look like this. There is a blank line between allowImpersonate and http.

applications:
  - name: Sample Application
    secret: EMS Application Secret
    allowImpersonate: true

http:
  port: 8087
Gravatar for yura.lee@avanade.com

Comment by yuralee, Jun 24, 2015 12:36 PM

Oh so I see the formatting has changed for the april package. Got it, thanks

Gravatar for jflheureux@coveo.com

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

Which version of the Coveo Search API you had before upgrading to the April 2015 release?

After fixing your YML file, re-index an item to have Coveo for Sitecore configure your Coveo Search API and start it.

Let me know if it works and if you have every components green in the diagnostic page. If everything is green, please mark this answer as the accepted one.

Thanks

Gravatar for yura.lee@avanade.com

Comment by yuralee, Jun 24, 2015 2:39 PM

I was using the December 2014 release. Everything is green except Coveo Security Provider even though I rebuilt my indexes. I'm getting a 500 error.

Gravatar for jflheureux@coveo.com

Comment by Jean-François L'Heureux, Jun 24, 2015 2:58 PM

Can you be more specific about the error please? What are the exception message and details? You can get the details by clicking on the "(Show details)" link at the end of the error message or by checking the Sitecore logs just after refreshing the diagnostic page.

Gravatar for yura.lee@avanade.com

Comment by yuralee, Jun 24, 2015 3:16 PM

5000 19:14:42 ERROR StateVerifier has encountered an error while verifying the component "Coveo Security Service". Exception: System.Net.WebException Message: The remote server returned an error: (500) Internal Server Error. Source: System at System.Net.HttpWebRequest.GetResponse() at System.Net.HttpWebRequest.GetResponse() at Coveo.SearchProvider.Applications.StateVerifier.<>cDisplayClass16.b15() at Coveo.SearchProvider.Applications.BaseVerifier.VerifyComponent(Func`1 pVerifyMethod, String pComponentName)

Gravatar for jflheureux@coveo.com

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

Check the Sitecore server Windows Event viewer application logs at 19:14 and look for ASP.Net or IIS errors. It should contain the details about the error returned by the "Coveo Security Service" (Not to be confused with Coveo Security Provider).

Ask a question