Expand my Community achievements bar.

Guidelines for the Responsible Use of Generative AI in the Experience Cloud Community.

Cold-standby setup for an existing AEM instance with file datastore

Avatar

Level 4

Recently in a day care ticket, adobe support team has mentioned that it is suggested to have a separate datastore for standby server.

if we want to implement cold-standby in an existing AEM environment with a file datastore, do we have to copy over the existing datastore to a separate folder and update the configurations accordingly.

Regards,

Ramgopal.

13 Replies

Avatar

Employee

Yes you have to take over the datastore to the standby server and remove the sling id. In summary, below steps should give you an idea. These include the datastore configs :

Use the below steps to setup cold standby instance and let me know incase of any issues.

Setting up Primary instance

  1. Setup a directory for Primary instance for Cold standby Setup
  2. In Primary instance directory, Unpack AEM 6.1 using command java -jar quickstart.jar -unpack
  3. Create install folder under /crx-quickstart
  4. I have attached an archive install.zip containing 2 folders (install.primary, install.standby) containing configuration
  5. Place these 2 folders in install directory in Step #2
  6. Start the primary instance with command java -jar quickstart.jar -r primary,crx3,crx3tar
  7. Wait for the instance to be up and running.
  8. Create Debug Logger for class org.apache.jackrabbit.oak.plugins.segment and name the logger as tarmk-coldstandby.log
  9. Do a quick smoke test and check if everything is running fine.
  10. Navigate to http://HOST:PORT/system/console/configMgr and search for Apache Jackrabbit Oak TarMK Cold Standby service to observe the mode and other configuration are correct and in accordance to Primary instance.
  11. Navigate to http://HOST:PORT/system/console/status-slingsettings to see if runmodes are picked up fine.

Setting up the Standby instance

  1. Setup a directory for Standby instance for Cold standby Setup
  2. Copy the /crx-quickstart directory from the primary instance over to Standby directory
  3. This should already contain /install folder plus the other configurations
  4. Search for sling.id file in /crx-quickstart directory and delete the same.
  5. Start the Standby instance with java -jar quickstart.jar -r standby,crx3,crx3tar and wait for the instance to be up and running.
  6. Navigate to http://HOST:PORT/system/console/configMgr and search for Apache Jackrabbit Oak TarMK Cold Standby service to observe the mode and other configuration are correct and in accordance to Standby instance.
  7. If the above configuration still shows the mode as primary, Change this to standby and save the configuration. This would be one-time thing as we copied the complete /crx-quickstart from the Primary instance.
  8. Navigate to http://HOST:PORT/system/console/status-slingsettings to see if runmodes are picked up fine. If needed, Restart once again with the standby runmode, same command as in Step#5
  9. Tail error.log and tarmk-coldstandby.log to see more information around the primary and standby instance

Testing if the cold standby setup works

  1. After the above setup is complete and everything has been correctly setup we would check if this setup works as expected.
  2. Navigate to http://HOST:PORT/assets.html/content/dam in the Primary instance and upload an image
  3. Wait for a few minutes and check the same path under Standby instance.
  4. If the image is synced up, Cold standby Setup works as expected.
  5. Now to make the Running Standby instance converted to Primary instance, You would need to shut down the Standby instance and start the same by running the command java -jar quickstart.jar -r primary,crx3,crx3tar in the Standby Directory terminal

Config files : Shared Files - Acrobat.com

Avatar

Level 4

Hi Kunwar,

Thanks for your reply, but these steps are for setting up a new environment.

But, in our scenario we already have an environment with a file datastore configured to a different file path and we are trying to create cold-stand by on top a running instance. The setup is as below

Crx quick start location : /k01/app/aem/crx-quickstart

File datastore location: /l01/aem/datastore

Day care has suggested to create a separate datastore for stand-by server. So, my question was that If we are configuring a cold stand-by now, do we have to copy the file datastore from /l01/aem/datastore to /l01/aem/datastore-standby and then start the standby server pointing the new datastore location or just create a new location and start the server?

Avatar

Employee

Id prefer cloning the current primary instance along with datastore to a new location  and start as standby instance as if you start a fresh coldstandby instance, the time to sync over everything from primary would be very high.

if cloning, copy everything along with datastore to a new location, find and delete sling.id file and start as standby instance

if new standby instance, just place correct configs to new aem instance and start as standby and wait for sync to complete

Avatar

Level 4

This really helps

As per my knowledge for every restart the sling ID gets changed, do you think it is mandatory to delete the sling.id file?

Avatar

Employee

- As per my knowledge for every restart the sling ID gets changed : This is incorrect.

Only if you clone the instance to another location, you need to regenerate the sling.id file. For a new instance, you don't need to do this.

Avatar

Level 4

Thanks again, let me check this setup and get back to you

Avatar

Level 4

we are still working on issues and still not able to complete the setup

Avatar

Level 3

Hi Kunwar,

Could you please suggest the location of sling.id file in crx-quickstart directory?

I am also setting up new cold-standby and installing the primary and standby from scratch on two different hosts. Do I need to be worried about sling.id as both are separate instances from scratch by unpacking aem jar.

Please suggest, thanks!

Avatar

Level 4

you can use the below command to find the file find crx-quickstart/launchpad/felix -type f -name "sling.id.file"

Avatar

Level 4

It worked for us.We followed the below doc and used the attached install folder and conf files in the doc.Please change the IP and path according to your environment.

How to setup cold standby instance in AEM

Regards

Sina

Avatar

Level 1

Kunwar - the files referenced by you, and the procedure cited at the end, are not available, any idea where to access?