How to track down unexpected OSGi configuration updates


You observed that some OSGi configurations were unexpectedly updated in your AEM environment and you would like to analyze how those configurations were updated.


I. Review the OSGi Installer Web Console

The OSGi Web Console has a plugin that allows you to view when OSGi configurations were applied and where they came from.

  1. Go to http://host:port/system/console/osgi-installer and log in as admin

  2. On this user interface, it shows which bundles and configurations were applied and when.  This includes files applied via the crx-quickstart/install folder and ones in JCR (Oak) repository install folders.

II. Review the error.log files for related log messages

Every time a configuration is changed, the error.log files get updated.  Here are the important log messages to look out for:

  • JCR Installer observes install folders removed from the JCR repository:
2.02.2017 18:04:13.014 *INFO* [JcrInstaller.1] Deleting WatchedFolder:/apps/cq/core/config, path does not exist anymore
02.02.2017 18:04:13.014 *INFO* [JcrInstaller.1] Deleting WatchedFolder:/apps/cq/security/config.publish, path does not exist anymore
02.02.2017 18:04:13.014 *INFO* [JcrInstaller.1] Deleting WatchedFolder:/apps/cq/linkchecker/config, path does not exist anymore
  • JCR Installer observes the configurations being deleted:​
02.02.2017 18:04:13.214 *INFO* [JcrInstaller.1] Removing resource from OSGi installer (folder deleted): [/apps/cq/core/config/
cr.resource.internal.JcrResourceResolverFactoryImpl.config, /apps/cq/security/config.publish/, /apps/cq/linkchecker/config/
  • OsgiInstallerImpl installs configurations
02.02.2017 18:04:13.496 *INFO* [OsgiInstallerImpl] Installed configuration from resource TaskResource(url=jcrin
stall:/libs/cq/linkchecker/config/,, state=INSTALL, attributes=[
staller.api.tasks.ResourceTransformer=:30:,], digest=6454187f1ab4b3a78392ca3b5343814c)
02.02.2017 18:04:13.506 *INFO* [OsgiInstallerImpl] Installed configuration from resource TaskResource(url=jcrinstall:/libs/cq/security/config.publish/,, state=INSTALL, attributes=[,], digest=9633a84cbe99700c38f43f763b1cea1b)
02.02.2017 18:04:13.514 *INFO* [OsgiInstallerImpl] Installed configuration from resource TaskResource(url=jcrinstall:/libs/cq/core/config/,, state=INSTALL, attributes=[,], digest=5b1641f2ff1d3dd3992ab2626de37392)

Some possible causes for a configuration getting updated are:

  • Package filter that causes a folder to get deleted.  For example if a package filter included all of the folder /apps/cq instead of specific folders under it.  e.g.
<?xml version="1.0" encoding="UTF-8"?>
<workspaceFilter version="1.0">
<filter root="/apps/cq"/>
<filter root="/content/geometrixx"/>
  • Another cause might be a user accidentally deleting the configuration
  • A user modifying the configuration via the /system/console/configMgr UI

To debug the root cause:​

  • Search for package installations surrounding these log messages you might look for package install.  Search the log for org.apache.jackrabbit.vault.packaging.impl.ZipVaultPackage Extracting
  • Search the access.log for a user posting to /system/console/configMgr or /crx/de during the same timeframe as when the configurations were updated