XConnect IndexWorker error “Tokens are incompatible, they have different set of shards.”

Recently, I had restored a “production” backup of the master and core databases from a Sitecore 9.0 Update-1 instance to my local SQL server installation. After that, the Sitecore log started filling up with the exception:

Sitecore.XConnect.XdbSearchUnavailableException Message: The HTTP response was not successful: InternalServerError.

Examining the log for IndexWorker located at \wwwroot\[prefix].xconnect\App_data\Logs, the following error was showing up:

Tokens are incompatible, they have different set of shards.

I came across this Stack Exchange thread here. However, even though I followed what was suggested, this error persisted.

After some digging, I find out that the List Manager application also stores synchronization tokens in each item located at /sitecore/system/List Manager/ListOperations. To my surprised, I had several items in my Sitecore instance with the sync token pointing to production server and shard databases.

Figure 1: List Manager List Operations

The solution was to update the sync token in each item with the sync token from my Solr installation. To find out what sync token is corresponding to your instance, in Solr, query the [prefix]_xdb index for id:xdb-index-token.

Figure 2: Solr sync token

After, fixing the sync token, the items from /sitecore/system/List Manager/ListOperations were deleted as the List Manager application processed each one.

Credits:

Photo by Josue Isai Ramos Figueroa on Unsplash

2 thoughts on “XConnect IndexWorker error “Tokens are incompatible, they have different set of shards.”

Leave a Reply

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

WordPress.com Logo

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

Google photo

You are commenting using your Google 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