Highlighted

AEM 6.4 Curl Replicate

Avatar

Avatar

zacharyl1058068

Avatar

zacharyl1058068

zacharyl1058068

29-07-2019

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?

Replies

Highlighted

Avatar

Avatar

Ogun_Adsay

Avatar

Ogun_Adsay

Ogun_Adsay

18-12-2019

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.