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
BedrockMission!

Learn More

View all

Sign in to view all badges

Duplicate OSGi configs with every installation

Avatar

Avatar
Validate 1
Level 1
learner_monk
Level 1

Like

1 like

Total Posts

6 posts

Correct Reply

1 solution
Top badges earned
Validate 1
Boost 1
Affirm 1
View profile

Avatar
Validate 1
Level 1
learner_monk
Level 1

Like

1 like

Total Posts

6 posts

Correct Reply

1 solution
Top badges earned
Validate 1
Boost 1
Affirm 1
View profile
learner_monk
Level 1

18-04-2018

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 -

/apps/myProject/config.author/org.apache.sling.event.jobs.QueueConfiguration-abc.xml

/apps/myProject/config.author/org.apache.sling.event.jobs.QueueConfiguration-def.xml

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 -

org.apache.sling.event.jobs.QueueConfiguration.<uniqueid>

org.apache.sling.event.jobs.QueueConfiguration.<uniqueid>

Please suggest.

Replies

Avatar

Avatar
Boost 1
Level 1
mark_chester
Level 1

Likes

2 likes

Total Posts

4 posts

Correct Reply

0 solutions
Top badges earned
Boost 1
View profile

Avatar
Boost 1
Level 1
mark_chester
Level 1

Likes

2 likes

Total Posts

4 posts

Correct Reply

0 solutions
Top badges earned
Boost 1
View profile
mark_chester
Level 1

09-11-2018

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:

com.corp.s3.authentication.impl.S3AuthenticationConfigurationImpl.0bd45398-bef0-43cc-9b4b-f3dff57b8db9

com.corp.s3.authentication.impl.S3AuthenticationConfigurationImpl.65bfa9ee-88e2-47b0-8a00-97864b279e33

com.corp.s3.authentication.impl.S3AuthenticationConfigurationImpl.6fc2aa28-410d-46d9-bd16-ba60688957d7

com.corp.s3.authentication.impl.S3AuthenticationConfigurationImpl.7abd8492-9f97-487c-ad70-4f302e9e32d2

com.corp.s3.authentication.impl.S3AuthenticationConfigurationImpl.7ff34f09-123f-4f18-9b60-dddd93e8692a

com.corp.s3.authentication.impl.S3AuthenticationConfigurationImpl.cf407026-692c-4b91-a334-2672543dc363

com.corp.s3.authentication.impl.S3AuthenticationConfigurationImpl.f021dcc8-3622-4548-8f32-9e2532269367

com.corp.s3.authentication.impl.S3AuthenticationConfigurationImpl.f53f4c42-3612-473e-a5ec-b8e194bd38b2

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.

Avatar

Avatar
Coach
Employee
Jörg_Hoh
Employee

Likes

1,113 likes

Total Posts

3,145 posts

Correct Reply

1,072 solutions
Top badges earned
Coach
Give back 600
Ignite 5
Ignite 3
Ignite 1
View profile

Avatar
Coach
Employee
Jörg_Hoh
Employee

Likes

1,113 likes

Total Posts

3,145 posts

Correct Reply

1,072 solutions
Top badges earned
Coach
Give back 600
Ignite 5
Ignite 3
Ignite 1
View profile
Jörg_Hoh
Employee

10-11-2018

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

Avatar

Avatar
Boost 1
Level 1
mark_chester
Level 1

Likes

2 likes

Total Posts

4 posts

Correct Reply

0 solutions
Top badges earned
Boost 1
View profile

Avatar
Boost 1
Level 1
mark_chester
Level 1

Likes

2 likes

Total Posts

4 posts

Correct Reply

0 solutions
Top badges earned
Boost 1
View profile
mark_chester
Level 1

13-11-2018

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.

Thanks!

Avatar

Avatar
Ignite 5
Level 6
AnkurAhlawat
Level 6

Likes

111 likes

Total Posts

165 posts

Correct Reply

27 solutions
Top badges earned
Ignite 5
Ignite 3
Ignite 20
Ignite 10
Ignite 1
View profile

Avatar
Ignite 5
Level 6
AnkurAhlawat
Level 6

Likes

111 likes

Total Posts

165 posts

Correct Reply

27 solutions
Top badges earned
Ignite 5
Ignite 3
Ignite 20
Ignite 10
Ignite 1
View profile
AnkurAhlawat
Level 6

07-11-2019

I checked and the resolution for mentioned issue is provided here. http://aemcq5tutorials.com/tutorials/duplicated-osgi-configurations-upgrade/