Jenkins build on AEM environment brings the instance down . | Community
Skip to main content
Level 2
September 9, 2021
Solved

Jenkins build on AEM environment brings the instance down .

  • September 9, 2021
  • 4 replies
  • 2316 views

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.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Kiran_Vedantam

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

4 replies

Asutosh_Jena_
Community Advisor
Community Advisor
September 9, 2021

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!

Sriga311Author
Level 2
September 9, 2021

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
September 9, 2021

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!

Kiran_Vedantam
Community Advisor
Kiran_VedantamCommunity AdvisorAccepted solution
Community Advisor
September 9, 2021

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

Adobe Champion
September 9, 2021

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
September 21, 2021

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

Kautuk Sahni
Level 2
September 11, 2021

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
September 21, 2021

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

Kautuk Sahni