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.

Sling Content Distribution not working in AEM Cloud

Avatar

Level 2

Requirement: Any content change under var folder for a project specific path should be replicated to publish instance. 

Approach decided: Forward sling distribution.

 

Post configurations deployment on cloud environment. Agent is getting created on environment along with all the configuration are also in place. For the content changes triggers are also working and request is reaching to agent, as we can see request in agent logs.

Forward sling distribution is not working in AEM cloud. we are getting below error.

org.apache.sling.distribution.common.RecoverableDistributionException: not enough rights

 

Although same configuration we have used on AEM 6.5 local instance and it's working fine. We are not using default agents or service users. We have added all the required ACL's permissions to the user.

 

We have add following configs for environments  :

 

Author Instance:

1. Forward agent config:

{
"name":"fwdistribution",
"title":"fwdistribution",
"details":"This agent pushes content from author to publish",
"enabled":true,
"serviceName": "distributionSubService",
"log.level":"info",
"allowed.roots":[
"/var/ugcContents"
],
"queue.processing.enabled":true,
"packageImporter.endpoints":[
"endpoint0=https://publish.adobeaemcloud.com/libs/sling/distribution/services/importers/ugcfwimporter"
],
"triggers.target":"(name=jcrsync)"
}

 

2. Trigger config:

{
"name":"jcrsync",
"path":"/var/ugcContents",
"serviceName":"distributionSubService",
"deep": true
}

 

Publish Instance:

1. Importer config:

{
"name":"ugcfwimporter",
"packageBuilder.target": "(name=default)"
}

 

Thanks in advance for any help.

17 Replies

Avatar

Community Advisor

Hi @binary0010 

 

The error clearly says some issues with the permissions. Can you check if this is happening with other paths (like /content) as well to further understand the problem? 

 

Thanks,
Kiran Vedantam.

Avatar

Level 2

Have changed path but still we are getting same error in the agent logs:

binary0010_0-1673509411663.png

 

Avatar

Level 2

We have followed the same and added all the required ACL's permissions but same issue we are facing.

Avatar

Level 2

Same document has been followed and things were working fine in 6.5 version but not on cloud.

Avatar

Employee Advisor

Why do you use Sling Distribution and not the replication API? It's not clear from your post if you need to distribute content from author to publish or from publish to publish.

Avatar

Level 2

We have requirement to implement forward and reverse content distribution. As of now we have done changes for forward distribution but facing these issues. 

We need to distribute content from author to publish.

Avatar

Level 4

Hi @binary0010 ,

 

have you got the solution to this , we are getting the same error on cloud , on my local cloud SDK , i am getting same error , i am using admin user with full access on /content

 

Thanks

Avatar

Level 1

Hi @tnik,

 

No i have not found the solution for it, Had changed my approach.

 

Regards,

Ankit

Avatar

Level 4

Hi @Jörg_Hoh , 

 

I am not trying to do reverse replication , i am trying to sync content between two cloud author instances using SCD Forward sling distribution , but when triggering the queue getting below error

org.apache.sling.distribution.common.RecoverableDistributionException: not enough rights

 

Thanks,

 

Avatar

Employee Advisor

You mean why want to built author-to-author replication between 2 AEM CS Prod environments?

Avatar

Level 4

Hi @Jörg_Hoh ,

 

I am trying to automate the content sync between two AEM CS author instances and was trying to sync the content using Forward Sling distribution on the basis of triggers , I created a custom queue with my target import instance as another author , but the sync is throwing above error 

 

org.apache.sling.distribution.common.RecoverableDistributionException: not enough rights

Avatar

Employee Advisor

To help here further, one would need to understand your implementation details much better, especially on which system this exception is written.

 

Are these 2 authoring instances part of the same AEM CS program? In that case, would the Content Copy tool work for you?

 

Avatar

Level 4

@Jörg_Hoh - the two cloud instances are part of different program and i did the same thing as described in this post , created two osgi config one for importer on target instance and one agent on source instance and then added the target endpoint in source instance agent osgi config , but getting the above error

 

the exception is coming on source cloud instance from where the sync is being triggered

 

Thanks,

Avatar

Employee Advisor

can you post the complete exception including the relevant parts of the stacktrace, so we can actually find out what went wrong here? the exception message alone is not enough.

 

But also: can you please raise a feature request here and describe your usecase a bit better, especially why you want to synchronize content between 2 AEM CS programs, and what content you are synching (amount & frequency). Then I will point a few Adobe folks to it. This requirement is new, and I would really like to understand what made you go into that direction. Because if that case shows up more often, there's a good chance that this will be incorporated into the product itself.

Thanks,
Jörg

 

btw: It took that long to understand what you are actually doing, because in the initial post you wrote about activating to publish instances.