Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.
SOLVED

AEM 6.3 tarMK cold standby configuration keeps unregistering

Avatar

Level 2

Hi

I am using AEM 6.3 and i would like to setup TarMK cold standby according to :

How to Run AEM with TarMK Cold Standby

I have :

1. Copied the whole instance to another server

2. Setup the runmodes on both instances "standby" and "primary"

3. Created specific loggers for both instances.

I have configured the service on the standby instance via Web Console, immedietly after saving the configuration i am getting logged out.

In the logs i can see that the synchronization is being done and after logging back i can see that the configuration for StandbyStoreService is removed .So the synchronization only happened once.

In the logs i can see something as follows :

[CM Event Dispatcher (Fire ConfigurationEvent: pid=org.apache.jackrabbit.oak.segment.standby.store.StandbyStoreService)] org.apache.jackrabbit.oak-segment-tar Service [7400, [java.lang.Runnable]] ServiceEvent REGISTERED

...

[sling-default-937-Registered Service.7400] org.apache.jackrabbit.oak.plugins.blob.datastore.DataStoreBlobStore Error occurred while loading bytes from steam while fetching for id b446b5c6382e23f3afcb3b330ac9cd865fffbcc2aa28c5ce80cca705adf9e4be#1799
java.io.IOException: org.apache.jackrabbit.core.data.DataStoreException: Record b446b5c6382e23f3afcb3b330ac9cd865fffbcc2aa28c5ce80cca705adf9e4be does not exist

...

08.05.2018 07:05:42.997 *INFO* [JcrInstaller.1] org.apache.sling.installer.provider.jcr.impl.JcrInstaller Removing resource from OSGi installer: [/apps/system/config/org.apache.jackrabbit.oak.segment.standby.store.StandbyStoreService.config]

08.05.2018 07:05:43.223 *INFO* [OsgiInstallerImpl] org.apache.sling.audit.osgi.installer Deleted configuration org.apache.jackrabbit.oak.segment.standby.store.StandbyStoreService from resource TaskResource(url=jcrinstall:/apps/system/config/org.apache.jackrabbit.oak.segment.standby.store.StandbyStoreService.config, entity=config:org.apache.jackrabbit.oak.segment.standby.store.StandbyStoreService, state=UNINSTALL, attributes=[org.apache.sling.installer.api.persist=false, service.pid=org.apache.jackrabbit.oak.segment.standby.store.StandbyStoreService, resource.uri.hint=org.apache.jackrabbit.oak.segment.standby.store.StandbyStoreService], digest=2c81db66f30cbd460330cc9bda4c6797)

08.05.2018 07:05:43.225 *INFO* [CM Event Dispatcher (Fire ConfigurationEvent: pid=org.apache.jackrabbit.oak.segment.standby.store.StandbyStoreService)] org.apache.jackrabbit.oak-segment-tar Service [7400, [java.lang.Runnable]] ServiceEvent UNREGISTERING

Do You know why configuration keeps unregistering ?
I have tried to create config files under the "install" folder , but this prevents user from using AEM by logging him out immediatly.

EDIT: After configure the service second time , the missing records do not appear, as they have been copied by previous synchronization. The service still unregistered itself.

1 Accepted Solution

Avatar

Correct answer by
Employee

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

View solution in original post

5 Replies

Avatar

Correct answer by
Employee

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,

In standby instance:

  1. 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.

Here i am not able to login in standby console ?

Any suggestion?

Please note that we are using same shared NFS file DataStore for both primary and standby node.

Avatar

Level 4
Iam facing the same issue. what was the solution applied to resolve this issue