Running AEM in Production Ready Mode


How to run AEM instance in Production ready Mode.

In order to run AEM in production ready mode all you need to do is add the nosamplecontent via the -r runmode switch to your existing startup arguments:

Production readymode/nosamplecontent runmode without ant Database:
java -jar aem-quickstart.jar -r nosamplecontent

Production readymode/nosamplecontent runmode with database :

java -jar aem-quickstart.jar -r author,crx3,crx3mongo,nosamplecontent
-Doak.mongo.uri=mongodb://remoteserver:27017 -Doak.mongo.db=aem-author

Difference between Dafault runmode and nosamplecontent runmode
file

Performance TUNING as part of production ready instances

More specifically, the following configuration changes will be performed when AEM is ran in production ready mode:
  1. The CRXDE Support bundle (com.adobe.granite.crxde-support) is disabled by default in production ready mode. It can be installed at any time from the Adobe public Maven repository. Version 3.0.0 is required for AEM 6.1.
  2. The Apache Sling Simple WebDAV Access to repositories (org.apache.sling.jcr.webdav) bundle will only be available on author instances.
  3. Newly created users will be required to change the password on the first login. This does not apply to the admin user.
  4. Generate debug info is disabled for the Apache Java Script Handler.
  5. Mapped content and Generate debug info are disabled for the Apache Sling JSP Script Handler.
  6. The Day CQ WCM Filter is set to edit on author and disabled on publish instances.
  7. The Adobe Granite HTML Library Manager is configured with the following settings:
    1. Minify: enabled
    2. Debug: disabled
    3. Gzip: enabled
    4. Timing: disabled
  8. The Apache Sling GET Servlet is set to support secure configurations by default, as follows:

ConfigurationAuthorPublish
TXT renditiondisableddisabled
HTML renditiondisableddisabled
JSON renditionenabledenabled
XML renditiondisableddisabled
json.maximumresults1000100
Auto Indexdisableddisabled

/CRX/DE lite console doesn't shows tree nodes Hierarchy

Statement : CRX/DE lite console shows Blank.

Solution :


  1. Go to the FLeix console  /system/console/configMgr 
  2. Search for config "Apache Sling DavEx Servlet
  3. And set /server to /crx/server
  4. Save the changes.
  5. go back the crx/de lite console and vlaidate.



Note : running AEM in Production Ready Mode will effectively disable access to CRXDE Lite on author instances.

How to perform web accessibility for any site

Statement - How to perform the Web accessibility test for any site.

Solution :

Use online tools to check the website accessibility:




Web accessibility can performed on below parameters:

  1. Web page URL
  2. HTML file upload
  3. HTML Markup


Check Accessibility By:
 
   

Guidelines to Check Against

   
   
   

Report Format





  • Post the click on check it button , below results shown with solutions to be implemneted.

Accessibility Review

Accessibility Review (Guidelines: WCAG 2.0 (Level AA))

            


1.1 Text Alternatives: Provide text alternatives for any non-text content


Success Criteria 1.1.1 Non-text Content (A)


Check 1: img element missing alt attribute.
Repair: Add an alt attribute to your img element.
Error Line 176, Column 25:

Error Line 196, Column 25:

Error Line 217, Column 25:

1.4 Distinguishable: Make it easier for users to see and hear content including separating foreground from background.


Success Criteria 1.4.4 Resize text (AA)


Check 117: i (italic) element used.
Repair: Replace your i elements with em or strong.
Error Line 279, Column 24:
TIVICAY ®

Report Generation :


  1.  Result can be exported into pdf/HTML/CSV format.
  2. Report can be exported based on the type of accessibility validation(ex: CSS validation errors report, HTML validations ,likely , known and potential valdiations)

Other Online tools for web page accessibility online testing


Steps to be followed:
  1. Key in the website URL and click on test.
  2. It shows Test results
  3. You can download the report
  4. You can view the best practices and instances of failure as per web accessibility standard.
  5. you can also see the total compliance % of your site for Accessibility check refer the below screenshot.

     6. Sample download report in .xls format. refer the instance details to fix the missing details


     7. That's It!.


Steps for in place migration from AEM 6.1/6.2 to AEM 6.4

Statement - AEM 6.2 in place upgrade


Solution :



  1. AEM 6.2 instance up and running
  2. perform sanity check to see consoles are working fine
  3. Remove all custom code and configs and follow the pre-requisite - https://aemexperts.blogspot.com/2019/03/aem-64-upgrading-code-and-customizations.html
  4. Check “quickstart.properties” file is present under /crx-quickstart/conf. If not, copy from other instance and paste it under /crx-quickstart/conf
  5. Run offline compaction to reduce repository size and follow this URL :https://aemexperts.blogspot.com/2019/03/aem-offline-compaction.html
  6. Goto packageshare and download the package 

    pre-upgrade-package-cq62-1.2.zip

  7. Navigate to package manager and install the 

    pre-upgrade-package-cq62-1.2.zip



         Pre-upgraded package contain the purging of below taks
    • com.day.cq.wcm.core.impl.VersionPurgeTask
    • WorkflowPurgeTask
    • com.day.cq.audit.impl.AuditLogMaintenanceTask
    • GenerateBundlesListFileTask
    • DisableReplicationAgentsTask
   8. Once package is installed, navigate to OSGI Config Manager. Search for "preupgrade".     Look for com.adobe.aem.upgrade.prechecks.mbean.impl.PreUpgradeTasksMBeanImpl.

  9. 

Lets understand what these are parameters do:

  1. VersionPurge: used to purge page versions.
  2. GenerateBundlesListFileTask: List of bundles will be checked and placed in some path. check in the log file. 
  3. DisableReplication: Disable replication agents
  4. WorkflowPurgeTask:  Purge workflow. 
  5. com.day.cq.audit.impl.AuditLogMaintenanceTask: Audit log in logger.

NOTE: If you run any task which you not configured then pre-upgrade task gets fail.



 Finally click on invoke to execute the pre-upgraded tasks.










Post preupgrade task run identify the which all packages API will not available in upgraded version.






11. Stop AEM 6.2 server and remove files under crx-quickstart/install



12. Place your AEM 6.4 jar on the same place where AEM 6.2.jar placed.
13. Run the below command: D:\AEM 6.2\aem6.2upgrade>java -Xmx2048m -jar cq-author-p4502.jar -unpack
        once successful you can see the below message.

14. Place the latest Crx2Oak.Jar file under D:\AEM 6.2\aem6.2upgrade\crx-quickstart\opt\extensions
you can download the latest crx2oak.jar file from below location.
https://repo.adobe.com/nexus/content/groups/public/com/adobe/granite/crx2oak/
15. Migrate the repository of AEM 6.2 to AEM 6.4 
 Context : because 6.3 introduced a new format for the SegmentNodeStore, which is the basis of the TarMK implementation. If you are upgrading from a version older than AEM 6.3, this will require a repository migration as part of the upgrade, involving system downtime.
AEM 6.2 to AEM 6.4 repository migration is needed. use the below command to run repository migration.
  commond to runjava -Xmx2048m -jar cq-author-p4502.jar -v -x crx2oak -xargs -- --load-profile segment-no-ds

finaly it shows migration completed as shown in below with some I/O error which are critical for the migration completion follow the step 16 to resolve the issue.

16. Post repository migration below issues are found in the console and upgrade log file.

23.10.2018 20:11:02.935 ERROR  c.a.g.c.u.f.DirectoryElementsSwitcher: The I/O er
ror occurred when switching directories.
  To complete migration you need to manually move the following files in the fol
lowing order:
                                                Source |  Operation |
                             Destination
    ...2upgrade\crx-quickstart\repository\segmentstore | -- MOVE -> | ...ory-crx
2oak-backup-20181023-200733\segmentstore
    ...sitory-segment-tar-20181023-200722\segmentstore | -- MOVE -> | ...2upgrad
e\crx-quickstart\repository\segmentstore

  Under UNIX you can try with the following commands:
    mv D:\AEM 6.2\aem6.2upgrade\crx-quickstart\repository\segmentstore D:\AEM 6.
2\aem6.2upgrade\crx-quickstart\repository-crx2oak-backup-20181023-200733\segment
store
    mv D:\AEM 6.2\aem6.2upgrade\crx-quickstart\repository-segment-tar-20181023-2
00722\segmentstore D:\AEM 6.2\aem6.2upgrade\crx-quickstart\repository\segmentsto
re

  Under Windows you can try with the following commands:
    move D:\AEM 6.2\aem6.2upgrade\crx-quickstart\repository\segmentstore D:\AEM
6.2\aem6.2upgrade\crx-quickstart\repository-crx2oak-backup-20181023-200733\segme
ntstore
    move D:\AEM 6.2\aem6.2upgrade\crx-quickstart\repository-segment-tar-20181023
-200722\segmentstore D:\AEM 6.2\aem6.2upgrade\crx-quickstart\repository\segments
tore


Move the above directories either manually or through command line in windows/unix.
i have manually moved  ...2upgrade\crx-quickstart\repository\segmentstore  folder to ...ory-crx
2oak-backup-20181023-200733\segmentstore

and Moved  ...sitory-segment-tar-20181023-200722\segmentstore  folder  to   ...2upgrad
e\crx-quickstart\repository\segmentstore

17. that's all now Start AEM 6.4.

18. It starts new segment tar repository and also perform re-indexing. it will take atleast 20 to 30 minutes based on the repos size. you will see the below message in error.log 

org.apache.jackrabbit.oak.plugins.index.IndexUpdate Reindexing completed

19. Navigate to product information console to see the product version.

20. Troubleshooting steps Post AEM start up for below error:
    Access the siteadmin console and other console to verify the consoles are                 working fine. 



  • in my case there was no error in the log files, all bundles were active.
  • No error in the upgrade log file
  • except siteadmin and Projects console all other consoles working, resource not found error while accessing the siteadmin console.

4.10.2018 16:17:38.255 *ERROR* [0:0:0:0:0:0:0:1 [1540368984623] GET /libs/cq/personalization/touch-ui/content/v2/audiences.html HTTP/1.1] org.apache.sling.servlets.resolver.internal.SlingServletResolver Calling the error handler resulted in an error

24.10.2018 16:17:38.268 *ERROR* [0:0:0:0:0:0:0:1 [1540368984623] GET /libs/cq/personalization/touch-ui/content/v2/audiences.html HTTP/1.1] org.apache.sling.servlets.resolver.internal.SlingServletResolver Original error class org.eclipse.jetty.io.RuntimeIOException
org.eclipse.jetty.io.RuntimeIOException: org.eclipse.jetty.io.EofException



Solution : did unbind of sling servlet resolver and restarted the AEM. issues got resolved.



Post migration Checklist:


Reference document :



Pattern Detector to check the impact on the code base migration

https://helpx.adobe.com/experience-manager/6-4/sites/deploying/using/pattern-detector.html#HowtoUse














AEM Server Startup Sequence

AEM  Server Startup Sequence :The elements required for CQAEM WCM are started in the following sequence (bottom-up):
Server Startup Sequence

Basics of AEM

Nice article on Basics of AEM :

Reference :

https://prezi.com/i97-ptdowxfi/aemcq-architecture/


Building Block of AEM or Basics of AEM


Solution :

Building Blocks Of AEM


  1. Persistence: Apache Jackrabbit Oak
  2. HTTP Request Processing: Apache Sling
  3. Dynamic Library Management: Apache Felix 
  4. Adobe Granite (Enterprise version of Oak, Sling, Felix, some more feature) used to be called CRX. It is infact OSGI wrapper of CRX
  5. Authoring Experience: ExtJS, CoralUI, JQuery, Handle Bar
  6. Publishing Experience: Any Framework


Apache Sling:

  1. REST Based Web Framework for HTTP request processing
  2. It uses JCR for content repository to store content
  3. Uses Apache felix for dynamic module management
  4. Support for Scripting (JSP, ECMA, Scala)
  5. Building Block for resource resolution within AEM
  6. Provide API for Servlet Support, Scheduler, Event Handling (Both Synchronous and non synchronous), Discovery (For Load distribution), Resource CRUD operations (READ, DELETE, CREATE, UPDATE), Sling Models, Thread pools, JMX, Sling Mock, Sling Adapt, XSS
Apache sling script resolution understanding- 
  • Http request --> 
  • content resolution -->
  • Get resource type -->
  • script location -->
  • script name-->
  • Script -->
  • include options.

Apache Felix
  1. One of the implementation of OSGI framework
  2. Provides web based console for managing Dependency and configuration.
  3. Provide services like (All based on OSGI Specification) 
    1. Dependency Manager
    2. HTTP service (For servlet,filter, resource registration, This run within Jetty for AEM6)
    3. Maven Bundle and SCR Plugin
    4. Event Admin (Bundle based Event)
    5. Config Admin
    6. OSGI Bundle repository 
    7. Logger
    8. File Install

Adobe Granite / CRX
  1. Enterprise version of Content Repository
  2. Based on Apache Sling / Felix / JCR
  3. Provide following additional features
    1. Package Manager
    2. Additional persistence Plug in (Tar, Oracle, MySQL, DB2)
    3. UI for all JCR operations including version management, node type management, user management
    4. CRXDE light code code management
    5. Repository Backup and Clustering Support
    6. Replication
    7. LDAP Support 
    8. Operation support (Tar optimization)
Adobe AEM / CQ
  1. Enterprise product for Web Content Management
  2. Build on top of CRX / Granite Platform
  3. Provide following features apart from CRX
    1. Authoring UI (Template and component management)
    2. Digital Asset Management
    3. Personalization
    4. Mobile Module
    5. Ecommerce module
    6. Plugin feature with Adobe Cloud services for all web related task (AB testing, Analytics etc)
    7. SOCO (Social Collaboration Module)
    8. Tagging 
    9. Report and Monitoring 
    10. Additional Features ...
    11. Scalability (Sharding)
    12. Availability (Replication)
    13. Disaster Recovery (DR, Replication)
    14. Monitoring (JMX)
    15. Build (Maven, Gradel)
    16. Deployment (Any deployment Tool)
    17. Templating (Slightly)
    18. Portal Management (OOTB)
    19. AEM provide you platform to create, manage, and optimize digital customer experiences across every channel, including web, mobile apps, digital forms, and communities. With the ability to deliver next-generation experiences across both online and in-person interactions, you can increase demand and build lasting brand loyalty.
    20. Originally created by Day Software. First version of CQ was released in 2002
Apache Jackrabbit
  1. Implementation of JCR Spec JSR-283
  2. Stateless, sessionless, JSON model
  3. Provide feature like Node Type Management, Query, versioning, Observation, Security (ACL, Authentication, Authorization), Locking
  4. MVCC (MultiVersion Concurrency Control) model
  5. Jackrabbit Architecture 
  6. Microkernal API org.apache.jackrabbit.mk
  7. Oak API org.apache.jackrabbit.oak
  8. JCR API javax.jcr and all existing API


How to find out the no of pages ,site URL,Size of page and SEO details of any site.

Solution:



Always refer the sitemap file any website to find out the no of pages
        Online Tools for Broken link checker count :


            https://www.brokenlinkcheck.com/broken-links.php#status

        Online tools to check page size and SEO details.


        Online tools to list the page URL



       Online tools to check the Internal and External links
          https://smallseotools.com/website-links-count-checker/
  • This Link Count Checker tool is very easy to use. You only need to enter the URL in the text field and then click on the “Check” button. Our system uses a unique algorithm that will process your request and will generate the result in an instant. The results will show you the following information:

      • Total links
      • Internal links
      • External links
      • Nofollow link
      • Dofollow links

  1. Total links – is the total number of internal and external links that a website has. There are website links count checker tools that will also specify the number of duplicate links and empty anchors.
  2. Internal links - are link pages that can be found on a website. They are commonly linked through the website menu or by interlinks.
  3. External links – are the links to other websites or also known as partner websites. The higher the number of external links that a website has the better for search engine optimization. But, all links should be with relevant and reliable websites and not spam sites.
  4. Nofollow link - are typically shown in red as they indicate threat. The extent of threat that they have to a website is still debatable. Still, you must avoid nofollow links. Popular social media sites like Facebook and Twitter are automatically No-follow.
  5. Dofollow link – are links that allow Google and other search engines to follow them and reach your website. This is link is beneficial for the website because it can help you get a good page ranking on search engines.
  6. There are some website links count checker tools that can also identify the anchor text which is linking your website to another site. This can help you in analyzing the text to create more Dofollow links.