Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Users reverse replication

shubhamg9400285
Level 3
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
berliant
Employee
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.

BrijeshYadav
Level 5
Level 5

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


Sling distribution is more appropriate for user synchronization.

User Synchronization

shubhamg9400285
Level 3
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.

BrijeshYadav
Level 5
Level 5

My bad I did not read your question clearly.

Sling distribution is only to synch users among multiple publishers

shubhamg9400285
Level 3
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

jbrar
Employee
Employee

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

shubhamg9400285
Level 3
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.

smacdonald2008
Level 10
Level 10

Users should be created on AUTHOR before Publish.

jbrar
Employee
Employee

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.