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

Replication via CRX NOT working!

Avatar

Level 2

Hi,

One of AEM environments, replication is not working via CRX, giving 500 server error

---------------------------Log-------------------------------------------

Could not load data. Received 500 (Server Error).

HTTP ERROR 500 Server Error

URI:STATUS:MESSAGE:SERVLET:CAUSED BY:

/crx/de/replication.jsp
500
Server Error
org.apache.felix.http.base.internal.dispatch.DispatcherServlet-610db5b3
java.lang.NullPointerException

Caused by:

java.lang.NullPointerException
	at com.day.cq.replication.impl.ReplicatorImpl.getReplicationStatus(ReplicatorImpl.java:272)
	at com.day.crx.delite.impl.servlets.ReplicationServlet.doGet(ReplicationServlet.java:86)
	at com.day.crx.delite.impl.servlets.ReplicationServlet.doService(ReplicationServlet.java:54)
	at com.day.crx.delite.impl.AbstractServlet.service(AbstractServlet.java:52)
	at com.day.crx.delite.impl.MainServlet.doService(MainServlet.java:130)
	at com.day.crx.delite.impl.MainServlet.service(MainServlet.java:107)
	at org.apache.felix.http.base.internal.handler.ServletHandler.handle(ServletHandler.java:123)
	at org.apache.felix.http.base.internal.dispatch.InvocationChain.doFilter(InvocationChain.java:86)
	at com.adobe.granite.license.impl.LicenseCheckFilter.doFilter(LicenseCheckFilter.java:308)
	at org.apache.felix.http.base.internal.handler.FilterHandler.handle(FilterHandler.java:142)
	at org.apache.felix.http.base.internal.dispatch.InvocationChain.doFilter(InvocationChain.java:81)
	at org.apache.sling.i18n.impl.I18NFilter.doFilter(I18NFilter.java:131)
	at org.apache.felix.http.base.internal.handler.FilterHandler.handle(FilterHandler.java:142)
	at org.apache.felix.http.base.internal.dispatch.InvocationChain.doFilter(InvocationChain.java:81)
	at org.apache.felix.http.base.internal.dispatch.Dispatcher$1.doFilter(Dispatcher.java:146)
	at org.apache.felix.http.base.internal.whiteboard.WhiteboardManager$2.doFilter(WhiteboardManager.java:1002)
	at org.apache.sling.security.impl.ReferrerFilter.doFilter(ReferrerFilter.java:326)
	at org.apache.felix.http.base.internal.handler.PreprocessorHandler.handle(PreprocessorHandler.java:136)
	at org.apache.felix.http.base.internal.whiteboard.WhiteboardManager$2.doFilter(WhiteboardManager.java:1008)
	at org.apache.felix.http.sslfilter.internal.SslFilter.doFilter(SslFilter.java:97)
	at org.apache.felix.http.base.internal.handler.PreprocessorHandler.handle(PreprocessorHandler.java:136)
	at org.apache.felix.http.base.internal.whiteboard.WhiteboardManager$2.doFilter(WhiteboardManager.java:1008)
	at com.adobe.ams.security.core.AMSSecurityFilter.doFilter(AMSSecurityFilter.java:56)
	at org.apache.felix.http.base.internal.handler.PreprocessorHandler.handle(PreprocessorHandler.java:136)
	at org.apache.felix.http.base.internal.whiteboard.WhiteboardManager$2.doFilter(WhiteboardManager.java:1008)
	at org.apache.felix.http.base.internal.whiteboard.WhiteboardManager.invokePreprocessors(WhiteboardManager.java:1012)
	at org.apache.felix.http.base.internal.dispatch.Dispatcher.dispatch(Dispatcher.java:91)
	at org.apache.felix.http.base.internal.dispatch.DispatcherServlet.service(DispatcherServlet.java:49)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:725)
	at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:755)
	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:547)
	at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:233)
	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1607)
	at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:233)
	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1297)
	at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:188)
	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:485)
	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1577)
	at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:186)
	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1212)
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
	at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:221)
	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
	at org.eclipse.jetty.server.Server.handle(Server.java:500)
	at org.eclipse.jetty.server.HttpChannel.lambda$handle$1(HttpChannel.java:383)
	at org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:547)
	at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:375)
	at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:270)
	at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311)
	at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:103)
	at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:117)
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:336)
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:313)
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:171)
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:129)
	at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:388)
	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:806)
	at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:938)
	at java.base/java.lang.Thread.run(Thread.java:834)
--------------------------------------------------------------------------------------------------------

 

 

Shardendu_Jha_1-1620978534887.png

 

 

 

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi @Shardendu_Jha,

Per the error statement, issue is on GET call which handles the logic of retrieving the replicationStatus and writes/updates the properties like isActivated/lastPublished and the related. 

This GET call happens twice,

  • one the moment Replication tab is on/If we switch from some other tab say, Properties/AccesControl to Replication tab
  • second, immediately after POST call where the actual Replication action happens.

Can you check if both the GET calls are 500 and if POST is also failing. 

 

Network trace screenshot for reference:

Highlighted in red is the GET call and in green is the POST call. (first GET call when Replication tab is on. Next GET is only after I trigger "Replicate" CTA  => POST followed by GET)

Vijayalakshmi_S_0-1621005149415.png

View solution in original post

5 Replies

Avatar

Community Advisor

Hi @Shardendu_Jha 

 

Please check if you have proper level of access to replicate what you are trying to do. Such as if you are trying to replicate something from /apps and if the /apps path is blocked it will not allow.

 

Also check if you can replicate the same from http://localhost:4502/etc/replication.html

 

At the end if nothing works try to restart the application and retry to replicate.

 

Thanks

Avatar

Level 2
Thanks Asutosh! Have proper access as replication working via replication agent/TreeActivation; Also I checked '/apps' same issue. Don't want to restart the system as this is Stage env

Avatar

Community Advisor

Hi @Shardendu_Jha,

 

You can debug it like below

  1. Please check the error in the replication agent level? Once you click on replicate, the agent talks to the destination server to send the data. Also, check for the complete error in error.log as well.
  2. Please check the access that you have to replicate a particular node
  3. Please check if the replication agent is pointing to the correct server or not.

 

Hope this helps!

 

Thanks,

Kiran Vedantam.

 

Avatar

Level 2

I checked,

- pointing to correct server

- No error on replication side, normal replication - page activation, tree activation working fine.

- The issue with all nodes - /apps, /content

Avatar

Correct answer by
Community Advisor

Hi @Shardendu_Jha,

Per the error statement, issue is on GET call which handles the logic of retrieving the replicationStatus and writes/updates the properties like isActivated/lastPublished and the related. 

This GET call happens twice,

  • one the moment Replication tab is on/If we switch from some other tab say, Properties/AccesControl to Replication tab
  • second, immediately after POST call where the actual Replication action happens.

Can you check if both the GET calls are 500 and if POST is also failing. 

 

Network trace screenshot for reference:

Highlighted in red is the GET call and in green is the POST call. (first GET call when Replication tab is on. Next GET is only after I trigger "Replicate" CTA  => POST followed by GET)

Vijayalakshmi_S_0-1621005149415.png