Troubleshoot Contact Creation Issue in Sitecore

When creating contact in List Manager, you may face issues which block contact either been created or showing. Here are some scenarios of troubleshooting the issues.

1, Error occurred when adding a new contact

When checking server logs, you may find some error like below:

16652 10:29:40 ERROR [Sitecore Services]: HTTP POST


Exception Sitecore.XConnect.XdbCollectionUnavailableException: The HTTP response was not successful: Unauthorized

   at Sitecore.Xdb.Common.Web.Synchronous.SynchronousExtensions.SuspendContextLock[TResult](Func`1 taskFactory)

   at Sitecore.XConnect.Client.XConnectSynchronousExtensions.SuspendContextLock(Func`1 taskFactory)

From browser developer tool, we can see the same error and request payload:

{“Identifier”:””,”IdentifierSource”:””,”Email”:””,”FirstName”:”test firstname”,”LastName”:”test lastname”}

This type of error is mainly due to the Sitecore environment server and client certificates configuration which might be invalid or non-matched thumbprint value. It will cause other module malfunction too, such as Experience Analytics. Once this certificate related environment issue fixed, the contact creation issue should be gone.

2, Contact doesn’t show in the list

After contact created (blue bar with successful message) and wait even several hours, the contact still doesn’t show in the list.

Once we see blue bar with successful message, that means contact has been created and stored in database. Retrieval of contacts is through Sitecore xdb index. Most of the time, the issue is because of contact data not been indexed.

There is a windows service “xConnect Collection Search IndexWorker” which indexes contact data.

First, check the Solr version, make sure it is compatible to installed Sitecore. Sometime the old Solr version been used with non-matched schema.

Second, the xdb index might be wrong on shard data due to copying from another Solr instance, which is very common when creating Solr instances in a distributed environment. So we need to rebuild xdb index.

Sitecore Index Manager does provide interface to rebuild all indexes except xdb index.

Here are the steps to invoke the rebuild request command:

  • Go to the server where the xConnect Search Indexer is running and open a command line.
  • Go to the xConnect Collection Search IndexWorker folder: \App_Data\jobs\continuous\IndexWorker.
  • Run following command. The command registers a small document in the live core signaling that the rebuild should be started. The xConnect Search Indexer will notice the document and start the rebuild process.

Sitecore.XConnectSearchIndexer.exe -rr


Sitecore.XConnectSearchIndexer.exe -requestrebuild

After above troubleshooting, you should see the contact in the list successfully.

This entry was posted in Information Technology, Sitecore and tagged , , , , , , , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s