Expand my Community achievements bar.

SOLVED

AEM 6.2 MongoDB(Enterprise V3.2.2) integration not working

Avatar

Level 3

Hi All,

I am in progress of developing an POC of AEM 6.2(with SP1) author cluster integrated with Mongodb (Enterprise v3.2.2) replica set . The goal which i want to achieve is create two AEM instances pointing to MongoDB replica (primary,secondary,Arbiter)

The issue which i am facing is First instance is coming up fine and able to login successfully and the second AEM instance has start up issues and i see jetty not coming up.


The steps which i followed are

MongoDB setup:

1. Create an Mongo DB replica , primary on 27017, secondary on 27018 and Arbiter on 27019. Started the mongo with

mongod --dbpath c:\POC-AEM-MONGOReplica\aem\aem-primary\mongo0\ --replSet aem6 --port 27017

mongod --dbpath c:\POC-AEM-MONGOReplica\aem\aem-secondary\mongo1\ --replSet aem6 --port 27018

mongod -dbpath c:\POC-AEM-MONGOReplica\aem\aem-secondary\mongo2_arb\ --replSet aem6 --port 27019

AEM Primary setup:

1. Unpack the AEM jar

2. add configuration org.apache.jackrabbit.oak.plugins.document.DocumentNodeStoreService.cfg to install folder under crx-quickstart folder

the configuration has updated with  mongouri=mongodb://localhost:27017,localhost:27018/?replicaSet=rs0, db=aem_mongo and other configs

3. started the AEM instance by running "java -jar aem6.2-author-p9001.jar -r crx3,crx3mongo"  from command line

4. All bundles are up and database has been created in Mongo DB and able to Login successfully.

AEM Secondary setup:

1. Unpack the AEM jar

2. add configuration org.apache.jackrabbit.oak.plugins.document.DocumentNodeStoreService.cfg to install folder under crx-quickstart folder

the configuration has updated with  mongouri=mongodb://localhost:27017,localhost:27018/?replicaSet=rs0, db=aem_mongo and other configs

3. started the AEM instance by running "java -jar aem6.2-author-p9002.jar -r crx3,crx3mongo"  from command line

4. Only few bundles are up and lots of errors in the logs and instance is not up.

*ERROR* [FelixStartLevel] ERROR: Bundle '154' Error starting launchpad:resources/install/0/com.adobe.cq.projects.core-0.2.80.jar

*ERROR* [FelixStartLevel] ERROR: Bundle '155' Error starting launchpad:resources/install/0/com.adobe.cq.projects.ui-0.2.2.jar

*ERROR* [FelixStartLevel] ERROR: Bundle '156' Error starting launchpad:resources/install/0/com.adobe.cq.projects.wcm.core-0.2.10.jar.....

......

*ERROR* [FelixStartLevel] ERROR: Bundle '283' Error starting launchpad:resources/install/0/cq-workflow-impl-6.0.26.jar

Caused by: java.lang.ClassNotFoundException: Unable to load class 'org.eclipse.jetty.io.WriteFlusher$1' because the bundle wiring for org.apache.felix.http.jetty is no longer valid

can you please let me know if i am missing any steps in configuring the steps.

1 Accepted Solution

Avatar

Level 3

if i use the vanila AEM 6.2 without Hotfx and SP1 it works fine. thanks for the support

9 Replies

Avatar

Level 1

Been a while since I've done this on 6.2, but I have a memory that one had to not only define the mongo stuff in the org.apache.jackrabbit.oak.plugins.document.DocumentNodeStoreService.cfg config file, but also the following two arguments on the java command line itself:

-Doak.mongo.uri=XXX -Doak.mongo.db=YYY

Avatar

Level 3

Hi edgarm,

thanks for the reply. i tried adding the mongo.uri and db details as arguments while starting the AEM still the second instance is not starting properly

java -jar aem6.2-author-p8001.jar -r crx3,crx3mongo -Doak.mongo.uri=mongodb://localhost:27017,localhost:27018 -Doak.mongo.db=aem_mongo_test

can you please let me know the steps you followed for the successful setup.

Avatar

Level 3

Hi Experts,

can you please check and let me know if i am missing any steps in order to execute successful AEM with MongoDB integration. 

Avatar

Level 3

if i use the vanila AEM 6.2 without Hotfx and SP1 it works fine. thanks for the support

Avatar

Level 1

I'll note here that you really want at least a more recent Oak Cumulative fix pack as you want a more recent version of oak for performance and stability. At least oak 1.4.10 is good. SP1 only raises the oak version to 1.4.6.

Also AEM/mongo performance is not as good as tarMK, and you will need to be using lots of caching on the AEM side to make performance more tolerable. On the one mongo installation I did, using an extra 6GB worth of configured RAM for caching in the mongo config file helped quite a bit as did changing the write and read concern settings for mongo in AEM.

Avatar

Level 1

Also, when bringing up the first AEM instance in the mongo cluster for the first time, I remember it took a long time for AEM to fully come up due to using mongo and the second instance must not be brought up until the first AEM instance is fully up. This was something like an hour when using high end mongo systems (but this was before altering caching and read/write concern settings so that would reduce the time).

Avatar

Level 1

Not familiar with  SSIS MongoDB but here is a possible resource.

All the things are discussed properly. Feel free to visit

Hope it will help... :-)

Visit

Avatar

Level 2

Last time I was creating a cluster on 6.1 and I was executing the following steps. I have tried others as well, but this one worked multiple times.

1. Download and install MongoDB (add {mongo-install-directory}\bin to PATH)

2. Create a directory for the 1st instance (ex: author0)

3. create a directory for mongo replica set node 1 (ex: mongo0)

4. Start mongo on default port (27017) with the following command: mongod --dbpath mongo0/

5. Extract the installer JAR file with java -jar {AEM-installer.jar} -unpack

6. Modify the start.bat as follows:

  •   add crx3mongo to CQ_RUNMODE,
  •   comment out set CQ_RUNMODE=%CQ_RUNMODE%,crx3,crx3tar
  •   uncomment set CQ_RUNMODE=%CQ_RUNMODE%,crx3,crx3mongo
  •   uncomment the settings for mongo db
    •   set CQ_MONGO_HOST=localhost
    •   set CQ_MONGO_PORT=27017
    •   set CQ_MONGO_DB=aem6

7. Start AEM and wait for the installation to complete

8. Stop AEM, Stop Mongo

9. Set up the mongo replica set:

  •   create a directory for mongo replica set node 2 (ex: mongo1)
  •   create a directory for the arbiter node (ex: mongo_arb)
  •   Start the stand-alone mongo instance with the replSet option set to aem6, e.g.: mongod --dbpath mongo0/ --replSet aem6
  •   Start the node 2 mongo instance, e.g.: mongod --dbpath mongo1/ --replSet aem6 --port 27018
  •   Start the arbiter mongo instance, e.g.: mongod --dbpath mongo2_arb/ --replSet aem6 --port 27019
  •   Open a mongo shell (if path variable is set properly you only need to type mongo in command line) and complete the replica set definition
    •   Initialize the replica set by: rs.initiate(rsconf = {_id: "aem6", members: [{_id: 0, host: "localhost:27017"}]})
    •   Add replica 2: rs.add("localhost:27018")
    •   Add the arbiter: rs.addArb("localhost:27019")
    •   Check status, wait until you have a PRIMARY, SECONDARY, and ARBITER node: rs.status()

10. Update the start.bat, add the 2nd node's port to CQ_MONGO_PORT (CQ_MONGO_PORT=27017,27018)

11. Install the second AEM node:

  •   Create a directory to store the AEM instance (ex: author1)
  •   Execute steps from 5 to 7.

12. Check the topology by hitting: http://localhost:4502/system/console/status-topology

13. Start up process:

  •   Repeat steps from 9/c to 9/e
  •   Start 1st AEM node
  •   Start 2nd AEM node

14. Shut down process: Stop AEM instances, Stop MongoDB instances.

Avatar

Level 3

Hi nschuter,

Thanks for the steps i tried following the same

1. started mongo instance in 27017

2. unpacked the jar

3. updated the mongo configurations in start.bat of AEM

4. started the AEM from command line start.bat

AEM is not coming up properly and i See error below in the logs. Only few bundles are in Active state.

13.06.2017 12:35:15.389 *ERROR* [FelixStartLevel] ERROR: Bundle '36' Error stopping launchpad:resources/install/5/org.apache.felix.http.jetty-3.1.6-B002.jar (java.util.NoSuchElementException)

I am using the AEM 6.2 version and i am not sure what i am missing