Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

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 -<uniqueid><uniqueid>

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.


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.