1

I'm attempting to get analytics working on a Sitecore 9.0 install. After various issues with connection strings being wrong, trackers not initialising I've got to a point where I'm fairly sure the xDB solr index isn't doing whatever it is it actually does.

So I've tried to rebuild it following these instructions:

https://doc.sitecore.com/developers/90/sitecore-experience-platform/en/rebuild-the-xdb-index-in-solr.html

Solr was actually having an issue with the index which already existed so I've created 2 new index's (xDB and xDB rebuild) and then updated the connection string and run the request rebuild command on XConnectSearchIndexer. But it errors :(

C:\inetpub\wwwroot\sc.xconnect\App_data\jobs\continuous\IndexWorker>XConnectSearchIndexer -rr
    Requesting rebuild.

Unhandled Exception: System.AggregateException: One or more errors occurred. ---> System.Net.Http.HttpRequestException: Response status code does not indicate success: 404 (Not Found).
       at System.Net.Http.HttpResponseMessage.EnsureSuccessStatusCode()
       at Sitecore.Xdb.Collection.Search.Solr.SolrWriter.d__18.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
       at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
       at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
       at Sitecore.Xdb.Collection.Search.Solr.SolrWriter.d__21.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
       at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
       at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
       at Sitecore.Xdb.Collection.Search.Solr.SolrWriter.d__20`1.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
       at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
       at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
       at Sitecore.Xdb.Collection.Search.Solr.SolrWriter.d__19`1.MoveNext()
       --- End of inner exception stack trace ---
       at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
       at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
       at System.Threading.Tasks.Task.Wait(TimeSpan timeout)
       at Sitecore.XConnect.Search.Indexer.IndexerAppDomainHost.IndexerHostAppDomainBridge.RequestRebuild() in C:\BA\147b0adf6c2580c7\code\Sitecore.XConnect.Search.Indexer\IndexerAppDomainHost.cs:line 170
       at Sitecore.XConnect.Search.Indexer.IndexerAppDomainHost.IndexerHostAppDomainBridge.RequestRebuild()
       at Sitecore.XConnect.Search.Indexer.Program.RequestRebuild() in C:\BA\147b0adf6c2580c7\code\Sitecore.XConnect.Search.Indexer\Program.cs:line 131
       at Sitecore.XConnect.Search.Indexer.Program.Main(String[] args) in C:\BA\147b0adf6c2580c7\code\Sitecore.XConnect.Search.Indexer\Program.cs:line 16
5
  • Have you checked the logs on the Solr server?
    – Richard Seal
    Commented Jul 10, 2019 at 13:46
  • 1
    It seems that Solr index is not found. Can you check if solrCore connection string is correct in xconnect_instance\App_Data\jobs\continuous\IndexWorker\App_Config\ConnectionStrings.config?
    – grg
    Commented Jul 10, 2019 at 13:46
  • 1
    Is your rebuild core named exactly like the SOLR core with _rebuild at the end. So if your xDB core is sitecore_xdb, the rebuild is sitecore_xdb_rebuild. Also verify the primary core name in the connectionstrings.config. It is the solrCore connection string.
    – Chris Auer
    Commented Jul 10, 2019 at 18:59
  • My solr core is called cg_xdb and there is another called cg_xdb_rebuild. In the connection string file the connection string is set to <add name="solrCore" connectionString="localhost:8983/solr/cg_xdb" /> If I try going to that in a browser then I get Problem accessing /solr/cg_xdb. Reason: Not found. If I go to localhost:8983/solr/#/cg_xdb then I get the core admin page. Should it be set to the later or is there another issue? Commented Jul 18, 2019 at 7:09
  • Have you setup Solr with HTTPS? Then, add https:// to the beginning of your connection string. Commented Jul 19, 2019 at 19:30

2 Answers 2

0

Run fiddler and then run the command.

This way you can see precisely what url the indexer is running against and what kind of post it is doing.

0

Turns out I was looking at the wrong connection string file.

The xConnect Site has a connectiong string located at:

\App_Config\ConnectionStrings.config

But the index worker you run to do a rebuild has it's own connectiong string at:

\App_data\jobs\continuous\IndexWorker\App_Config\ConnectionStrings.config

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.