sitecorecoveo

Sitecore Coveo Lost connection to RabbitMQ after rebuild


I have basic setup of coveo and guest connection to RabbitMQ on local host, but when I rebuild sitecore solution Coveo lost connection to RabbitMQ, I need manually connect via Indexing Queue Connection menu.

   <!-- Coveo search configuration -->
          <SearchCertificatePath>C:\CES7\Config\Certificates\cert-iis.p12</SearchCertificatePath>
          <SearchServiceUri>https://localhost:52810/7.0/CoveoSearchService</SearchServiceUri>
          <QueueUri>amqp://localhost:5682/</QueueUri>
          <QueueUsername>guest</QueueUsername>
          <EncryptDataOnQueue>false</EncryptDataOnQueue>

how to store passwords as well ?


Solution

  • Your question needs a little bit of clarification so I'll give answer for multiple things.

    First, it's not clear where you trigger the rebuild operation. Is it from the Sitecore Indexing Manager or from the Coveo Enterprise Search Administration Tool on a Queue source? The rebuild operation should always be triggered from the Sitecore Indexing Manager. Triggering a rebuild on a Queue source in the CES Admin Tool is useless because it just closes the read connection to RabbitMQ and reopens it.

    You mention that Coveo lost connection to RabbitMQ. Is it CES that lost connection to read the queued messages or Sitecore that lost the connection to send messages to RabbitMQ or both? At each Sitecore indexing operation (rebuild index, item added, item modified, item deleted, publish...), Coveo for Sitecore first updates the CES sources with the QueueUri, QueueUsername and QueuePassword stored in the Coveo.SearchProvider.config file. If the CES sources configuration did change, the read connections to RabbitMQ are closed and reopened. Then, Coveo for Sitecore connects to RabbitMQ and pushes the indexing messages.

    You mention that you have to set the Queue uri, username and password again from the Indexing Queue Connection Configuration Wizard. What are the values of the QueueUri, QueueUsername and QueuePassword elements before you do that operation? Are they already correct or are they reset to their default values or wrong values? It may indicate a problem in your deployment processes. Maybe the Coveo.SearchProvider.config file is overwritten periodically with wrong values for those elements.

    Lastly, Coveo for Sitecore stores the Queue and Sitecore passwords in an encrypted form directly in the QueuePassword and SitecorePassword elements of the Coveo.SearchProvider.config file. The passwords are encrypted with a key that is generated in your Sitecore instance \Data\Coveo\ConfigurationEncryptionKeys folder. You should check the existence of the RijndaelEncryptionKeys file in that folder.

    If you moved the Coveo for Sitecore configurations to another config file, the Sitecore control panel configuration wizards like the Indexing Queue Connection Configuration Wizard won't be able to write the new values to your custom configuration file.

    I hope this answers your question and resolves your problem.

    Jeff