Leiste mit Community-Erfolgen erweitern.

Submissions are now open for the 2026 Adobe Experience Maker Awards.

Mark Solution

Diese Konversation wurde aufgrund von Inaktivität geschlossen. Bitte erstellen Sie einen neuen Post.

GELÖST

Connecting AEM to mongodb replica set

Avatar

Level 3

Has anyone tried connecting AEM 6.0 to a MongoDB replica set? I'm not sure how to specify the replica set here:

-Doak.mongo.uri=mongodb://localhost:27017

That will only connect to one specific mongodb instance. It might be due to my lack of mongodb knowledge, but any extra documentation around this installation would be great.

Thanks.

1 Akzeptierte Lösung

Avatar

Korrekte Antwort von
Level 3

I think I found the information here:

Although it would still be nice if someone could give me an example here as well. Or if documentation was updated to explain how to connect to replica set.

Lösung in ursprünglichem Beitrag anzeigen

5 Antworten

Avatar

Korrekte Antwort von
Level 3

I think I found the information here:

Although it would still be nice if someone could give me an example here as well. Or if documentation was updated to explain how to connect to replica set.

Avatar

Level 10

Avatar

Level 3

Thanks but that post doesn't explain how to connect to a replica set. Only to an individual mongo instance. But I got it running now using hte documentation given in my earlier post.

Avatar

Level 4

Avatar

Ehemaliges Community-Mitglied

It is mentioned on this page: http://jackrabbit.apache.org/oak/docs/osgi_config.html#Mongo_Configuration

It's essentially comma-delimited. E.g. -Doak.mongo.uri=mongodb://localhost:27017,localhost:27018
(You can certainly add more than two instances.)

The example on the above page also gives you some hints about configuring one instance as preferred for writes with the the other as preferred for reads: mongodb://db1.example.net,db2.example.com?readPreference=secondary&readPreferenceTags=dc:ny,rack:1&readPreferenceTags=dc:ny&readPreferenceTags=&w=1&wtimeoutMS=10000