Sitecore version: 8.2 Update-5
Mongodb version: 3.2.20
Connectionstring: mongodb://<dbuser>:<dbpassword>@xxx.fleet.mlab.com:111,xxx:111/<dbname>?replicaSet=xxx&ssl=true
We have a dedicated Mongodb cluster at mlab
and trying to get this to work with Sitecore. The server has connection to the database, I tested it with nosqlclient (https://github.com/nosqlclient/nosqlclient) and the connection was successful. When I try this with the Sitecore application then I'm getting the following error:
Message: A timeout occured after 30000ms selecting a server using CompositeServerSelector{ Selectors = WritableServerSelector, LatencyLimitingServerSelector{ AllowedLatencyRange = 00:00:00.0150000 } }.
Client view of cluster state is { ClusterId : "1", ConnectionMode : "ReplicaSet", Type : "ReplicaSet", State : "Disconnected", Servers : [{ ServerId: "{ ClusterId : 1, EndPoint : "Unspecified/xxx:111" }", EndPoint: "Unspecified/xxx:111", State: "Disconnected", Type: "Unknown" }] }.
Source: MongoDB.Driver.Core
at MongoDB.Driver.Core.Clusters.Cluster.ThrowTimeoutException(IServerSelector selector, ClusterDescription description)
at MongoDB.Driver.Core.Clusters.Cluster.WaitForDescriptionChangedHelper.HandleCompletedTask(Task completedTask)
at MongoDB.Driver.Core.Clusters.Cluster.WaitForDescriptionChanged(IServerSelector selector, ClusterDescription description, Task descriptionChangedTask, TimeSpan timeout, CancellationToken cancellationToken)
at MongoDB.Driver.Core.Clusters.Cluster.SelectServer(IServerSelector selector, CancellationToken cancellationToken)
at MongoDB.Driver.Core.Bindings.WritableServerBinding.GetReadChannelSource(CancellationToken cancellationToken)
at MongoDB.Driver.Core.Bindings.ReadWriteBindingHandle.GetReadChannelSource(CancellationToken cancellationToken)
at MongoDB.Driver.Core.Operations.FindOperation`1.Execute(IReadBinding binding, CancellationToken cancellationToken)
at MongoDB.Driver.MongoCollection.ExecuteReadOperation[TResult](IReadOperation`1 operation, ReadPreference readPreference)
at MongoDB.Driver.MongoCollection.FindOneAs[TDocument](FindOneArgs args)
at Sitecore.Analytics.Data.DataAccess.MongoDb.MongoDbCollection.<>c__DisplayClass2a`1.<FindOneAs>b__29()
at Sitecore.Analytics.Data.DataAccess.MongoDb.MongoDbCollection.Execute(Action action, ExceptionBehavior exceptionBehavior)
at Sitecore.Analytics.Data.DataAccess.MongoDb.MongoDbCollection.FindOneAs[TDocument](IMongoQuery query, ExceptionBehavior exceptionBehavior)
at Sitecore.Analytics.Data.DataAccess.MongoDb.MongoDbContactStorage.LoadContactIdentifier(ID id)
at Sitecore.Analytics.Data.DataAccess.MongoDb.MongoDbDataAdapterProvider.LoadContactIdentifierValue(ID contactId)
at Sitecore.Analytics.Data.DataAccess.MongoDb.MongoDbDataAdapterProvider.TryLoadContact(ID id, IContactFactory factory, LeaseOwner leaseOwner, TimeSpan leaseDuration)
at Sitecore.Analytics.Data.ContactRepository.TryLoadContact(Guid id, LeaseOwner leaseOwner, TimeSpan leaseDuration)
at Sitecore.Analytics.Tracking.ContactManager.TryLoadContact(Guid contactId, Int32 lockDurationMinutes, Boolean exclusive)
at Sitecore.Analytics.Tracking.ContactManager.TryLoadContact(Guid contactId, Boolean exclusive)
at Sitecore.Analytics.Pipelines.EnsureSessionContext.LoadContact.Process(InitializeTrackerArgs args)
at (Object , Object[] )
at Sitecore.Pipelines.CorePipeline.Run(PipelineArgs args)
at Sitecore.Pipelines.DefaultCorePipelineManager.Run(String pipelineName, PipelineArgs args, String pipelineDomain)
at Sitecore.Analytics.DefaultTracker.EnsureSessionContext()
at Sitecore.Analytics.Pipelines.CreateTracker.GetTracker.Process(CreateTrackerArgs args)
at (Object , Object[] )
at Sitecore.Pipelines.CorePipeline.Run(PipelineArgs args)
at Sitecore.Pipelines.DefaultCorePipelineManager.Run(String pipelineName, PipelineArgs args, String pipelineDomain)
at Sitecore.Analytics.Tracker.Initialize()
&
is necessary within the ConnectionStrings.config, otherwise IIS complains about it