1

I am trying to map Sitecore 9.1 with MongoDB.I have Provided all required settings but still getting an exception.

Message: xDB unavailable
Source: Sitecore.Analytics.XConnect
 at Sitecore.Analytics.XConnect.DataAccess.XConnectDataAdapterProvider.ExecuteWithExceptionHandling[T](Func`2 func)
 at Sitecore.Analytics.XConnect.Diagnostics.PerformanceCounters.OperationPerformanceMonitorExtensions.Monitor[T](OperationPerformanceMonitorBase monitor, Func`1 operation)
 at Sitecore.Analytics.XConnect.DataAccess.Dictionaries.XConnectDeviceDictionary.LoadAs[T](Object key)
 at Sitecore.Analytics.DataAccess.Dictionaries.AverageCounterExtensions.MeasureMilliseconds[T](AverageCounter counter, Func`1 func)
 at Sitecore.Analytics.DataAccess.Dictionaries.ReferenceDataDictionary`2.Get(TKey key, LookupStrategy strategy)
 at Sitecore.Analytics.Pipelines.EnsureSessionContext.EnsureDevice.LoadDevice(Guid deviceId)

Nested Exception

Exception: Sitecore.XConnect.XdbCollectionUnavailableException
Message: {
"Message": "Operation failed: One or more dependencies failed",
"ExceptionMessage": "One or more dependencies failed",
"ExceptionType": "Sitecore.XConnect.Operations.DependencyFailedException",
"StackTrace": null,
"InnerException": {
  "Message": "An error has occurred.",
  "ExceptionMessage": "Keyword not supported: 'mongodb://localhost:27017/sc91instance2_collection?retrywrites'.",
  "ExceptionType": "System.ArgumentException",
  "StackTrace": "   at System.Data.SqlClient.SqlConnectionStringBuilder.GetIndex(String keyword)\r\n
}

My Mongo Db connectionstrings are:

<add name="session" connectionString="mongodb://localhost:27017/sc91instance2_session"/> 
  <add name="collection" connectionString="mongodb://localhost:27017/sc91instance2_collection?retryWrites=true"/> 

Please help me if anyone faced similar issue or anyone has some experience regrading this.

2

Based on the nested error message, it looks like your connection string has an invalid format. Your exception reads:

"ExceptionMessage": "Keyword not supported: 'mongodb://localhost:27017/sc91instance2_collection?retrywrites'.",

Have you tried without the 'retrywrites' portion in your connection string?

  • Yes, it throws similar exception in that case also. These connectionstrings work fine in another instance. – arun tiwari Jul 21 '19 at 10:55
  • Similar, but different? What is the error when you eliminate his portion? The nested exception is likely important to debug the issue – Jason St-Cyr Jul 22 '19 at 2:52

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.