Expand my Community achievements bar.

July 31st AEM Gems Webinar: Elevate your AEM development to master the integration of private GitHub repositories within AEM Cloud Manager.

Duplicate OSGi configs with every installation


Level 2

Hi All,

We are using few OSGi factory configurations in our authoring environment (AEM 6.2) like below -

Apache Sling Thread Pool Configuration

Apache Sling Job Queue Configuration

(these are factory configs) and, we have checked these in our source control system as below -



What I am noticing that with each code deployment a set of duplicate OSGi configs start appearing from Felix console like below with different unique id but same name -



Please suggest.

4 Replies


Level 1

We have this same problem, but not at every deployment.  It's only happening sometimes, and I can't find the reason or cause.  I too would like to know how to prevent it.

BTW, I created a quick command line to clean up the bad OSGI config if you have many to delete.  Copy the UIDS from OSGI console and clean them up in a text editor to look something like this:









Save that to a text file, then run this command:

for osgiconfig in $(cat bad-osgi.txt); do curl -X POST -d "apply=1&delete=1" -u 'admin:password' "http://localhost:4503/system/console/configMgr/${osgiconfig}"; done

You should get something like this as output:

{ "status": true }{ "status": true }{ "status": true }{ "status": true }{ "status": true }{ "status": true }{ "status": true }{ "status": true }

Then reinstall your configs.


Employee Advisor

If it's something like described in OSGI configuration entries duplicated on boot , I would recommend you to raise a Daycare ticket.


Level 1

I checked, and the issue we are having is related to that problem. (A more direct link: [SLING-6313] Sling installer can duplicate factory configurations if an invalid RegisteredResourceLi... )  Looks like our root cause is AEM crashing on issues with the application code or infrastructure, which results in an unclean shutdown of AEM.  In our Dev environments, this is a common scenario.  Production is stable and has not seen the problem with the duplicate OSGI configs.  I will open a Daycare ticket to see if there is any resolution to this.