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.

Users reverse replication

Avatar

Level 3

How can be reverse replicate users created on publish environment to author environment?

I tried to create workflow launchers for Reverse replication workflow on event "node created" of type "rep:user" but workflow is failing.

AEM 6.4

I am getting this workflow exception

com.adobe.granite.workflow.WorkflowException: Process execution resulted in an error

at com.adobe.granite.workflow.core.job.HandlerBase.executeProcess(HandlerBase.java:204)

at com.adobe.granite.workflow.core.job.JobHandler.process(JobHandler.java:261)

at org.apache.sling.event.impl.jobs.JobConsumerManager$JobConsumerWrapper.process(JobConsumerManager.java:502)

at org.apache.sling.event.impl.jobs.queues.JobQueueImpl.startJob(JobQueueImpl.java:293)

at org.apache.sling.event.impl.jobs.queues.JobQueueImpl.access$100(JobQueueImpl.java:60)

at org.apache.sling.event.impl.jobs.queues.JobQueueImpl$1.run(JobQueueImpl.java:229)

at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)

at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)

at java.lang.Thread.run(Unknown Source)

Caused by: com.adobe.granite.workflow.WorkflowException: Failed to execute process

at com.day.cq.workflow.compatibility.CQWorkflowProcessRunner.execute(CQWorkflowProcessRunner.java:108)

at com.adobe.granite.workflow.core.job.HandlerBase.executeProcess(HandlerBase.java:194)

... 8 more

Caused by: com.day.cq.workflow.WorkflowException: javax.jcr.PathNotFoundException: /home/users/community/c/EN1McTKEo6NWDyHWaf_Z

at com.day.cq.wcm.workflow.process.ReplicatePageProcess.execute(ReplicatePageProcess.java:211)

at com.day.cq.workflow.compatibility.CQWorkflowProcessRunner.execute(CQWorkflowProcessRunner.java:93)

... 9 more

Caused by: javax.jcr.PathNotFoundException: /home/users/community/c/EN1McTKEo6NWDyHWaf_Z

at org.apache.jackrabbit.oak.jcr.session.SessionImpl.getItem(SessionImpl.java:362)

at com.adobe.granite.repository.impl.CRX3SessionImpl.getItem(CRX3SessionImpl.java:168)

at com.day.cq.wcm.workflow.process.ReplicatePageProcess.execute(ReplicatePageProcess.java:176)

... 10 more

9 Replies

Avatar

Employee

In order to workaround the error, you can try to exclude /home/users/community from your workflow launch configuration or add sufficient permissions to /home/users/community for workflow-service account.

Avatar

Community Advisor

I haven't implemented this yet but came across documentation.


Sling distribution is more appropriate for user synchronization.

User Synchronization

Avatar

Level 3

Hi Brijesh,

Thanks for your reply but in the same article  following is writter

" As of AEM 6.1, when user synchronization is enabled, user data is automatically synchronized across the publish instances in the farm and are not created on author."

So doesnt it means user sync works only among publish environments and not from publish to author.

Avatar

Community Advisor

My bad I did not read your question clearly.

Sling distribution is only to synch users among multiple publishers

Avatar

Level 3

Hi i gave all required permissions now workflow is not throwing any error and it is getting completed successfully but user is still not getting replicated to author.

1747397_pastedImage_0.png

1747395_pastedImage_1.png

Avatar

Employee Advisor

On the communities console in author, You can go to the member's tab and it will show you all the users on author. It uses a tunnel service to get users from publish instance.

So, instead of using reverse replication, you can leverage the Tunnel service feature. Check the "Tunnel Service on Author" at [1]

[1] Deploying Communities

Screen Shot 2019-05-06 at 1.28.26 PM.png

Avatar

Level 3

Once I enabled the tunnel service I was able to see data of users in community console but they were nor present under /home/users.

Is there any way we can reverse replicate the node structure as well.

e.g. if a user is created on publish, it should be reverse replicate to author.

Avatar

Level 10

Users should be created on AUTHOR before Publish.

Avatar

Employee Advisor

Can you share the usecase where you require users on author as well? As per the design, you should use tunnel service to check the users but all operations should be performed on publish side.