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.

1 Answer 1

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?

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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