Gravatar for

Question by Daniel Reedy, Nov 30, 2015 5:55 PM

invalid certificate for CoveoSearchService

We are running Sitecore 7.2 & Coveo for Sitecore 3.0 March 2015 in Production, so I installed the same version to my local Windows 7 box. I opted for the everything-on-one-machine model. All installations seemed to go well. However, when I try to build the master index from Sitecore Control Panel, I get the error below.

fwiw, the rest endpoint url (http://localhost:8080/rest/search?q=) yields this json response:

"statusCode" : 401,
"message" : "Bad credentials",
"type" : "BadCredentialsException",

also, I found that this CoveoSearchService url throws certificate errors in the browser: https://localhost:52810/7.0/CoveoSearchService

Job started: Index_Update_IndexName=sitecore_master_index|#Exception: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> **RabbitMQ.Client.Exceptions.BrokerUnreachableException: None of the specified endpoints were reachable** ---> RabbitMQ.Client.Exceptions.PossibleAuthenticationFailureException: Possibly caused by authentication failure ---> RabbitMQ.Client.Exceptions.OperationInterruptedException: The AMQP operation was interrupted: AMQP close-reason, initiated by Library, code=541, text="Unexpected Exception", classId=0, methodId=0, cause=System.IO.IOException: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host. ---> System.Net.Sockets.SocketException: An existing connection was forcibly closed by the remote host
   at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size)
   --- End of inner exception stack trace ---
   at RabbitMQ.Client.Impl.Frame.ReadFrom(NetworkBinaryReader reader)
   at RabbitMQ.Client.Impl.SocketFrameHandler_0_9.ReadFrame()
   at RabbitMQ.Client.Impl.ConnectionBase.MainLoopIteration()
   at RabbitMQ.Client.Impl.ConnectionBase.MainLoop()
   at RabbitMQ.Client.Impl.SimpleBlockingRpcContinuation.GetReply()
   at RabbitMQ.Client.Impl.ModelBase.ConnectionStartOk(IDictionary clientProperties, String mechanism, Byte[] response, String locale)
   at RabbitMQ.Client.Impl.ConnectionBase.StartAndTune()
   --- End of inner exception stack trace ---
   at RabbitMQ.Client.Impl.ConnectionBase.StartAndTune()
   at RabbitMQ.Client.Framing.Impl.v0_9_1.Connection.Open(Boolean insist)
   at RabbitMQ.Client.Impl.ConnectionBase..ctor(ConnectionFactory factory, Boolean insist, IFrameHandler frameHandler)
   at RabbitMQ.Client.Framing.Impl.v0_9_1.ProtocolBase.CreateConnection(ConnectionFactory factory, Boolean insist, IFrameHandler frameHandler)
   at RabbitMQ.Client.ConnectionFactory.FollowRedirectChain(Int32 maxRedirects, IDictionary connectionAttempts, IDictionary connectionErrors, AmqpTcpEndpoint[]& mostRecentKnownHosts, AmqpTcpEndpoint endpoint)
   --- End of inner exception stack trace ---
   at RabbitMQ.Client.ConnectionFactory.CreateConnection(Int32 maxRedirects)
   at Coveo.AbstractLayer.Communication.Queue.RabbitMqConnectionFactory.CreateConnection()
   at Coveo.AbstractLayer.Communication.Queue.RabbitMqCommunication.Connect()
   at Coveo.AbstractLayer.Communication.Queue.QueueCommunication.Connect()
   at Coveo.AbstractLayer.Communication.CES.CESCommunication.Initialize()
   at Coveo.SearchProvider.AbstractProviderUpdateContext..ctor(ISearchIndexSummary p_IndexSummary, ICESCommunication p_Communication)
   at Coveo.SearchProvider.ProviderUpdateContext..ctor(ISearchIndex p_Index, ICESCommunication p_Communication)
   at Coveo.SearchProvider.ProviderIndex.CreateUpdateContext()
   at Coveo.SearchProvider.ProviderIndex.<Rebuild>b__44()
   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)
1 Reply
Gravatar for

Answer by Jean-François L'Heureux, Nov 30, 2015 6:47 PM


You seem to have a lot of errors in your Coveo for Sitecore installation.

First, it is normal that the Coveo Search Service displays a certificate problem when you access it from a browser. This is because this service is secured by a certificate generated by Coveo Enterprise Search and you don't use this certificate for the browser connection to the service. When this service is used by Coveo for Sitecore or the Coveo Search API, they use the certificate to initialize the connection and have no problems. If you open the Coveo Diagnostic Page in your Sitecore instance, is the Coveo Search Service test green or red?

Secondly, for the Coveo Search API REST endpoint "bad credentials" error, it can be two different things I think:

  1. Either you installed the Coveo Search API without checking the "This installation is part of a Sitecore integration" which adds the allowImpersonate: true configuration to the sample application of the config.yml file.
  2. Either the application secret in your config.yml file doesn't match the one in your Coveo.SearchProvider.Rest.config file.

Lastly, the RabbitMQ error. I think your Coveo.SearchProvider.config file <QueueUri>, <QueueUsername> or <QueuePassword> element value is not valid. Check that the Queue uri uses the localhost hostname, and verify the username and password. You must use the same username and password that you choose when installing CES locally. You can use the Sitecore Control Panel > Coveo Search > Configuration > Indexing Queue Connection wizard to check the values and change them (see Configuring the Coveo for Sitecore Indexing Queue Connection).

Gravatar for

Comment by Daniel Reedy, Dec 1, 2015 12:22 PM

Thank you for the explanations. I forgot about the Diag. Page:|

Coveo Search Web Service is green.

  1. I think I did select "This installation is part of a Sitecore integration", as evidenced by the fact that my config.yml has [allowImpersonate: true]
  2. My app secrets match.

There are a couple reds:

(a) Coveo Security Provider: No security provider was found with name 'Sitecore Security Provider for LAD1014022-CMSDev2' on instance default I don't recall anything in the instructions about configuring Sitecore Security Provider. That name looks like a dynamic name of -.

(b) RabbitMQ: None of the specified endpoints were reachable I just went with the default creds: guest/guest. Are you saying the the Rabbit creds & Sitecore creds have to be the same?

Gravatar for

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

(a) The security provider will be automatically created by Coveo for Sitecore on the first successful item indexing. Don't worry about this one yet.

(b) The RabbitMQ and Sitecore credentials are different. When installing CES, you are asked to change the RabbitMQ default credentials it you want. You may have installed CES (and RabbitMQ) with the default guest/guest credentials. You can validate by going to http://localhost:15672 and trying to log with guest/guest. You need to set the same credentials in the <QueueUsername> and <QueuePassword> nodes of the Coveo.SearchProvider.config file by using the "Control Panel > Coveo Search > Configuration > Indexing Queue Connection wizard" as I explained in my other comment. Also make sure the Queue uri is set to amqp://localhost:5682 since you installed CES (and RabbitMQ) locally. Also make sure that the "RabbitMQ for Coveo" service is started in Windows.

Gravatar for

Comment by Daniel Reedy, Dec 4, 2015 7:42 PM

I just uninstalled everything, and purged the following folders:

  • C:\CES7\*.*
  • \CMS\Website\bin\Coveo.*.dll
  • \CMS\Website\App_Config\Include\Coveo.*.*

…then reinstalled CES, Coveo Search API, &Coveo for Sitecore. I came to the same impasse :|

I cannot login to RabbitMQ (http://localhost:15672/) as guest/guest. I installed with those default creds, and even updated them via Control Panel, but login still fails.

Seems like a simple test. This makes me wonder if there are port restrictions on my pc… so I have an inquiry into my security guys here. In the meantime, is there anything else I can troubleshoot for this RabbitMQ problem? I can't find any relevant logs to scan.

Gravatar for

Comment by Jean-François L'Heureux, Dec 7, 2015 3:18 PM

The RabbitMQ logs are located at C:\Program Files\Coveo Enterprise Search 7\Third-Party\RabbitMQ for Coveo\log. You might find the reason why the connection is refused in those.

If you cannot login to RabbitMQ with guest/guest, it means that your RabbitMQ configuration wasn't removed from the system between the installations.

When uninstalling CES, it doesn't remove the existing RabbitMQ configuration. To remove it from the system, you need to purge the following folder: C:\Program Files\Coveo Enterprise Search 7\Third-Party\RabbitMQ for Coveo.

You can also purge the entire Coveo Enterprise Search installation folder if you wish: C:\Program Files\Coveo Enterprise Search 7.

I hope this helps.

Gravatar for

Comment by Daniel Reedy, Dec 8, 2015 12:33 PM

That was it! After uninstalling Search API & CES, and clearing the respective program folders, I installed and connected to RabbitMQ.

Thank you!

Ask a question