Skip to content

Instantly share code, notes, and snippets.

Avatar

Andrew Khoury andrewmkhoury

View GitHub Profile
@andrewmkhoury
andrewmkhoury / OakMaintenanceLogMessages.md
Last active Aug 29, 2017
Apache Oak Maintenance Log Messages
View OakMaintenanceLogMessages.md

MongoDB Storage (aka "MongoMK") and RDBMK:

Revision GC:

12.09.2015 00:00:00.857 *INFO* [pool-7-thread-10] org.apache.jackrabbit.oak.plugins.document.VersionGarbageCollector Starting revision garbage collection. Revisions older than [2015-09-11 00:00:00.857] would be removed
13.09.2015 00:00:15.912 *INFO* [pool-7-thread-9] org.apache.jackrabbit.oak.plugins.document.VersionGarbageCollector Iterated through 10000 documents so far. 9698 found to be deleted
14.09.2015 00:00:49.358 *INFO* [pool-7-thread-12] org.apache.jackrabbit.oak.plugins.document.VersionGarbageCollector Deleted 859050 (58.28%) documents so far
12.09.2015 00:39:43.490 *INFO* [pool-7-thread-10] org.apache.jackrabbit.oak.plugins.document.VersionGarbageCollector Version garbage collected in 39.71 min. VersionGCStats{ignoredGCDueToCheckPoint=false, deletedDocGCCount=180021, splitDocGCCount=4853, intermediateSplitDocGCCount=441, timeToCollectDeletedDocs=14.62 min, timeTakenToDeleteDocs=23.52 min}
@andrewmkhoury
andrewmkhoury / README.md
Last active May 10, 2018
How to use oak-mongo.js to delete an index
View README.md
  1. Stop all Oak cluster nodes (or AEM6 cluster nodes)
  2. On the mongo server, run these commands to log in to mongo shell with oak-mongo.js loaded wget http://svn.apache.org/repos/asf/jackrabbit/oak/trunk/oak-run/src/main/js/oak-mongo.js mongo 127.0.0.1/aem-author --shell oak-mongo.js
  3. In the mongo shell run this command to get a list of all index names oak.listChildren("/oak:index")
@andrewmkhoury
andrewmkhoury / User-Group-ACL-Migration.md
Last active Jul 15, 2019
Migrating AEM Users, Groups and ACLs between instances
View User-Group-ACL-Migration.md
  1. Migrate users and groups (If users were not imported automatically via LDAP) Package users and groups (2 separate packages) on the old system (excluding admin and anonymous OOTB users)
    1. Go to CRXDE lite app /crx/de/index.jsp and log in as admin user (on the old system)
    2. Go to "Tools" => "Query"
    3. In the bottom "Query" box enter this query to find the admin user: /jcr:root/home/users//element(*,rep:User)[@rep:principalName="admin"]
    4. Click "Execute" and copy the path of the admin user node in the results to a text file
    5. Repeat step 3 with a query for anonymous user: /jcr:root/home/users//element(*,rep:User)[@rep:principalName="anonymous"]
    6. Click "Execute" and copy the path of the anonymous user node in the results to a text file (so now you should have two paths, one for "admin" and one for "anonymous")
@andrewmkhoury
andrewmkhoury / INSTRUCTIONS.md
Last active Jul 15, 2019
Apache Sling - enabling debug log level for all java packages when instance won't start up
View INSTRUCTIONS.md
  1. Open this file in an editor crx-quickstart/launchpad/config/org/apache/sling/commons/log/LogManager.config
  2. Change org.apache.sling.commons.log.level value from "info" to "debug"
  3. Try to start the instance again
View Setting a property using oak-run console.md
  1. Download https://files.acrobat.com/a/preview/e885654b-8424-4698-b5e9-7751b647276b (or build oak-run 1.1.x version)
  2. Stop all AEM instances
  3. Upload the oak-run 1.1 version to the AEM server if using TarMK or MongoDB server (if using MongoMK)
  4. Run this command to start the oak console
  • on TarMK:
   java -jar target/oak-run.jar console --quiet /path/to/segmentstore
  • For MongoMK run this:
@andrewmkhoury
andrewmkhoury / INSTRUCTIONS.md
Last active Mar 5, 2021
oak-run Groovy script to reset the Adobe AEM "admin" user password
View INSTRUCTIONS.md

To run this script:

  1. Download the oak-run version matching the version of Oak installed in AEM: http://repo1.maven.org/maven2/org/apache/jackrabbit/oak-run
  2. Download the attached adminUtils.groovy script
  3. Upload the adminUtils.groovy script and the oak-run jar to your AEM server
  4. Run the command to start the oak-run console. For example:
    java -Xmx2048m -jar /tmp/oak-run-1.6.1.jar console /app/aem/aem63/crx-quickstart/repository/segmentstore --read-write
    
  5. Once the oak-run console is open then load the groovy script using this command:
@andrewmkhoury
andrewmkhoury / 1 Instructions - Find Oak Corruptions.md
Last active Apr 29, 2021
Oak count node check in script console - use while AEM / Oak is running
View 1 Instructions - Find Oak Corruptions.md

NOTE: Steps moved here instead https://github.com/cqsupport/fix-instructions/tree/master/count-nodes


  1. Go to http://host:port/system/console/bundles and install these two bundles
  2. Go to http://host/system/console/configMgr/org.apache.sling.jcr.base.internal.LoginAdminWhitelist
  3. Add org.apache.felix.webconsole.plugins.scriptconsole to "Whitelist regexp" and save
  4. After the two bundles fully install then go to http://host:port/system/console/slinglog
  5. Click "Add New Logger" and set log level to "Info", "Log File" to "logs/countnodes.log", and "Logger" to "countNodes.groovy"
@andrewmkhoury
andrewmkhoury / instructions.md
Last active Apr 29, 2021
How to disable Text Extraction in Apache Jackrabbit Oak
View instructions.md
  1. Find the location of the oak-lucene jar file:
    find crx-quickstart/launchpad/felix -name "bundle.info" -exec grep oak-lucene {} \; -print
    
    Example output:
    launchpad:resources/install.crx3/15/oak-lucene-1.2.2.jar
    crx-quickstart/launchpad/felix/bundle96/bundle.info
    
  2. Take the second line of the output and remove bundle.info from the path, following the example above, we have:
@andrewmkhoury
andrewmkhoury / INSTRUCTIONS.md
Last active Apr 29, 2021
Script to set the rep:externalId if it is missing in AEM due to users being migrated from an older version of CQ/AEM
View INSTRUCTIONS.md
@andrewmkhoury
andrewmkhoury / Oak Datastore Check.md
Last active Apr 29, 2021
Oak Datastore Consistency Check
View Oak Datastore Check.md
  1. Download the oak-run version that matches what is installed from http://repo1.maven.org/maven2/org/apache/jackrabbit/oak-run/
  2. Stop all AEM instances in cluster
  3. Upload the oak-run jar to the AEM server
  4. Run this command to start the oak console
  • on TarMK:
   java -Xmx4g -jar target/oak-run.jar console --quiet /path/to/segmentstore
  • For MongoMK run this: