Skip to main content

Upgrade to AEM 6.5 on Application Server

We all know AEM 6.5 is a feature-packed upgrade from Adobe. In this blog post, we share the step-by-step upgrade process curated and successfully followed for an app server upgrade of AEM 6.5.

NOTE

This post outlines the steps, to upgrade an AEM on Application Server set-up.

Please note, steps mentioned below are meant for Tomcat application server. The process outlined will perform an upgrade from AEM 6.4 to AEM 6.5.

Pre-upgrade checks on existing the AEM 6.4

  • Start the Tomcat app server. For the Unix based setup by running ./catalina.sh start-up script and, on Windows use the batch file, command to run from the terminal:
  • $CATALINA_HOME/bin/catalina.sh start
  • If AEM 6.4 WAR has been deployed, verify all the bundles are active on the Web console: (where /aemauthor is the context name), goto:
  • https://aemauthor/authorserver:port/system/console/bundles

Un-deploy existing WAR on app server

  • Next, un-deploy AEM 6.4 WAR. This can must be done from the Tomcat App Manager (http://server:port/manager/html)

Repository migration

  • As a next step, we have, to migrate the repository using crx2oak migration tool.
  • Please download the latest version of crx2oak from here.
  • SLING_HOME= $AEM-HOME/crx-quickstart java -Xmx4096m -XX:MaxPermSize=2048M -jar crx2oak.jar --load-profile segment-fds
  • Please stream sufficient java heap size for a smoother migration.

Clean up task

  • 8. Delete the following properties from /crx-quickstart/launchpad/sling.properties file and save :
    • sling.installer.dir
    • sling.installer.dir
    • felix.cm.dir
    • granite.product.version
    • org.osgi.framework.system.packages
    • osgi-core-packages
    • osgi-compendium-services
    • jre-*
    • sling.run.mode.install.options

Remove the files and folders no longer required. The items you need to remove are:

  • The launchpad/start-up folder. You can delete it by running the following command in the terminal: rm -rf crx-quickstart/launchpad/startup
  • The base.jar file: find crx-quickstart/launchpad -type f -name "org.apache.sling.launchpad.base.jar*" -exec rm -f {} \
  • The BootstrapCommandFile_timestamp.txt file: rm -f crx-quickstart/launchpad/felix/bundle0/BootstrapCommandFile_timestamp.txt
  • Remove sling.options.file by running: find crx-quickstart/launchpad -type f -name "sling.options.file" -exec rm -rf

Configuring AEM for upgrade

We now need to create Segment Tar config and external File Data Store config that will be used with the AEM 6.5 setup. You can do this by creating two files with the following naming conventions under /crx-quickstart/install/ folder:

  • org.apache.jackrabbit.oak.segment.SegmentNodeStoreService.config
  • org.apache.jackrabbit.oak.plugins.blob.datastore.FileDataStore.config

NOTE

These two files will configure AEM to use a TarMK node store and a File data store.

Let us setup these config files for use with the AEM 6.5:

Add the following line to org.apache.jackrabbit.oak.segment.SegmentNodeStoreService.config:

customBlobStore=B”true”

This Boolean flag will make sure that FileDataStore is hosted separately from the Segment Tar.

Next is add the following lines to org.apache.jackrabbit.oak.plugins.blob.datastore.FileDataStore.config:

path=”./crx-quickstart/repository/datastore” minRecordLength=4096

minRecordLength=4096

Run mode settings

You now need to change the run modes in the AEM 6.5 WAR file. Do that, first create a temporary folder that will be used for the AEM 6.5 WAR. The name of the folder in this example will be /temp.

Once the war file has been copied over, extract its contents by running the below command from the /temporary directory:

jar xvf aem-quickstart-6.5.0.war

After WAR has been extracted, go to the WEB-INF directory, and edit the web.xml file to change the run modes.

To find the location where they are set in the XML, look for the sling.run.modes option. Once you find it, change the run modes in the next line of the configuration, which by default is set to author:

author

Change the above author run mode to following run modes author,crx3,crx3tar. After the changes, it should appear like below:

  • init-param
  • param-name sling.run.modes
  • param-value author,crx3,crx3tar
  • /init-param
  • load-on-startup 100
  • /servlet

Repackaging WAR

Now we have to re-package WAR with all the modified contents, using the command below

jar cvf aemauthor.war

Running upgrade to AEM 6.5

As a last step, please deploy new WAR file of AEM 6.5 on Tomcat and monitor error.log and Web console for the progress.

Post upgrade troubleshooting’s

For post upgrade issues please see Adobe’s official doc for a help. Though the steps outlined here are for the Jar setup, but codebase and AEM checks should can also help to figure out any issues.

Please share this post among your circles. We will be happy to hear from you. If we have missed any steps or the step is not clear or giving any errors, do let us know. We will verify. Thank you.

Let’s engage