Cannot Connect to MongoDB with Sitecore

I am working on a Sitecore site (Sitecore 8 Update 2).

I installed MongoDB and I can connect to localhost: 27017 with Robomongo and MongoVUE, but that’s all I get.

Robomongo UI

I connected Sitecore to MongoDB using these connection strings:

<add name="analytics" connectionString="mongodb://localhost:27017/kbs_analytics" /> <add name="tracking.live" connectionString="mongodb://localhost:27017/kbs_tracking_live" /> <add name="tracking.history" connectionString="mongodb://localhost:27017/kbs_tracking_history" /> <add name="tracking.contact" connectionString="mongodb://localhost:27017/kbs_tracking_contact" /> 

But this is not like a link.

As far as I can tell, once I have the connection string, Sitecore should at least start creating some collections in the database. But this does not happen, and I do not receive error messages.

Does anyone know what might cause this, or what could I forget?

+5
source share
2 answers

Sitecore 8 Update 5 supports MongoDB 3.0.

For older versions:

Sitecore uses version MongoDB.Driver.dll 1.8.3.9 in the Sitecore 7.5 - 8.0 4 update, this does not work with MongoDB 3.

You can update C # Mongo drivers in Sitecore. See sitecore-on-mongodb-3-0-what-should-you-know

Or use MongoDB 2.6.x platform overview / xdb overview / software recommendations

+4
source

The key is to ensure that tracking is enabled on your Sitecore CD server. https://doc.sitecore.net/sitecore_experience_platform/80/xdb_configuration/configure_a_content_delivery_server

I think you do not need to specify the port number, the whole machine name is enough. By default, Sitecore uses 27017 as the port for connecting to MongoDB. Also make sure that the machine on which you installed MongoDB has opened this port 27017.

0
source

All Articles