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

Jenkins build on AEM environment brings the instance down .

Sriga311
Level 1
Level 1

Hi All,

We are using Jenkins configuration to build and deploy the code in AEM-dev /stage environment .But , whenever we run the build on AEM instance, getting below error on loading the contentpath /URL of that instance until the build completes.

ERROR:

Not Found(404)

The request URL /content/project/page.html resulted in an error org.apache.sling.servlets.get.impl.DefaultGetServlet.

 

So,could you please suggest ways to resolve this issue.

 

Thanks.

8 Replies
asutosh_jena
Community Advisor
Community Advisor

Hi @Sriga311 

 

When you deploy the code, OSGi bundles will restart for the project that you are deploying, so if you try to access any of the pages from the same project, you will get a 404 page for few second as the OSGi bundle restart has to go through all the life cycle phase.

 

If you have a dispatcher/CDN in front of your publish instance and almost all the static contents are cached then you will not get this issue as all the request can be handled at the dispatcher, but still there are chances.

 

Thanks!

Sriga311
Level 1
Level 1

Hi @asutosh_jena,

Thanks for your response.

 

In our case,  deploying the code package on AEM instance takes the entire instance down for a while(/siteadmin,/crx/de) not only the project specific content .So , can you please suggest ways to find the cause for it.

 

Thanks in Advance!

 

asutosh_jena
Community Advisor
Community Advisor

Hi @Sriga311 

 

Can you please share the command that you are using to build and deploy the project using Jenkins?

Also please share the filter.xml file.

 

Thanks!

KiranVedantam1992
Community Advisor
Community Advisor

Hi @Sriga311,

Can you please check whats happening in jenkins and aem logs?

 

So this issue happened with us earlier. The jenkins job was created to pickup the packages built using maven and install them in AEM instance via curl command. It also installed /all package which has a filter /apps and overwritten the entire /apps structure.

 

If this is the issue, try fixing the jenkins job.

 

Hope this helps!

 

Thanks,

Kiran Vedantam

kimonp31365843
Level 4
Level 4

Hi @Sriga311 ,

Can you provide some more info to help you more effeciently? E.g.

 

  • What AEM version are you using? Any SPs installed or other hotfixes?
  • Does this only happen via Jenkins build or is it occurring e.g via Cloud Manager or other build tools?
  • How about the build behaviour in your local dev env?
  • How long does the overall build take?
  • How long is the instance down?
kautuk_sahni
Community Manager
Community Manager

@Sriga311,  thank you for answering in the AEM community. Good to have SME like you in the AEM community. Keep it up.

rocks
Level 2
Level 2

Check the log files when your bundle is installed. Also check the bundle manifest if you are importing and exporting the dependencies which has conflicts with out of box AEM bundles. You could try to split your bundle into multiple small bundles and check which jar is causing this restart? Also are you using external third party or library bundles? If yes don't include them every time you build. Move them to seperate pipeline and install them only when you update those third party bundles. Some times these third party bundles package services could restart the AEM system. I have faced this kind of restart issue for jersey-min-2.22.2.jar.

kautuk_sahni
Community Manager
Community Manager

@rocks, thank you for answering in the AEM community. Good to have SME like you in the AEM community. Keep it up.