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-Sync Content between Publishers

Avatar

Level 2

Hi,

There are 2 publishers in our project and there is a use case where nodes under /etc/myproject will be updated in one publisher. We want to sync the content in /etc/myproject between publishers and I was trying to implement Sync Distribution of SCD in my local. I made some modification under /etc/myproject and ran the command curl -u admin:admin http://localhost:5443/libs/sling/distribution/services/agents/pubsync -d “action=ADD” -d “path=/etc/myprojcet/abc”. It was success. {"success":true,"state":"ACCEPTED","message":"[QUEUED]"}

 

But when I tried to run pull command 

curl -u admin:admin http://localhost:4502/libs/sling/distribution/services/agents/distribution-sync -d "action=PULL" got failure response. {"success":false,"state":"DROPPED"} Below is the error coming in logs. Can anyone help us with this.

 

18.12.2020 22:41:00.924 *ERROR* [127.0.0.1 [1608311460915] POST /libs/sling/distribution/services/exporters/pubsync HTTP/1.1] org.apache.sling.distribution.packaging.impl.exporter.AgentDistributionPackageExporter Error exporting package
org.apache.sling.distribution.common.DistributionException: Could not find queue
at org.apache.sling.distribution.packaging.impl.exporter.AgentDistributionPackageExporter.getQueueOrThrow(AgentDistributionPackageExporter.java:192)
at

 

3 Replies

Avatar

Employee Advisor

@akhilat16351269

This would happen if the exporter/ importer are either not created in publish or the name/endpoints are not same as those configured in author Sync Distribution agent (in this case "distribution-sync"). As per logs it's looking for exporter "/libs/sling/distribution/services/exporters/pubsync".

Once these are configured correctly, sync would work.

You can refer to these links for details:

https://github.com/apache/sling-old-svn-mirror/blob/trunk/contrib/extensions/distribution/README.md#...

https://www.albinsblog.com/2020/08/sling-content-distribution-in-aem-sync-content-between-publish-in...

Avatar

Level 2

Thanks @shelly-goel

Let me recheck all configurations once more and try.

Is there any restriction that nodes under /etc can't be distributed in this way? The node that I am trying is under /etc.

Avatar

Employee Advisor
@akhilat16351269 /etc or any path should not be an issue as long as the path is added into 'Allowed Roots' in Queue Distribution Agent of publish instnaces. I just tried with path '/etc/project1' and I get {"success":true,"state":"ACCEPTED","message":"[QUEUED]"} on PULL