ÃÛ¶¹ÊÓÆµ

Run datastore consistency check via oak-run

Learn how to run a datastore consistency check via oak-run in AEM 6.4 and Oak.

Description description

Environment

  • ÃÛ¶¹ÊÓÆµ Experience Manager (AEM) 6.4
  • Oak 1.8.8 and later versions

Issue/Symptoms

The oak-run tool is helpful when you observe an error like this one:

09.11.2017 13:42:17.512 *WARN* [ async-index-update-async]  org.apache.jackrabbit.oak.plugins.blob.datastore.DataStoreBlobStore Error occurred while loading bytes from steam while fetching for id «record ID»
    java.util.concurrent.ExecutionException: java.io.IOException: org.apache.jackrabbit.core.data.DataStoreException: Record «record ID» does not exist
    Caused by: java.io.IOException: org.apache.jackrabbit.core.data.DataStoreException: Record «record ID» does not exist

Unlike theÌý/²õ²â²õ³Ù±ð³¾/³¦´Ç²Ô²õ´Ç±ô±ð/°ù±ð±è´Ç²õ¾±³Ù´Ç°ù²â³¦³ó±ð³¦°ì UI, the oak-run tool checks the hidden Lucene index files under /oak: index in addition to the rest of the content paths.  This tool gives you the option to restore index files to the datastore or only rebuild the indexes that are corrupt instead of reindexing all of them. This is documented in Use oak-run.jar to Manage Indexes in AEM Foundation Tutorials.

Resolution resolution

  1.  to your AEM server.

  2. Run the command below (but swap out the paths to the segmentstore and datastore to match your environment):

    java -jar oak-run-*.jar datastorecheck --consistency --ref --id --fds crx-quickstart/install/org.apache.jackrabbit.oak.plugins.blob.datastore.FileDataStore.config --repoHome crx-quickstart/repository --store crx-quickstart/repository/se