acs-aem-commons icon indicating copy to clipboard operation
acs-aem-commons copied to clipboard

acs-commons-dispatcher-flush-service Missing from ACS Commons 5.2.0

Open rishabh171294 opened this issue 3 years ago • 1 comments

Required Information

  • [ ] AEM Version, including Service Packs, Cumulative Fix Packs, etc: AEM 6.5.12.0
  • [ ] ACS AEM Commons Version: ACS Commons 5.2.0
  • [ ] Reproducible on Latest? yes/no - Yes

Expected Behavior

Please describe briefly the expected behavior, i.e. when I do X, Y should happen. acs-commons-dispatcher-flush-service service user should be available once be build the ACS AEM Commons package. But the same is missing. I extracted the content zip files and the user is not available under /home/users as well

Actual Behavior

Please describe briefly the actual behavior, i.e. when I do X, Z happens.

Same as above

Steps to Reproduce

Starting from a vanilla instance of AEM at the above version, describe in explicit steps how to reproduce. Link to any supporting assets, e.g. content packages, below

Start a vanilla 6.5.12.0 and upload ACS AEM Commons 5.2.0 packages to it. Then navigate to useradmin and check for acs-commons-dispatcher-flush-service. You will notice that the user is missing.

Links

Links to related assets, e.g. content packages containing test components

rishabh171294 avatar May 31 '22 10:05 rishabh171294

@rishabh171294 the service users are defined using RepoInit scripts

https://github.com/Adobe-Consulting-Services/acs-aem-commons/blob/master/content/src/main/content/jcr_root/apps/acs-commons/config/org.apache.sling.jcr.repoinit.RepositoryInitializer-root-acls.config#L3-L6

You have to install the content package, and RepoInit will see these OSGi configurations and create the service user.

Can you install ACS Commons and then check if the user exists under /home/usets/system/acs-commons? And can you check if the mapping is in place via: http://localhost:4502/system/console/status-InventoryPrinter.323

davidjgonzalez avatar Jun 01 '22 13:06 davidjgonzalez

Hi @davidjgonzalez, Was this issue fixed? The Service user is also missing in ACS Commons 5.4.0.

DasAnk avatar Apr 10 '23 15:04 DasAnk

https://github.com/Adobe-Consulting-Services/acs-aem-commons/blob/master/all/src/main/content/jcr_root/apps/acs-commons/config/org.apache.sling.jcr.repoinit.RepositoryInitializer-acs-commons-all.config#L95-L99

and

https://github.com/Adobe-Consulting-Services/acs-aem-commons/blob/master/all/src/main/content/jcr_root/apps/acs-commons/config/org.apache.sling.serviceusermapping.impl.ServiceUserMapperImpl.amended-acs-commons-all.config#L7

... this is in config so it should be deployed everywhere (author and pub). Just installed latest ACS commons (6.0.6) on my AEM SDK and it looks good 2023-04-10 at 11 27 AM

You mention 6.5.16 .. latest version is 6.0.6 ... ?

davidjgonzalez avatar Apr 10 '23 15:04 davidjgonzalez

Thanks @davidjgonzalez! I am using 5.4.0. Which version was this fixed? Also earlier I used to create the ServiceUser manually and give the required permissions as per https://adobe-consulting-services.github.io/acs-aem-commons/features/dispatcher-flush-rules/index.html

User name: acs-commons-dispatcher-flush-service ACLs: jcr:read, crx:replicate, rep:removeNode on /

This somehow is not working. Do we need to add any more configuration?

DasAnk avatar Apr 10 '23 15:04 DasAnk

I believe that was made in the upgrade to v6.0.0 ...

Assuming that service-user doesnt already exist - you should be able to create it yourself. If you can't create a service-user yourself, then that would make me think something funny is going on w/ you AEM env. Can you make a temp service user by a different name -- if that doesnt work, then something is wrong w you AEM env. If it does, then it sounds like there might be a user already w/ that principal name and your hitting a naming collision?

davidjgonzalez avatar Apr 10 '23 15:04 davidjgonzalez

Thanks @davidjgonzalez! Finally found the root cause of why even after manually creating the user, it wasn't working. Below is the error although I am not sure why page lock is considered when deleting the cache. com.day.cq.replication.ReplicationException: Locked pages cannot be replicated. The owner needs to unlock the page first. Cannot perform replication

DasAnk avatar Apr 10 '23 16:04 DasAnk

@DasAnk Ahh! that would do it! Thanks for posting back - im sure this will help someone down the road!

davidjgonzalez avatar Apr 10 '23 17:04 davidjgonzalez