Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.
SOLVED

Jenkins build on AEM environment brings the instance down .

Avatar

Level 2

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.

1 Accepted Solution

Avatar

Correct answer by
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

View solution in original post

8 Replies

Avatar

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!

Avatar

Level 2

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!

 

Avatar

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!

Avatar

Correct answer by
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

Avatar

Adobe Champion

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?

Avatar

Administrator

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



Kautuk Sahni

Avatar

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.

Avatar

Administrator

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



Kautuk Sahni