gradle-aem-plugin icon indicating copy to clipboard operation
gradle-aem-plugin copied to clipboard

Intermittent provisioning error

Open pun-ky opened this issue 4 years ago • 9 comments

* What went wrong:
Execution failed for task ':env:aem:instanceProvision'.
> Cannot perform provision step 'enableCrxDe' on LocalInstance(name='dev-author', httpUrl='http://localhost:4502')! Cause: Cannot save repository node '/var/gap/provision/step/enableCrxDe' on LocalInstance(name='dev-author', httpUrl='http://localhost:4502'). Cause: Failed request to POST http://localhost:4502/var/gap/provision/step/enableCrxDe HTTP/1.1! Cause: Repository error. Unexpected response from LocalInstance(name='dev-author', httpUrl='http://localhost:4502'): HTTP/1.1 500 Server Error
  {"referer":"","path":"/var/gap/provision/step/enableCrxDe","parentLocation":"/var/gap/provision/step","location":"/var/gap/provision/step/enableCrxDe","status.message":"org.apache.sling.api.resource.PersistenceException: Unable to commit changes to session.","title":"Error while processing /var/gap/provision/step/enableCrxDe","status.code":500,"error":{"class":"org.apache.sling.api.resource.PersistenceException","message":"Unable to commit changes to session."},"changes":[]}

pun-ky avatar Apr 21 '21 14:04 pun-ky

once again similar error - image

krystian-panek-vmltech avatar May 05 '22 10:05 krystian-panek-vmltech

another error when doing deployment

[2022-06-02T13:59:44.696Z] Execution failed for task ':env:local:aem:instanceDeploy'.
[2022-06-02T13:59:44.696Z] > Cannot read properties of node '/etc/packages/com.acme/acme-web-frontend-package-4.26.0-SNAPSHOT.zip/jcr:content/vlt:definition' on LocalInstance(name='dev-author', httpUrl='http://localhost:4502'). Cause: Failed request to GET http://localhost:4502/etc/packages/com.acme/acme-web-frontend-package-4.26.0-SNAPSHOT.zip/jcr:content/vlt:definition.json HTTP/1.1! Cause: Repository error. Unexpected response from LocalInstance(name='dev-author', httpUrl='http://localhost:4502'): HTTP/1.1 503 Service Unavailable
[2022-06-02T13:59:44.696Z]   <html>
[2022-06-02T13:59:44.696Z]   <head>
[2022-06-02T13:59:44.696Z]   <meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
[2022-06-02T13:59:44.696Z]   <title>Error 503 AuthenticationSupport service missing. Cannot authenticate request.</title>
[2022-06-02T13:59:44.696Z]   </head>
[2022-06-02T13:59:44.696Z]   <body><h2>HT

krystian-panek-vmltech avatar Jun 02 '22 14:06 krystian-panek-vmltech

both reading properties and checking existence could have retry mechanism to avoid such problems

krystian-panek-vmltech avatar Jun 02 '22 14:06 krystian-panek-vmltech

https://github.com/wttech/gradle-aem-plugin/issues/834#issuecomment-1144957002 fixed by #905

krystian-panek-vmltech avatar Jun 03 '22 10:06 krystian-panek-vmltech

initial issue seems to be fixed. instance deploy is now checking stability before. but node existence checking need to have retry mechanism for sure and that need to be improved.

krystian-panek-vmltech avatar Jul 15 '22 08:07 krystian-panek-vmltech

Current error, while performing backup recover to running instance: Execution failed for task ':env:instanceUpgrade'.> Cannot check repository node existence: /var/gap/package/deploy/c11484cb on LocalInstance(name='local-publish', httpUrl='http://localhost:4503'). Cause: Failed request to HEAD http://localhost:4503/var/gap/package/deploy/c11484cb.json HTTP/1.1! Cause: Unexpected status code '503' while checking node '/var/gap/package/deploy/c11484cb' existence on LocalInstance(name='local-publish', httpUrl='http://localhost:4503')!

mariusz-pacyga-wttech avatar Jul 18 '22 07:07 mariusz-pacyga-wttech

https://github.com/wttech/gradle-aem-plugin/blob/5790cdf808e86ce81b3ce77a782e7a36b9db7d94/src/main/kotlin/com/cognifide/gradle/aem/common/instance/service/pkg/PackageManager.kt#L463

this line need to be protected with retry mechanism; this is caused because deployAvoidance feature which could be disabled to avoid the error for now

krystian-panek-vmltech avatar Jul 18 '22 10:07 krystian-panek-vmltech

for the initial error, how about increasing default actionRetry from 1 to 3?

https://github.com/wttech/gradle-aem-plugin/blob/5790cdf808e86ce81b3ce77a782e7a36b9db7d94/src/main/kotlin/com/cognifide/gradle/aem/common/instance/provision/step/AbstractStep.kt#L67

krystian-panek-vmltech avatar Jul 18 '22 10:07 krystian-panek-vmltech

instance.packageManager.deployAvoidance=false as the temporary solution for Cersei project

mariusz-pacyga-wttech avatar Jul 18 '22 11:07 mariusz-pacyga-wttech

closing as probably fixed, reopen if needed

krystian-panek-vmltech avatar Nov 21 '22 12:11 krystian-panek-vmltech