Go to http://host:port/system/console/osgi-installer and log in as admin
You observed that some OSGi configurations were unexpectedly updated in your AEM environment and you would like to analyze how those configurations were updated.
Objective
You observed that some OSGi configurations were unexpectedly updated in your AEM environment and you would like to analyze how those configurations were updated.
Steps
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.
-
-
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] org.apache.sling.installer.provider.jcr.impl.JcrInstaller Deleting WatchedFolder:/apps/cq/core/config, path does not exist anymore 02.02.2017 18:04:13.014 *INFO* [JcrInstaller.1] org.apache.sling.installer.provider.jcr.impl.JcrInstaller Deleting WatchedFolder:/apps/cq/security/config.publish, path does not exist anymore 02.02.2017 18:04:13.014 *INFO* [JcrInstaller.1] org.apache.sling.installer.provider.jcr.impl.JcrInstaller 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] org.apache.sling.installer.provider.jcr.impl.JcrInstaller Removing resource from OSGi installer (folder deleted): [/apps/cq/core/config/org.apache.sling.j cr.resource.internal.JcrResourceResolverFactoryImpl.config, /apps/cq/security/config.publish/org.apache.sling.engine.impl.auth.SlingAuthenticator.config, /apps/cq/linkchecker/config/com.day.cq.rewriter. linkchecker.impl.LinkCheckerImpl.config]
- OsgiInstallerImpl installs configurations
02.02.2017 18:04:13.496 *INFO* [OsgiInstallerImpl] org.apache.sling.audit.osgi.installer Installed configuration com.day.cq.rewriter.linkchecker.impl.LinkCheckerImpl from resource TaskResource(url=jcrin stall:/libs/cq/linkchecker/config/com.day.cq.rewriter.linkchecker.impl.LinkCheckerImpl, entity=config:com.day.cq.rewriter.linkchecker.impl.LinkCheckerImpl, state=INSTALL, attributes=[org.apache.sling.in staller.api.tasks.ResourceTransformer=:30:, service.pid=com.day.cq.rewriter.linkchecker.impl.LinkCheckerImpl], digest=6454187f1ab4b3a78392ca3b5343814c) 02.02.2017 18:04:13.506 *INFO* [OsgiInstallerImpl] org.apache.sling.audit.osgi.installer Installed configuration org.apache.sling.engine.impl.auth.SlingAuthenticator from resource TaskResource(url=jcrinstall:/libs/cq/security/config.publish/org.apache.sling.engine.impl.auth.SlingAuthenticator, entity=config:org.apache.sling.engine.impl.auth.SlingAuthenticator, state=INSTALL, attributes=[org.apache.sling.installer.api.tasks.ResourceTransformer=:30:, service.pid=org.apache.sling.engine.impl.auth.SlingAuthenticator], digest=9633a84cbe99700c38f43f763b1cea1b) 02.02.2017 18:04:13.514 *INFO* [OsgiInstallerImpl] org.apache.sling.audit.osgi.installer Installed configuration org.apache.sling.jcr.resource.internal.JcrResourceResolverFactoryImpl from resource TaskResource(url=jcrinstall:/libs/cq/core/config/org.apache.sling.jcr.resource.internal.JcrResourceResolverFactoryImpl, entity=config:org.apache.sling.jcr.resource.internal.JcrResourceResolverFactoryImpl, state=INSTALL, attributes=[org.apache.sling.installer.api.tasks.ResourceTransformer=:30:, service.pid=org.apache.sling.jcr.resource.internal.JcrResourceResolverFactoryImpl], 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"/> </workspaceFilter>
- 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