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 '19 at 8:24
  • yes. i checked with the 'collectionuser' and am able to connect to the database. – kk1076 Jan 4 '19 at 12:47
  • What does the range definition look like in your shardmapmanager db? – Jason St-Cyr Jan 4 '19 at 13:10
  • @Jason - could you please update how to check the range definition value in db. Thanks. – kk1076 Jan 5 '19 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 '19 at 14:57
2

[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.

| improve this answer | |
  • i'm having the same problem on my local instance,I checked the ShardMappingsGlobal table and the ShardsGlobal table but they are both completely empty. I also noticed that i only have DOTportal_Xdb.Collection.Shard0 database and the DOTportal_Xdb.Collection.Shard1 database is not there! would you advise what might be causing this issue? – AmiraElEwady Feb 23 at 14:16
  • Hi Amira, it seems you have an incomplete installation and one of your shards was not created. If your installation is not complete, you are likely to have several issues. You may need to look at the logs of your installation for what went wrong. Perhaps you ran out of disk space? I'm not certain, but it seems to be a different problem. You can also ask it as a new question once you have some details from your logs as to what happened. – Jason St-Cyr Feb 24 at 12:46

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.