Closed oskbed closed 5 years ago
Algorithm used by GAP (being more strict / not gradle 😉) when instance is being initialized firstly is trying to use password defined in instance definition (properties file) then it is dynamically switching to 'admin' when unauthorized status code is detected. AEM initialization is working in that way.. Regardless admin password set - admin' password is predefined, then after some time custom admin password is being activated. That was tested scenario for AEM 6.3. I hope that it is still accurate. If not some issue may be to be addresed but more details are needed to be able to understand the problem.
Greetings, Krystian
You mentioned health checks... Instance Check task has this extension with switching admin password credentials so it should work. Environment check does not have but I am quite sure that it should be run when instance is already initialized so that mentioned fallback mechanism should not be necessary.
Your error looks more like configuration problem, not GAP related.
You could check using debugger if this fallback mechanism is still working here https://github.com/Cognifide/gradle-aem-plugin/blob/master/src/main/kotlin/com/cognifide/gradle/aem/common/instance/check/DefaultCheck.kt#L35. If not we will have regression here in GAP 7. But first please confirm
I can confirm that it is a regression in GAP 7.
previously InstanceSync
was stateful, now it is also stateful but DefaultCheck
and so on BundlesCheck
are being instantiated every time after each group check iteration. So that we are loosing that information that AEM applied custom password at some moment. To handle that, such moment need to be noted in BuildScope
/ not in InstanceSync
being used in DefaultCheck
.
As a workaround, you need to use default password right now admin
, custom passwords support will be recovered in the end of next week at latest.
Thanks for solving this issue! Btw, issue regards both local and remote instance to be precise.
Yep. But affects only instances launched first time.
fixed.
now when running instanceUp
first time / just after instanceCreate
with -i
option, then moment when AEM is starting using customized password is now noticable:
releasing 7.0.5
@oskbed confirmed that fix is working. Closing as released in 7.0.5
Gradle Installer fails during health checks of instance due to not proper password management. Most probably scenario:
Gradle sets custom password for aem but healtchecks are checking default - admin - password. Gradle is checking custom password, but aem still has default password set.
Everythings works just fine if password
admin
is used, but sometimes fails if other is used. It seems, it depends when AEM is started.08.07.2019 11:09:10.540 *ERROR* [qtp762685794-70] org.apache.felix.http.jetty Exception while processing request to /system/console/bundles.json (org.apache.sling.api.auth.NoAuthenticationHandlerException)