The oak-run tool is helpful in cases where you observe an error like the one below:

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 4089b47c7ba7ab8015859428e7e6965eec4641e3#241
java.util.concurrent.ExecutionException: Record 4089b47c7ba7ab8015859428e7e6965eec4641e3 does not exist
Caused by: Record 4089b47c7ba7ab8015859428e7e6965eec4641e3 does not exist

Unlike the /system/console/repositorycheck 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 as documented here.


AEM 6.3 / Oak 1.6.6 and later versions


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

    java-jar oak-run-*.jar datastorecheck --store /app/aem/author/crx-quickstart/repository/segmentstore --fds /mnt/aem/datastore

  2. The command would output a datastore consistency check.

  3. Using the output, follow the article to restore or fix any missing files.

Here's the documentation for the tool:

Consistency checker for the DataStore. Also can be used to list all the blob references in the node store and all the blob ids available in the data store. Use the following command:

$ java-jar oak-run-*.jar datastorecheck [--id] [--ref] [--consistency] \
[--store |] \
[--s3ds |--fds] \
[--dump] \
The following options are available:

--id - List all the ids in the data store
--ref - List all the blob references in the node store
--consistency - List all the missing blobs by doing a consistency check
Atleast one of the above should be specified

--store - Path to the segment store of mongo uri (Required for --ref & --consistency option above)
--dump - Path where to dump the files (Optional). Otherwise, files are dumped in the user tmp directory.
--s3ds - Path to the S3DataStore configuration file
--fds - Path to the FileDataStore configuration file ('path' property is mandatory)
--track - Path of the local repository home folder (Optional). It places a copy of the downloaded blob ids to be tracked.

Цей документ захищено ліцензією Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License  Публікації Twitter™ і Facebook не підпадають під умови ліцензії Creative Commons.

Юридична інформація   |   Політика мережевої конфіденційності