Failure in building package via curl command (503), but successful when build from /crx/packmgr. Is there any size limit only for curl commands? | Community
Skip to main content
February 2, 2023
Solved

Failure in building package via curl command (503), but successful when build from /crx/packmgr. Is there any size limit only for curl commands?

  • February 2, 2023
  • 1 reply
  • 2216 views

I am trying to create, update and build a package using curl commands, but build steps fail with response curl: (22) The requested URL returned error: 503

On /crx/packmgr when I check it shows package last built time stamp, but even on retrying build fails.

On building directly from /crx/packmgr build is successful in nearly 75s

Package size - 25.3 MB
Here are my curl commands:

 

curl --fail -u "$AUTH_USERNAME":"$AUTH_PASSWORD" -X POST $STG/crx/packmgr/update.jsp -F path=/etc/packages/my_packages/content-sync.zip -F packageName=content-sync -F groupName=my_packages -F filter="[{\"root\":\"/content/abc/website\", \"rules\":[{\"modifier\" : \"exclude\", \"pattern\" : \"/content/abc/website/de\"},{\"modifier\" : \"exclude\", \"pattern\" : \"/content/abc/website/ef\"} ] } ]" -F '_charset_=UTF-8'

Response - {"success":true,"msg":"Package updated successfully","path":"/etc/packages/my_packages/content-sync.zip"}

 

curl --fail --retry 2 --retry-delay 100 -u "$AUTH_USERNAME":"$AUTH_PASSWORD" -X POST $STG/crx/packmgr/service/.json/etc/packages/my_packages/content-sync.zip?cmd=build

Response - 

curl: (22) The requested URL returned error: 503
Warning: Transient problem: HTTP error Will retry in 100 seconds. 2 retries
Warning: left.
curl: (22) The requested URL returned error: 503
Warning: Transient problem: HTTP error Will retry in 100 seconds. 1 retries
Warning: left.
curl: (22) The requested URL returned error: 503

Is there any size limit only for curl commands? or any other way to do this?

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by arunpatidar

I am trying this on AEM cloud. Yes you are correct, to me also it seems like package is built but timeout gives 503, but even after multiple retries it fails.
How can I avoid timeout? Already increased it to delay of 100s.


I am not sure if you can change that, you must check with Adobe.

For AMS or locally hosted, we used to access the AEM using direct AEM Author url i.e. host:port 

 

1 reply

BrijeshYadav
Level 5
February 2, 2023
user11990Author
February 2, 2023

Hi @brijeshyadav 

This command works fine for me as well in other cases, this is a particular case where it is failing where I feel the size of package built is large.

arunpatidar
Community Advisor
Community Advisor
February 2, 2023

Are you trying this in local or hosted AEM?

It maybe possible that the package is building but due to timeout the 503 error shown.

Arun Patidar