Showing posts with label crx-quickstart. Show all posts
Showing posts with label crx-quickstart. Show all posts

December 28, 2020
Estimated Post Reading Time ~

How to install multiple packages in CRX/DE on a clean instance?

You are ready to ship your project packages and package-dependencies over to your customers. You have 7+ packages that need to be individually installed; installing 7 packages is manually is not the best approach, and it will take too long (imagine when there are 5 AEM instances that need to be configured). 

What is the fastest way to install multiple packages into CRX/DE? 
The answer is automation.

Pre-requisites:
  • Standalone AEM instance, quickstart jar
  • Java SE installed on your machine
  • CQ5.5 and above
To install multiple packages in CRX/DE during a clean application startup automatically
  1. Open terminal or command line, and change directory to your standalone AEM instance, quickstart jar file.
  2. In the terminal or command line: java -jar cq-author-4502.jar -unpack
  3. This line of code unpacks the installation files for the jar file, and will not run AEM. You should see a /crx-quickstart folder being generated.
  4. Create the folder “install” under “/crx-quickstart/install”.
  5. Include all the packages in the “install” folder; this will upload and install all the packages within the folder on an application startup; packages will install in alphabetical order.
  6. Start AEM.
  7. Visit CRX/DE Lite, package manager to ensure all packages are installed(http://localhost:4502/crx/packmgr/index.jsp).
  8. Done.
NOTE:
When working with AEM 6.3 forms package addon, I suggest not include the forms packages in the automation. This will break your AEM instance. I tried it multiple times.


By aem4beginner

September 22, 2020
Estimated Post Reading Time ~

Getting forbidden response for AEM login page

If you are facing a problem accessing the AEM login page; /libs/granite/core/content/login.html and getting HTTP ERROR 403, FORBIDDEN and in the log you are getting below error message. It means somehow you have updated the SlingAuthenticator configuration.

*INFO* [0:0:0:0:0:0:0:1 [1402592178132] GET / HTTP/1.1] org.apache.sling.auth.core.impl.SlingAuthenticator getAnonymousResolver: Anonymous access not allowed by configuration - requesting credentials
*INFO* [0:0:0:0:0:0:0:1 [1402592178132] GET / HTTP/1.1] org.apache.sling.auth.core.impl.SlingAuthenticator handleLoginFailure: Unable to authenticate anonymous user: Login Failure: all modules ignored



AEM login page forbidden

Resolution:
Step 1: Under the configuration "Apache Sling Authentication Service" verify the entry of login page in property Authentication Requirements (sling.auth.requirements) set with minus symbol [-/libs/granite/core/content/login]. If you found the correct entry then check the second step.

Step 2: We have another property sling.auth.anonymous.user under the same configuration. Somehow this property has been updated hence the system is unable to open the login page which should be accessible to anonymous users. 

Explanation of sling.auth.anonymous.user property; it defines which user name to assume for anonymous requests, that is requests not providing credentials supported by any of the registered authentication handlers. If this property is missing or empty, the default is assumed which depends on the resource provider(s). Otherwise anonymous requests are handled with this user name. If the configured user name does not exist or is not allowed to access the resource data, anonymous requests may still be blocked. If anonymous access is not allowed, this property is ignored.

To fix this issue, go to AEM config manager [/system/console/configMgr] and search for "Apache Sling Authentication Serviceor go directly using this link in your local AEM instance http://localhost:4502/system/console/configMgr/org.apache.sling.engine.impl.auth.SlingAuthenticator

But since, we are unable to login to the AEM, and without login, we cant access the Felix console(config manager). Hence we will update the config from the crx-quickstart repository. The same config file we will find in our crx-quickstart folder under directory launchpad
\crx-quickstart\launchpad\config\org\apache\sling\engine\impl\auth
in this file if you see there is some value assign to property sling.auth.anonymous.user then make it empty like sling.auth.anonymous.user=""

Sample SlingAuthenticator.config file
:org.apache.felix.configadmin.revision:=L"2"
auth.annonymous=B"false"
auth.http="preemptive"
auth.http.realm="Sling\ (Development)"
auth.sudo.cookie="sling.sudo"
auth.sudo.parameter="sudo"
auth.uri.suffix=[ \
"/j_security_check", \
]
service.pid="org.apache.sling.engine.impl.auth.SlingAuthenticator"
sling.auth.anonymous.user=""
sling.auth.requirements=[ \
"+/", \
"-/libs/granite/core/content/login", \
"-/etc.clientlibs", \
"-/etc/clientlibs/granite", \
"-/libs/dam/remoteassets/content/loginerror", \
]



By aem4beginner

May 13, 2020
Estimated Post Reading Time ~

Installing an Adobe AEM application

This document will explain how to install a AEM application. For example, the application found in this site: http://github.com/drginm/AEM-Recipes/releases.

1) Click in the Adobe Experience Manager icon;
2) Click in the hammer icon on the left;
3) Click in Deployment;
4) Click in Packages;
5) Click in Upload package on the top;
6) Click in browse and select the app file;
7) Back to the apps list you should the new app, click in Install;
8) After the package is installed, click in More -> Replicate.


By aem4beginner

Installing Adobe AEM

Before installing you should have two files:
a) `license.properties`;
b) `AEM_x.x_Quickstart.jar`.

To install:
1) Create a folder named 'Author';
2) Copy the two files to inside this folder;
3) Rename the jar file to `aem-author-4502.jar`;
5) Create a folder named 'Publish';
6) Copy the two files to inside this folder;
7) Rename the jar file to `aem-publish-4503.jar`.

Default user: admin
Default password: admin


By aem4beginner

April 26, 2020
Estimated Post Reading Time ~

Logging in Operations Dashboard in AEM 6.X

This post will discuss logging via the Operations Dashboard in AEM 6.0 and beyond, and will also include a short tutorial to set it up for quick troubleshooting for developers and system operators alike.

Introduction
Have you ever wondered how some developers find the root cause of a lot of AEM problems faster than you can think of? Yes, you guessed it right. Reading the logs! This blog is going to discuss in brief an alternative way to read logs in AEM 6.0 and above. This method utilizes the Operations Dashboard. Please note that this is NOT a tutorial to set up regular logging in AEM. 

For that, you may want to read this, which is way more powerful. Instead, this method should be used to have a quick check from within the browser for minor errors and issues. This Logging method does not relate to the regular logging system in AEM, for this logging system stores all the messages in in-memory storage. 

So, whatever way you configure your regular AEM logging system is independent of the regular log files and vice-versa, which means, changing the log levels in one of these will never affect the other. Another important point to note is that by default, all the ERROR level messages are logged in the operations dashboard logging system. 

To see other types of logs messages here, like DEBUG, INFO, or WARN, you have to configure the dashboard differently. You can set it up to log messages from certain packages or your entire AEM system. All these can be done by clicking the GEAR icon in the logging page (libs/granite/operations/content/diagnosis.html) within the Operations dashboard.

Quick Setup
In your AEM console, go to Tools > Operations > Dashboard > Diagnosis > Log Messages. This is where you will see the logged messages that you choose.
Click the GEAR icon in the upper left corner of this page and you'll see the following screen.

A log level of WARN will capture all the ERROR and WARN level messages in the chosen package. If the root is chosen, all the packages will be considered.
Similarly, a log level of INFO will capture all the ERROR, WARN, and INFO level log messages.

And, a log level of DEBUG will capture all the levels from the respective package.

Note: You cannot set the system to capture only ERROR messages via a specified filter. All ERROR messages will be captured by default, as mentioned earlier.


By aem4beginner

AEM 6.1 Downgrade of a Java version and QuickStart shows UnsupportedClassVersionError major.minor version 52.0

Sometimes we get below error when accessing any AEM pages.

Caused by: java.lang.UnsupportedClassVersionError: org/apache/jsp/apps/sling/servlet/errorhandler/_404_jsp : Unsupported major.minor version 52.0
at java.lang.ClassLoader.defineClass1(Native Method)


Resolution:
NOTE: Please backup your AEM instance before doing this

  • Go to http://localhost:4502/system/console/configMgr
  • If the page opens, login as "admin"
  • Go to Menu > OSGI > Bundles [http://localhost:4502/system/console/bundles]
  • Find this "Apache Sling Commons FileSystem ClassLoader (org.apache.sling.commons.fsclassloader)" and note the BundleID (it is 218 for me)
  • STOP AEM
  • On Windows Explorer go to this path where your AEM is installed.. $path\aem-61-author\crx-quickstart\launchpad\felix\bundle218\data
  • Delete the classes folder under it.
  • Restart AEM.. this should fix the issue.

If the page above does not open,
  • (assuming the bundle-id is 218)STOP AEM
  • On Windows Explorer go to this path where your AEM is installed.. __ $path\aem-61-author\crx-quickstart\launchpad\felix\bundle218\data __
  • Delete the classes folder under it.
  • Restart AEM.. this should fix the issue.


By aem4beginner

AEM Troubleshooting

Sharing a few utility tools/links-

1. To find the generated java files in AEM6.1Generated JSP JAVA files used to be at - /var/classes location but AEM6.1 onwards it's no longer present there. This is due to the change of repository ClassLoader, now it uses FSClassLoader (File System ClassLoader) for better performance and throughput.

Generated JSP java files are located at- [AEM_INSTALL_DIR]/crx-quickstart/launchpad/felix/bundle[BUNDLE_ID]/data/classes

Source: For details read following article - https://www.danklco.com/posts/2015/06/23/new-apache-sling-fs-classloader-console/

2. Dependency finder-
Use the following link to know the maven dependency for a package-http://localhost:4502/system/console/depfinder

3. Rebuilding clientlibs-
Use the following link to rebuild Client Libraries for CSS and JS-
http://localhost:4502/libs/granite/ui/content/dumplibs.rebuild.html?rebuild=true

4. Recompile JSPUse following link to recompile all generated JSP Java files-
http://localhost:4502/system/console/slingjsp
5. Auto Deploy UI Package
mvn clean install -PautoInstallPackage
6. Auto Deploy Java Package
mvn clean install sling:install
7. Accessing repository through WebDav for Bulk uploads
The following link describes detailed steps on how to access the AEM repository through WebDav-
http://labs.6dglobal.com/blog/2016-05-11/webdav-transfers/
8. AEM Companion App:
Alternative to WebDav you can use AEM Companion App for Desktops. It is very helpful for managing DAM Assets directly from your system. Here is the link for documentation-
https://docs.adobe.com/docs/en/aem/6-1/administer/integration/companion-app.html
9. Grunt Integration with AEM-Maven Project
http://labs.6dglobal.com/blog/2016-07-21/using-grunt-in-aem-maven/
10. Monitoring/ Reporting
Go to- http://localhost:4502/miscadmin#/etc/reports. Following tools are available-
11. Bulk Editor/ Searching pages based on Parameters

Editor URL: http://localhost:4502/etc/importers/bulkeditor.html
For Import use this URL- http://localhost:4502/etc/importers/bulkeditor.html?hib=false


By aem4beginner

April 24, 2020
Estimated Post Reading Time ~

Seeing is believing: Explore the AEM installation directory

Now, we have installed AEM and started it. Before we log in to AEM, let us see what exactly is created in your system. Move to the installation directory – that’s the directory to where you copied the QuickStart jar file and the license file.

You will notice that it created a folder, crx-quickstart. Whenever you start AEM for the first time, it creates the QuickStart folder. It saves all the required data inside it. After you make changes, it saves the changes there. Since you have started AEM once, it retains the folder for subsequent restarts. You will notice that whenever you start AEM for the first time, it takes a little longer time to start, because it needs to create the QuickStart folder.

Move into the QuickStart folder. Let us not get into a lot of technical details for the time being.



Following are the two folders that I would like you to familiarize with:
Logs: The logs files. There is an error.log file inside it. We will use error.log file frequently to see what went wrong with AEM if it misbehaves.
repository: Navigate inside it. Go inside segmentstore. You will see a lot of tar files.


AEM stores that data in this format. This is the default configuration. You can also save the data in MongoDB. We will see that later. There are more folders and files. We will explore them in detail later.


By aem4beginner

April 23, 2020
Estimated Post Reading Time ~

The SegmentNotFound Exceptions in the AEM 6.3 Log

Statement:
Observed SegmentNotFound Exceptions in the logs. Due to some older issues in Oak or some inconsistencies in the repository, a segment can go missing and repository might be inconsistent.

For example:
[1]
*ERROR* [FelixStartLevel] org.apache.sling.event [org.apache.sling.event.impl.jobs.queues.QueueManager(1431)] The activate method has thrown an exception (org.apache.jackrabbit.oak.plugins.segment.SegmentNotFoundException: Segment da5bcb95-d00a-4c04-a9d9-0f10f2b14e5e not found)

[2]
*ERROR* [pool-6-thread-3] org.apache.sling.commons.scheduler.impl.QuartzScheduler Exception during job execution of org.apache.jackrabbit.oak.plugins.index.AsyncIndexUpdate@1dc173f9 : Segment e669f30b-e886-4b7a-b161-56432601ec6b not found
org.apache.jackrabbit.oak.plugins.segment.SegmentNotFoundException: Segment e669f30b-e886-4b7a-b161-56432601ec6b not found


Environment: AEM 6.0,6.1,6.2
Solution:
Run consistency checks on the repository and find the last good revision [healthy state] and revert back to it. Please do the following:
Step 1: Download a version of oak-run that matches your oak core version from https://mvnrepository.com/artifact/org.apache.jackrabbit/oak-run
§ To revert a corrupt segment store to its latest good state change into CQ's working directory (the one containing the crx-quickstart folder) and backup all files in ./crx-quickstart/repository/segmentstore/.
Step 2: Run the consistency check:
o java -Xmx6000m -jar oak-run-*.jar check -d1 -p /path/to/crx-quickstart/repository/segmentstore
o This searches backwards through the revisions until it finds a consistent one:
Look for message like below:
[main] INFO o.a.j.o.p.s.f.t.ConsistencyChecker - Found latest good revision afdb922d-ba53-4a1b-aa1b-1cb044b535cf:234880

Step 3: Revert the repository to this revision by editing ./crx-quickstart/repository/segmentstore/journal.log and deleting all lines after the line containing the latest good revision.
Step 4: Remove all ./crx-quickstart/repository/segmentstore/*.bak files.

Step 5: Run checkpoint clean-up to remove orphaned checkpoints:
§ java -Xmx6000m -jar oak-run-*.jar checkpoints /path/to/crx-quickstart/repository/segmentstore rm-unreferenced
Step6: Finally compact the repository:

§ java Xmx6000m -jar oak-run-*.jar compact /path/to/crx-quickstart/repository/segmentstore/


By aem4beginner

File/package transfer/Sharing in AEM

Statement - How can we use AEM for the file/package sharing from one server to the another in worst case scenario.

Pre-requisite: Assuming AEM server has no access to the internet or outside world except AEM server URL's between the AEM server.

Solution:

Packages or any files can be shared between the server in two ways.
Option 1: easy for the transfer/sharing.
Go the path where author or publisher folder was created in this example crx-quickstart.jar file contained in the folder AEM6.3P1&P2

Parallel to this AEM6.3P1$&P2 folder place the file you want to copy or share to another server. as shown below placed two files - ssl.zip and AEM6.3P1&P2.zip
Go to the Backup: http://localhost:4502/libs/granite/backup/content/admin.html



You will see the two files which are placed under the AEM6.3 software folder where can be see in the backup console.
Next step is select the file you want download --> click on download--->That's it.

Note: This is not recommended at all, this is just an workaround solution to share the files between the server in worst case scenario.

Option 2: It's time-consuming
- Use the package manager console for upload and download.


By aem4beginner

AEM How to find requests with long duration times

Solution:
  • AEM includes the rlog.jar file in the below path: /crx-quickstart/opt/helpers
  • It is used to find requests with long duration times
The following command shows the possible arguments of rlog.jar file
$java -jar rlog.jar
Request Log Analyzer Version 21584 Copyright 2005 Day Management AG
Usage:
java -jar rlog.jar [options]
Options:
-h Prints this usage.
-n Limits output to lines.
-m Limits input to requests.
-xdev Exclude POST request to CRXDE.

For example, you can run it specifying request.log file as a parameter and show the 10 first requests that have the longest duration:

$ java -jar ../opt/helpers/rlog.jar -n 10 request.log

Trace results :
*Info * Parsed 464 requests.
*Info * Time for parsing: 22ms
*Info * Time for sorting: 2ms
*Info * Total Memory: 1mb
*Info * Free Memory: 1mb
*Info * Used Memory: 0mb

------------------------------------------------------
18051ms 31/Mar/2009:11:15:34 +0200 200 GET /content/geometrixx/en/company.html text/ html
2198ms 31/Mar/2009:11:15:20 +0200 200 GET /libs/cq/widgets.js application/x-javascript
1981ms 31/Mar/2009:11:15:11 +0200 200 GET /libs/wcm/content/welcome.html text/html
1973ms 31/Mar/2009:11:15:52 +0200 200 GET /content/campaigns/geometrixx.teasers..html text/htm
1883ms 31/Mar/2009:11:15:20 +0200 200 GET /libs/security/cq-security.js application/x-javascript
1876ms 31/Mar/2009:11:15:20 +0200 200 GET /libs/tagging/widgets.js application/x-javascript
1869ms 31/Mar/2009:11:15:20 +0200 200 GET /libs/tagging/widgets/themes/default.js application/x-javascript
1729ms 30/Mar/2009:16:45:56 +0200 200 GET /libs/wcm/content/welcome.html text/html; charset=utf-8
1510ms 31/Mar/2009:11:15:34 +0200 200 GET /bin/wcm/contentfinder/asset/view.json/ content/dam?_dc=1238490934657&query=&mimeType=image&_charset_=utf-8 application/json
1462ms 30/Mar/2009:17:23:08 +0200 200 GET /libs/wcm/content/welcome.html text


By aem4beginner

April 22, 2020
Estimated Post Reading Time ~

How to tail log files of AEM in windows OS using Jtail.jar file

Statement - Jtail.jar file to tail logs while AEM is running in Windows OS similar to tail in Linux OS
Environment - AEM 6.3 GA

Solution:
Go to this path: D:aem\crx-quickstart\opt\helpers

Search -->for Jtail.jar file --> select and right-click on this file to open with J-->ava Platform SE binary


A console will appear -->click on file -->new-->browse to the path of the log file location and select any log file for the tail.



Hit some pages URL in the browser and you can see the logs are getting generated in the console and this will be helpful for troubleshooting any issues.


That's it!


By aem4beginner

April 21, 2020
Estimated Post Reading Time ~

CRXDE lite console doesn't shows tree nodes Hierarchy

Statement: CRX/DE lite console shows Blank.
Solution:

  • Go to the FLeix console /system/console/configMgr
  • Search for config "Apache Sling DavEx Servlet"
  • And set /server to /crx/server
  • Save the changes.
  • go back the crx/de lite console and vlaidate.
Reference URL: https://docs.adobe.com/docs/en/aem/6-1/administer/security/security-checklist/enabling-crxde-lite.html

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


By aem4beginner

April 20, 2020
Estimated Post Reading Time ~

Installing and Starting AEM6 as a Windows Service

1. Open the crx-quickstart\opt\helpers\instsrv.bat file in a text editor.

2. If you are configuring a 64-bit Windows server, replace all instances of prunsrv with one of the following commands, according to your operating system:
prunsrv_amd64
prunsrv_ia64

3. This command invokes the appropriate script that starts the Windows service daemon in 64-bit Java instead of 32-bit Java.

4. To prevent the process from forking into more than one process, increase the maximum heap size and the PermGen JVM parameters. Locate the set jvm_options command and set the value as follows:
set jvm_options=-XX:MaxPermSize=256M;-Xmx1792m

5. Open Command Prompt, change the current directory to the crx-quickstart/opt/helpers folder of the AEM installation, and enter the following command to create the service:
instsrv.bat cq5

6. To verify that the service is created, open Services in the Administrative Tools control panel or type start services.msc in Command Prompt. The cq5 service appears in the list.

Start the service by doing one of the following:
1. In the Services control panel, click cq5 and click Start.
 

2. In the command line, type net start cq5.


3. Windows indicates that the service is running. AEM starts and the prunsrv executable appears in Task Manager. In your web browser, navigate to AEM, for example, http://localhost:4502 to start using AEM.


Note:
The property values in the instsrv.bat file are used when creating the Windows service. If you edit the property values in instsrv.bat, you must uninstall and then reinstall the service.

Note:
When installing AEM as service, you must provide the absolute path for the logs directory in com.adobe.xmp.worker.files.ncomm.XMPFilesNComm from Configuration Manager.

How to Uninstall CQ5 service from the window system
To uninstall the service, either click Stop in the Services control panel or in the command line, navigate to the folder and type instsrv.bat -uninstall cq5. The service gets removed from the list in the Services control panel or from the list in the command line when you type net start.

References:
https://helpx.adobe.com/experience-manager/6-4/sites/deploying/using/custom-standalone-install.html


By aem4beginner

April 14, 2020
Estimated Post Reading Time ~

Rewrapping CQ quickstart to include your own packages

CQ quickstart is a cool technology to ease the setup of CQ installations; although it’s not a perfect tool for server installations, it’s a perfect to developers to re-install a local CQ development environment or for any kind of demo installation.But a out-of-the-box installation is still a out-of-the-box installation, it doesn’t contain hotfixes or any application bundles, it’s just a raw CQ. In this posting of 2010 I described a way how you can leverage the install directory of CRX to deploy packages and how you can package it for distribution. It’s a bit clumsy, as it requires manual work or extra steps to automate it.

In this post I want to show you a way how you can rebuild a CQ quick start installation including extra packages. And on top of that, you can do it as part of your maven build process, which anyone can execute!

The basic idea is to put all artifacts into a maven repository (e.g. Nexus), so we address it via maven. And then use the maven-assembly-plugin to repackage the quick start file.

Required Steps:
  • Put your CQ quickstart into your maven repository, so you can reference it. They can freely choose the name, for our example let’s use groupId=com.adobe.aem.quickstart, artifactId=aem-quickstart, version=5.6.1, packaging=zip. For this example, you can also just put the file in your local m2 archive: ~/m2/repository/com/adobe/aem/quickstart/aem-quickstart/5.6.1/aem-quickstart-5.6.1.zip
  • Update your pom.xml file and add dependencies to both maven-quickstart-plugin, the aem-quickstart artifact and an additional content package you create during your build (e.g. com.yourcompany.cq5.contentpackage:your-content package).
  • Extend your pom.xml by this definition
<plugins>
  <plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-assembly-plugin</artifactId>
    <executions>
      <execution>
        <id>quickstart-repackage<id>
        <configuration>
          <finalname>quickstart-repackaged</finalname>
          <descriptors>
            <descriptor>src/assembly/quickstart-repackaged.xml</descriptor>
          </descriptors>
          <appendAssemblyId>false</appendAssemblyId>
        </configuration>
        <phase>package</phase>
        <goals>
          <goal>single</goal>
        </goals>
      <execution>
    <executions>
  <plugin>
</plugins>

The magic lies in the descriptor file, which I placed in src/assembly (which is just as good as any other location …).
  • This file src/assembly/quickstart-repackaged.xml can look like this:
<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"  xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2http://maven.apache.org/xsd/assembly-1.1.2.xsd”>

<id>bin</id>
<formats>
<format>jar</format>
</formats>

<includeBaseDirectory>false</includeBaseDirectory>
<dependencySets>
  <dependencySet>
    <outputDirectory>/</outputDirectory>
    <unpack>true</unpack>
    <includes>
      <include>com.adobe.aem.quickstart:aem-quickstart</include>
    <includes>
  </includes>
  <dependencySet>
    <dependencySet>
      <outputDirectory>/static/install</outputDirectory>
      <includes>
        <include>com.yourcompany.cq.contentpackage:your-contentpackage</include>
    </includes>
  </dependencySet>
</dependencySets>

This descriptor tells the plugin to unpack the quickstart file and then add your your-contentpackage to the static/install folder; from this folder, CQ also bootstraps packages during the startup. After this file has been added, the file is repackaged as a jar file with the name “quickstart-repackaged” (taken from the pom.xml file).
  • Invoke maven with the package goal
If you take this route, you’ll have a fantastic way to automatically build your own flavor of quickstart files. Just download the latest version from your Jenkins server, double-click and — voila — you have a full-fledged up-to-date demonstration or testing instance up and running. And as soon as you have all the required ingredients on your nexus, everyone can build such quickstart variants, as it only requires a working maven setup.


By aem4beginner

April 3, 2020
Estimated Post Reading Time ~

Config Manager Properties where are they saved?

We know the flexibility that we get out of OSGI container where we can edit values and those values are saved immediately. The next request starts picking up the values that the sysadmin just put in.

The values are stored under /crx-quickstart/config directory. Basically osgi will find out the PID of the class/bundle and creates directories within the config directories.

So for example, Login Authentication Handler the values are stored under com/day/cq/auth/impl/LoginSelectorHandler.config.

If you change the value in the server itself the values are not picked up by the OSGI container, you have to do a restart if you want OSGI to pick up the values that you have change manually.


By aem4beginner

April 1, 2020
Estimated Post Reading Time ~

How CQ/AEM (Till CQ5.4) Starts when you click on quickstart jar file

1. the quickstart is unpacked to the crx-quickstart directory
2. then cqse is started
3. cqse starts the crx webapp
4. the crx webapp starts the repository
5. during repository startup, it checks the repository/install folder for content packages and installs them
6. then the launchpad webapp is started
7. felix starts the core bundles
8. one of the core bundles is the JCR installer, which searches all 'install' nodes in the repository and registers those bundles
9. felix starts the newly registered bundles
10. As a part of newly started bundles CQ apps load


By aem4beginner

How to fix com.day.crx.cluster.LoginException: Slave has same identity as master Error

Symptom: You get Caused by: com.day.crx.cluster.LoginException: Slave has the same identity as master error and CQ does not startup. This usually happens in CQ5.3 or upgraded CQ5.4 instance.

Solution :
-Stop instance
-Delete all files named listener.properties in

* crx-quickstart/repository/shared/journal/control
* crx-quickstart/repository/shared/version/control
* crx-quickstart/repository/shared/workspaces//control

- Delete file crx-quickstart/repository/cluster_node.id
- Delete all stale .lock files (if existing)
- Delete all stale lock.properties files (if existing)
- Start CQ5.3 instance

OR

1) Use following following command to remove all listener.properties files
find ./crx-quickstart/repository/shared -name listener.properties | xargs rm -f

2) - Delete file crx-quickstart/repository/cluster_node.id

3) Delete all .lock files (if existing) using
find ./crx-quickstart/repository -name "\.lock" -exec rm '{}' \; -print


By aem4beginner