Exception in replication

ajayn93

13-03-2019

Hi All,

Trying to replicate content from author instance but in log it shows Error while building replication content com.day.cq.replication.ReplicationException: RepositoryException during serialization.

I am using admin credentials. This is not a local instance.

In log :

13.03.2019 08:37:39.287 *INFO* [qtp1493270052-15529] org.apache.sling.auth.core.impl.SlingAuthenticator getAnonymousResolver: Anonymous access not allowed by configuration - requesting credentials

13.03.2019 08:37:45.255 *INFO* [125.16.230.15 [1552466265254] POST /bin/replicate.json HTTP/1.1] com.day.cq.replication.impl.ReplicatorImpl Setting up replication with options: ReplicationOptions{synchronous=false, revision='null', suppressStatusUpdate=false, suppressVersions=false, filter=null, aggregateHandler=null}

13.03.2019 08:37:45.257 *INFO* [125.16.230.15 [1552466265254] POST /bin/replicate.json HTTP/1.1] com.day.cq.wcm.core.impl.VersionManagerImpl Refuse to create new version for unmodified page /content/xx/xx/xx/xx/xx/xx/xxx-xxx.

13.03.2019 08:37:45.258 *INFO* [125.16.230.15 [1552466265254] POST /bin/replicate.json HTTP/1.1] com.day.cq.replication.Agent.flush Creating content for path /content/xxx/xxx/xx/xx/xx/xx/xx-xx-xx

13.03.2019 08:37:45.260 *INFO* [125.16.230.15 [1552466265254] POST /bin/replicate.json HTTP/1.1] com.day.cq.replication.Agent.publish1 Using user admin for building content.

13.03.2019 08:37:45.260 *INFO* [125.16.230.15 [1552466265254] POST /bin/replicate.json HTTP/1.1] com.day.cq.replication.Agent.publish1 Creating content for path /content/xx/xx/xx/xx/xx/xx/xx-xx-xx

13.03.2019 08:37:45.275 *ERROR* [125.16.230.15 [1552466265254] POST /bin/replicate.json HTTP/1.1] com.day.cq.replication.impl.content.durbo.DurboContentBuilder IO exception occurred during serialization of content at /content/xx/xx/xxx/xx/xx/xx/xx-xxx-xxx.

13.03.2019 08:37:45.275 *ERROR* [125.16.230.15 [1552466265254] POST /bin/replicate.json HTTP/1.1] com.day.cq.replication.Agent.publish1 Error while building replication content com.day.cq.replication.ReplicationException: RepositoryException during serialization

13.03.2019 08:37:45.276 *ERROR* [125.16.230.15 [1552466265254] POST /bin/replicate.json HTTP/1.1] com.day.cq.replication.impl.ReplicatorImpl Error while building replication content.

com.day.cq.replication.ReplicationException: RepositoryException during serialization

at com.day.cq.replication.impl.content.durbo.DurboContentBuilder.create(DurboContentBuilder.java:164)

at com.day.cq.replication.impl.ServiceTrackerImpl$ContentBuilderWrapper.create(ServiceTrackerImpl.java:258)

at com.day.cq.replication.impl.AgentImpl.buildContent(AgentImpl.java:369)

at com.day.cq.replication.impl.AgentImpl.buildContent(AgentImpl.java:345)

at com.day.cq.replication.impl.ReplicatorImpl.buildContents(ReplicatorImpl.java:994)

at com.day.cq.replication.impl.ReplicatorImpl.replicate(ReplicatorImpl.java:478)

at com.day.cq.replication.impl.servlets.CommandServlet.doPost(CommandServlet.java:154)

at org.apache.sling.api.servlets.SlingAllMethodsServlet.mayService(SlingAllMethodsServlet.java:149)

at org.apache.sling.api.servlets.SlingSafeMethodsServlet.service(SlingSafeMethodsServlet.java:346)

at org.apache.sling.api.servlets.SlingSafeMethodsServlet.service(SlingSafeMethodsServlet.java:378)

at org.apache.sling.engine.impl.request.RequestData.service(RequestData.java:552)

at org.apache.sling.engine.impl.filter.SlingComponentFilterChain.render(SlingComponentFilterChain.java:44)

at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:77)

at com.day.cq.wcm.core.impl.WCMDebugFilter.doFilter(WCMDebugFilter.java:138)

at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68)

at com.day.cq.wcm.core.impl.WCMComponentFilter.filterRootInclude(WCMComponentFilter.java:375)

at com.day.cq.wcm.core.impl.WCMComponentFilter.doFilter(WCMComponentFilter.java:190)

at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68)

at com.day.cq.personalization.impl.TargetComponentFilter.doFilter(TargetComponentFilter.java:96)

at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68)

at org.apache.sling.engine.impl.SlingRequestProcessorImpl.processComponent(SlingRequestProcessorImpl.java:282)

at org.apache.sling.engine.impl.filter.RequestSlingFilterChain.render(RequestSlingFilterChain.java:49)

at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:77)

at com.day.cq.dam.core.impl.assetlinkshare.AdhocAssetShareAuthHandler.doFilter(AdhocAssetShareAuthHandler.java:436)

at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68)

at com.day.cq.dam.core.impl.servlet.ActivityRecordHandler.doFilter(ActivityRecordHandler.java:154)

at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68)

at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:73)

at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:73)

at com.cognifide.cq.includefilter.SyntheticResourceIncludingFilter.doFilter(SyntheticResourceIncludingFilter.java:47)

at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68)

at com.day.cq.wcm.core.impl.warp.TimeWarpFilter.doFilter(TimeWarpFilter.java:109)

at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68)

at com.adobe.cq.social.ugcbase.security.impl.SaferSlingPostServlet.doFilter(SaferSlingPostServlet.java:126)

at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68)

at com.adobe.granite.rest.impl.servlet.ApiResourceFilter.doFilter(ApiResourceFilter.java:70)

at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68)

at com.adobe.granite.requests.logging.impl.RequestLoggerImpl.doFilter(RequestLoggerImpl.java:113)

at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68)

at com.adobe.granite.rest.assets.impl.AssetContentDispositionFilter.doFilter(AssetContentDispositionFilter.java:96)

at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68)

at com.adobe.granite.csrf.impl.CSRFFilter.doFilter(CSRFFilter.java:217)

at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68)

at org.apache.sling.security.impl.ContentDispositionFilter.doFilter(ContentDispositionFilter.java:180)

at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68)

at com.day.cq.wcm.core.impl.AuthoringUIModeServiceImpl.doFilter(AuthoringUIModeServiceImpl.java:367)

at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68)

at com.day.cq.wcm.mobile.core.impl.redirect.RedirectFilter.doFilter(RedirectFilter.java:248)

at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68)

at com.merckgroup.aem.healthcare.consumerhealth.sevenseas.impl.filters.LoggingFilter.doFilter(LoggingFilter.java:40)

at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68)

at com.aem.bion3Master.project.impl.filters.LoggingFilter.doFilter(LoggingFilter.java:40)

at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68)

at com.merckgroup.aem.healthcare.consumerhealth.iliadin.impl.filters.LoggingFilter.doFilter(LoggingFilter.java:40)

at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68)

at com.merckgroup.aem.healthcare.consumerhealth.digitalplaybook.impl.filters.LoggingFilter.doFilter(LoggingFilter.java:40)

at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68)

at com.merck.platform.extensions.impl.filters.LoggingFilter.doFilter(LoggingFilter.java:40)

at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68)

at com.merckgroup.aem.healthcare.biopharma.imed.impl.filters.LoggingFilter.doFilter(LoggingFilter.java:40)

at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68)

at com.merckgroup.aem.healthcare.doucment.mylibrary.filters.MAMSecureAssetsAuthFilter.continueNextFilter(MAMSecureAssetsAuthFilter.java:129)

at com.merckgroup.aem.healthcare.doucment.mylibrary.filters.MAMSecureAssetsAuthFilter.doFilter(MAMSecureAssetsAuthFilter.java:54)

at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68)

at com.adobe.acs.commons.rewriter.impl.VersionedClientlibsTransformerFactory$BadMd5VersionedClientLibsFilter.doFilter(VersionedClientlibsTransformerFactory.java:427)

at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68)

at com.merck.aem.healthcare.biopharma.erbitux.filters.ErbituxLoginAuthFilter.doFilter(ErbituxLoginAuthFilter.java:108)

at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68)

at com.consumerhealth.filters.HROnboardingAuthFilter.doFilter(HROnboardingAuthFilter.java:156)

at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68)

at org.apache.sling.i18n.impl.I18NFilter.doFilter(I18NFilter.java:138)

at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68)

at org.apache.sling.engine.impl.debug.RequestProgressTrackerLogFilter.doFilter(RequestProgressTrackerLogFilter.java:107)

at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68)

at com.adobe.cq.social.commons.cors.CORSAuthenticationFilter.doFilter(CORSAuthenticationFilter.java:91)

at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68)

at com.day.cq.wcm.foundation.forms.FormsHandlingServletHelper.handleFilter(FormsHandlingServletHelper.java:221)

at com.day.cq.wcm.foundation.forms.impl.FormsHandlingServlet.doFilter(FormsHandlingServlet.java:138)

at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68)

at com.adobe.granite.optout.impl.OptOutFilter.doFilter(OptOutFilter.java:76)

at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68)

at com.day.cq.wcm.core.impl.WCMRequestFilter.doFilter(WCMRequestFilter.java:90)

at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68)

at com.adobe.cq.history.impl.HistoryRequestFilter.doFilter(HistoryRequestFilter.java:122)

at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68)

at com.adobe.cq.mcm.campaign.servlets.CampaignCopyTracker.doFilter(CampaignCopyTracker.java:100)

at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68)

at org.apache.sling.rewriter.impl.RewriterFilter.doFilter(RewriterFilter.java:83)

at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68)

at com.adobe.granite.httpcache.impl.InnerCacheFilter.doFilter(InnerCacheFilter.java:81)

at com.adobe.granite.httpcache.impl.InnerCacheFilter.doFilter(InnerCacheFilter.java:60)

at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68)

at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:73)

at com.adobe.granite.resourceresolverhelper.impl.ResourceResolverHelperImpl.doFilter(ResourceResolverHelperImpl.java:83)

at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68)

at org.apache.sling.engine.impl.SlingRequestProcessorImpl.doProcessRequest(SlingRequestProcessorImpl.java:151)

at org.apache.sling.engine.impl.SlingMainServlet.service(SlingMainServlet.java:219)

at org.apache.felix.http.base.internal.handler.ServletHandler.handle(ServletHandler.java:85)

at org.apache.felix.http.base.internal.dispatch.InvocationChain.doFilter(InvocationChain.java:79)

at org.apache.sling.i18n.impl.I18NFilter.doFilter(I18NFilter.java:138)

at org.apache.felix.http.base.internal.handler.FilterHandler.handle(FilterHandler.java:135)

at org.apache.felix.http.base.internal.dispatch.InvocationChain.doFilter(InvocationChain.java:74)

at com.adobe.granite.license.impl.LicenseCheckFilter.doFilter(LicenseCheckFilter.java:308)

at org.apache.felix.http.base.internal.handler.FilterHandler.handle(FilterHandler.java:135)

at org.apache.felix.http.base.internal.dispatch.InvocationChain.doFilter(InvocationChain.java:74)

at org.apache.felix.http.sslfilter.internal.SslFilter.doFilter(SslFilter.java:96)

at org.apache.felix.http.base.internal.handler.FilterHandler.handle(FilterHandler.java:135)

at org.apache.felix.http.base.internal.dispatch.InvocationChain.doFilter(InvocationChain.java:74)

at org.apache.sling.security.impl.ReferrerFilter.doFilter(ReferrerFilter.java:295)

at org.apache.felix.http.base.internal.handler.FilterHandler.handle(FilterHandler.java:135)

at org.apache.felix.http.base.internal.dispatch.InvocationChain.doFilter(InvocationChain.java:74)

at org.apache.sling.featureflags.impl.FeatureManager.doFilter(FeatureManager.java:116)

at org.apache.felix.http.base.internal.handler.FilterHandler.handle(FilterHandler.java:135)

at org.apache.felix.http.base.internal.dispatch.InvocationChain.doFilter(InvocationChain.java:74)

at org.apache.sling.engine.impl.log.RequestLoggerFilter.doFilter(RequestLoggerFilter.java:72)

at org.apache.felix.http.base.internal.handler.FilterHandler.handle(FilterHandler.java:135)

at org.apache.felix.http.base.internal.dispatch.InvocationChain.doFilter(InvocationChain.java:74)

at org.apache.felix.http.base.internal.dispatch.Dispatcher.dispatch(Dispatcher.java:128)

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:812)

at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:587)

at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:221)

at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127)

at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)

at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)

at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061)

at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)

at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:215)

at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)

at org.eclipse.jetty.server.Server.handle(Server.java:499)

at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:311)

at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257)

at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:544)

at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635)

at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555)

at java.lang.Thread.run(Thread.java:748)

Caused by: java.io.IOException: javax.jcr.AccessDeniedException: Access denied.

at com.day.cq.replication.impl.ReplicationContentFactoryProviderImpl$Factory.create(ReplicationContentFactoryProviderImpl.java:219)

at com.day.cq.replication.impl.ReplicationContentFactoryProviderImpl$Factory.create(ReplicationContentFactoryProviderImpl.java:165)

at com.day.cq.replication.impl.content.durbo.DurboContentBuilder.create(DurboContentBuilder.java:269)

at com.day.cq.replication.impl.content.durbo.DurboContentBuilder.create(DurboContentBuilder.java:141)

... 136 common frames omitted

Caused by: javax.jcr.AccessDeniedException: Access denied.

at org.apache.jackrabbit.oak.jcr.security.AccessManager.checkPermissions(AccessManager.java:71)

at org.apache.jackrabbit.oak.jcr.session.NodeImpl$5.perform(NodeImpl.java:295)

at org.apache.jackrabbit.oak.jcr.session.NodeImpl$5.perform(NodeImpl.java:264)

at org.apache.jackrabbit.oak.jcr.delegate.SessionDelegate.perform(SessionDelegate.java:208)

at org.apache.jackrabbit.oak.jcr.session.ItemImpl.perform(ItemImpl.java:112)

at org.apache.jackrabbit.oak.jcr.session.NodeImpl.addNode(NodeImpl.java:264)

at org.apache.jackrabbit.commons.JcrUtils.getOrCreateByPath(JcrUtils.java:1615)

at org.apache.jackrabbit.commons.JcrUtils.getOrCreateUniqueByPath(JcrUtils.java:1511)

at com.day.cq.replication.impl.ReplicationContentFactoryProviderImpl.getNewStorageNode(ReplicationContentFactoryProviderImpl.java:530)

at com.day.cq.replication.impl.ReplicationContentFactoryProviderImpl.access$300(ReplicationContentFactoryProviderImpl.java:65)

at com.day.cq.replication.impl.ReplicationContentFactoryProviderImpl$Factory.create(ReplicationContentFactoryProviderImpl.java:184)

Accepted Solutions (0)

Answers (15)

Answers (15)

Arun_Patidar

MVP

14-03-2019

Hi,

Its look like permission issue either on AEM or in filesystem.

Can you try debugging something like suggested in below post, I know the issue you are facing is different but you can give a try.

CQ5 | AEM6 Solutions and Suggestions: 2016

Jörg_Hoh

Employee

14-03-2019

Do you have this warn message in the log as well?

Error while creating storage parent (retrying): ...

(followed by some exception?)

ajayn93

13-03-2019

Hi Gaurav,

Tried No versioning in Triggers tab --- Not working

Users like version-manager-service and replication-service have the required permissions.

Arun_Patidar

MVP

13-03-2019

can you please check if your Agent user has read permission to read and build content.

You can find replication user in Agent Settings in settings tab

Gaurav-Behl

MVP

13-03-2019

Try to key in admin credentials again and check if that fixes the issue?

Most likely the problem is this -

13.03.2019 08:37:45.257 *INFO* [125.16.230.15 [1552466265254] POST /bin/replicate.json HTTP/1.1] com.day.cq.wcm.core.impl.VersionManagerImpl Refuse to create new version for unmodified page /content/xx/xx/xx/xx/xx/xx/xxx-xxx.

Solution: Either turn on 'No Versioning' in 'Triggers' tab of your replication agent(s) otherwise fix ACLs of the underlying service users - 'version-manager-service' for creating versions and potentially other service users like 'replication-service' etc. You could also test this use case in a fresh instance and copy relevant ACLs to this author instance.

ajayn93

13-03-2019

Hi Gaurav,

Replicating though replication agents only.

In the logs of replication agent it shows Error while building replication content com.day.cq.replication.ReplicationException: RepositoryException during serialization.

Gaurav-Behl

MVP

13-03-2019

Do you replicate manually or programmatically? For manual replication via agents; the url should be '/bin/receive?sling:authRequestLogin=1' 

For programmatic replication, you could use ReplicatOptions/AgentFilter and get hold of pre-configured replication agents and utilize them per your use case. Hence, I'm not able to understand why do you use '/bin/replicate.json' ?

ajayn93

13-03-2019

Hi Prince,

Thank you for the link. i  went through it already.

No running workflows for me.

There is no queue for me.

No recent migration happened.

Can you provide a solution other than these?

Thank you

Prince_Shivhare

13-03-2019

Could you please check the stackoverflow solution here--

replication - Page activation failing in AEM 6.3 - Stack Overflow

  1. Check the status of running workflows in the workflow console: http://localhost:your_port/libs/cq/workflow/content/console.html. Are there any workflows stuck? If so terminate them.
  2. Manually clearing the queue might be a solution. You can achieve this by removing the Sling Jobs with topic =replication agent name. Quickest way to do this is to use CRXDE Lite (http://localhost:your_port/crx/de/index.jsp), and delete the node:

/var/eventing/jobs/assigned/%INSTANCE-SLING-ID%/%REPLICATION-AGENT-FULL-ID%So for example with the default publish agent:/var/eventing/jobs/assigned/e23dd09d-83f1-4735-a77c-394df479214c/com.day.cq.replication.job.publish

  1. Did you migrate to 6.3 from an older AEM version? Then maybe your version history is broken: https://helpx.adobe.com/experience-manager/kb/RecoveryFromBrokenVersionVistory.html
  2. Finally, here is the 6.3 page for troubleshooting the replication: https://docs.adobe.com/docs/en/aem/6-3/deploy/troubleshoot-rep.html

If not, and using some custom process step, check how you retrieve the service user inside the process steps.