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.

AEM 6.4 Curl Replicate

Avatar

Level 1

Has anyone else been seeing issues with the cmd=replicate command for replicating packages from author to publisher, in AEM 6.4.  We have several 6.4 instances, and since migration utilzing them, the jenkins scripts we utilize replication for package installation to the publishers due to network limitations.

We upload and install directly on the author using:

     UPLOAD: curl -H 'Accept: application/json' -u ****:**** -F package=@/$PackagePath/$PackageName http://$Server:4502/crx/packmgr/service/.json/ -F cmd=upload -F force=true
    

     INSTALL: curl -H 'Accept: application/json' -u ****:**** -X POST http://$Server/crx/packmgr/service/.json/etc/packages/$Group/$PackageName -F cmd=install

These commands seem to work without issue and return the expected responses:

     UPLOAD: {"success":true,"msg":"Package uploaded","path":"/etc/packages/[...].zip"}

     INSTALL: {"success":true,"msg":"Package installed"}

However, where we are seeing issue is with the replicate process that has worked up until 6.4.

     REPLICATE: curl -H 'Accept: application/json' -u ****:**** -X POST http://$Server/crx/packmgr/service/.json/etc/packages/$Group/$PackageName -F cmd=replicate

Sometimes this command runs without issue and returns the expected result:

      {"success":true,"msg":"Package is replicated asynchronously"}

However randomly the exact same CURL will return a differently formatted result:

     {"referer":"","path":"/crx/packmgr/service/.json/etc/packages/[...]","parentLocation":"/crx/packmgr/service/.json/etc/packages/[...]","location":"/crx/packmgr/service/.json/etc/packages/[...].zip","status.message":"OK","title":"Content modified /crx/packmgr/service/.json/etc/packages/[...].zip","status.code":200,"changes":[{"type":"modified","argument":"/crx/packmgr/service/.json/etc/packages/[...].zip/cmd"}]}

And even though it appears based on the output ("status.code:200" and "status.message:OK") the replication is not actually happening.

So the question is 2 fold.  Why does the exact same API call generate 2 differently formatted responses in AEM 6.4 only?

And, why does replication not actually process or even become queued in the replication agent when this new "status.message" formatted response is returned?

1 Reply

Avatar

Level 1

Hello, it's probably some issue caused by package manager. I'm getting the same error while deploying packages with Jenkins. 

 

I'm following this disccusion too.