AEM publish servers aren't using the configuration in my OSGi xml files | Community
Skip to main content
Level 6
May 26, 2022

AEM publish servers aren't using the configuration in my OSGi xml files

  • May 26, 2022
  • 1 reply
  • 2493 views

hi folks,

 

My AEM publish servers suddenly stopped reading the OSGi files for configuration.

 

I haven't changed the files in months, years for some of them. BTW I never configure via the console.

 

But when I look at the system/console/configMgr console, the correct values for the run modes (publish,stage) aren't  there.

 

It is like the server configuration has reverted back to the default values and naturally lots of our features don't work.

 

Has anyone seen anything like this before ? I'm going to open a help ticket anyway

 

thanks

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

1 reply

SantoshSai
Community Advisor
Community Advisor
May 26, 2022

Hi @fionas76543059 

Strange! My silly but possible suspect - Deployment/Package Installation overriding configs? 😉

Some of your configurations might be stored already under /apps/syste/config, for more details please watch this https://www.techinnovia.com/run-modes/ (from 7:00) video where I have demonstrated how wrong configurations are reading in OSGI.

Hope that helps!

Regards,
Santosh

Santosh Sai
Level 6
May 27, 2022

hi Santosh,

 

Thank you for your reply and interesting video.

I watched it and checked  my own problem server.

The run modes were o.k.

I noticed that there are lots of configs under /apps/system/config but they are all Adobe ones.

 

But all my configs were gone!  .... i.e the ones under /apps/*/config

 

The other odd thing I noticed is that in crx/packmgr, the "all" package was fine but all its subpackages had this message under them. "A different version seems to be installed..."

SantoshSai
Community Advisor
Community Advisor
May 28, 2022

I did find in the error.log  where the configurations were being deleting. This happened during the Cloud Manager deploy that resulted in the crx/packmgr messages "A different version seems to be installed..." and after which the servers had their problems

 

I don't know why the OsgiInstallerImpl deleted them.

 

25.05.2022 21:22:31.914 *INFO* [OsgiInstallerImpl] org.apache.sling.audit.osgi.installer Deleted configuration com.xxx.soap.services.impl.ConsumeSOAPServiceImpl from resource TaskResource(url=jcrinstall:/apps/xxx/config.stage/com.xxx.soap.services.impl.ConsumeSOAPServiceImpl, entity=config:com.xxx.soap.services.impl.ConsumeSOAPServiceImpl, state=UNINSTALL, attributes=[org.apache.sling.installer.api.tasks.ResourceTransformer=:3985:4219:4220:54:, service.pid=com.xxx.soap.services.impl.ConsumeSOAPS..

 

Also from the error log

25.05.2022 21:22:31.213 *INFO* [JcrInstaller.1] org.apache.sling.installer.provider.jcr.impl.JcrInstaller Deleting WatchedFolder:/apps/xxx/config.author, path does not exist anymore
25.05.2022 21:22:31.213 *INFO* [JcrInstaller.1] org.apache.sling.installer.provider.jcr.impl.JcrInstaller Deleting WatchedFolder:/apps/xxx/config.author.stage, path does not exist anymore
25.05.2022 21:22:31.213 *INFO* [JcrInstaller.1] org.apache.sling.installer.provider.jcr.impl.JcrInstaller Deleting WatchedFolder:/apps/xxx/config, path does not exist anymore
25.05.2022 21:22:31.213 *INFO* [JcrInstaller.1] org.apache.sling.installer.provider.jcr.impl.JcrInstaller Deleting WatchedFolder:/apps/xxx/config.stage, path does not exist

 


Hi @fionas76543059 

Ok, when your OSGi configurations unexpectedly deleted in your environment you can analyze how those configurations were deleted.

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

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

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

2. 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
  • JCR Installer observes the configurations being deleted (In your case)
  • OsgiInstallerImpl installs configurations

Some possible causes for a configuration getting deleted 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 deleted.

Hope that helps!

Regards,
Santosh

Santosh Sai