Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.
SOLVED

Problem with code bundle component on instance restarts, but the component works when package imports are refreshed or code is redeployed

Avatar

Level 4

AEM 6.5 SP13

We have a code bundle with a search component that is in a failed state when the instance is restarted.

Looking around /system/console we see what looks like a conflict with jersey client / jersey core libraries when it's broken (i.e. after instance is restarted).

So far, I have discovered 2 scenarios that seem to fix the issue once the instance has been restarted and the search is broken:

1) If we redeploy the code with mvn clean install -P deploy profile, the search component is fixed

2) If within the /system/console I select the "refresh package imports" button for this bundle, the problem also almost always resolves

Is it possible to refresh package imports for a bundle via cURL?

I imagine the number of the bundle could change making this more difficult that it might already be.

Thanks for any help!

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi @this-that-the-otter 

 

You can refresh the entire bundle using the below CURL command:-

 

curl -u admin:admin -F action=refresh http://localhost:4502/system/console/bundles/$bundle symbolic name 

View solution in original post

4 Replies

Avatar

Correct answer by
Community Advisor

Hi @this-that-the-otter 

 

You can refresh the entire bundle using the below CURL command:-

 

curl -u admin:admin -F action=refresh http://localhost:4502/system/console/bundles/$bundle symbolic name 

Avatar

Level 4

Hi Avinash,

Thank you for the info, it seems to work! Interestingly, Adobe Support said you could not refresh a bundle like this via cURL

Do you have any idea why this is necessary in our case? Ideally the code would come back properly between restarts of the AEM instance. This will make things easier though, definitely faster than logging into /system/console and manually refreshing, or redeploying the code.

I issued the command and saw a lot of things scroll by in error.log so it seemed to work well, the command returned the following:

{"fragment":false,"stateRaw":32}⏎

Thanks again!

Avatar

Community Advisor

Hi @this-that-the-otter ,

IMO, You should not refresh bundle either manually or via any command. Ideally you may resolve it on your lower environment but when it comes to production and/or pre-production console is inaccessible. I would find out the root cause and fix it. Please check with the bundle version. for more details refer these articles and similar thread: 

Regards,

Santosh

Avatar

Level 4

Hi @SantoshSai Thanks for the info - Unfortunately I will need to rely on cURL until the underlying issue is resolved. 

 

I'm not sure how the links you included will help with my issue?

 

Can you advise on what we might look for in the code to resolve?

 

We are using a -SNAPSHOT bundle throughout the dev-qa-prod workflow.