1

After configuring Sitecore 9.0.1, the XP is running fine but am getting the below XDB error in the log. I checked the TRUST certificates, database configuration and the configurations in the connection string file. There are no errors displayed when the Experience Analytics / EXM is loaded. But the below error is logged and the analytics data is not loaded. analytics

  [Error] Sitecore.XConnect.Operations.GetEntityOperation`1[Sitecore.XConnect.DeviceProfile]: Sitecore.Xdb.Collection.Failures.ScaledDatabaseConfigurationException: Scaled database was not configured properly: the range shard map has to be configured.
       at Sitecore.Xdb.Collection.Data.SqlServer.Configuration.ElasticScaleConnectionManager.GetRangeShardMap(String rangeShardMapName)
       at Sitecore.Xdb.Collection.Data.SqlServer.Configuration.ElasticScaleConnectionManager.<>c__DisplayClass37_0.<GetRangeMappings>b__0()
       at System.Lazy`1.CreateValue()
       at System.Lazy`1.LazyInitValue()
       at Sitecore.Xdb.Collection.Data.SqlServer.Configuration.MemoryCacheManager.AddOrGetExistingFromCache[T](String key, Func`1 valueFactory)
       at Sitecore.Xdb.Collection.Data.SqlServer.Configuration.ElasticScaleConnectionManager.MapKeysToShards[TPartitionKey,TEntityKey](String rangeShardMapName, IReadOnlyCollection`1 keys)
       at Sitecore.Xdb.Collection.Data.SqlServer.Managers.SqlDataRecordsManager`2.<GetAsync>d__49.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.Data.SqlServer.SqlDataProvider.<GetDeviceProfilesById>d__13.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 System.Linq.AsyncEnumerable.<>c__DisplayClass440_0`1.<<ToAsyncEnumerable>b__1>d.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---

Any suggestions would be greatly helpful.

  • can you try to connect on sql server with the collectionuser? you have the credentials on c:\inetpub\wwwroot\yourhostname.local.xconnect\App_Config\connectionstrings.config – Vlad Iobagiu Jan 4 at 8:24
  • yes. i checked with the 'collectionuser' and am able to connect to the database. – kk1076 Jan 4 at 12:47
  • What does the range definition look like in your shardmapmanager db? – Jason St-Cyr Jan 4 at 13:10
  • @Jason - could you please update how to check the range definition value in db. Thanks. – kk1076 Jan 5 at 14:50
  • 2
    Your shard map manager DB name looks something like 'Xdb.Collection.ShardMapManager'. You should have a ShardsGlobal table that shows which databases you have and on which servers/ports they are running on. ShardMapsGlobal table will show you different types of shards (Device, ContactId, etc.) ShardMappingsGlobal table will show you the ranges (MinValue/MaxValue). The error above indicates that somewhere in here, the shards have not been configured. – Jason St-Cyr Jan 6 at 14:57
1

[NOTE: Converting my comment to an answer as it seems no other individuals were able to go further on this]

The error is indicating that your shard map manager is not yet configured. You should validate what the range definition looks like in the ShardMapManager database.

Your shard map manager DB name looks something like 'Xdb.Collection.ShardMapManager'. You should have a ShardsGlobal table that shows which databases you have and on which servers/ports they are running on. ShardMapsGlobal table will show you different types of shards (Device, ContactId, etc.) ShardMappingsGlobal table will show you the ranges (MinValue/MaxValue). The error above indicates that somewhere in here, the shards have not been configured.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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