Error in running Datastore GC



Hi ,

​We are currently working on AEM 6.3, which is configured to have a separate datastore on another file system. the size of the datastore is constantly increasing and we thought of performing DataStore GC, but we are receiving the below error while triggering it from JMX console.

​17.04.2018 05:11:04.488 *INFO* [sling-oak-observation-12] org.apache.jackrabbit.oak.plugins.blob.MarkSweepGarbageCollector Number of valid blob references marked under mark phase of Blob garbage collection [105534]17.04.2018 05:11:04.870 *ERROR* [sling-oak-observation-12] org.apache.jackrabbit.oak.plugins.blob.MarkSweepGarbageCollector Not all repositories have marked references available : [fa514361-79f5-42f4-af22-d68efb15bfdf]

17.04.2018 05:11:04.871 *INFO* [sling-oak-observation-12] org.apache.jackrabbit.oak.plugins.blob.MarkSweepGarbageCollector Blob garbage collection completed in 1.003 s (1003 ms). Number of blobs deleted [0] with max modification time of [2018-04-16 05:11:03.867]

request you to please kindly help me here.







Hi Carlos,

Go to datastore path and search for fa514361-79f5-42f4-af22-d68efb15bfdf , you will have a reference file with this name, just delete that reference file (repeat these steps if there are multiple files)

run  the GC again, this time it should work.




Thank you! Knowing this, I found the reference file associated with the hex in the error message. I will delete it after the next backup up and let you know.





Hi Ramgopal,

you may know this already, but I thought it would be good to explain the issue for others who may face the same problem in the future.

The error you are getting "Not all repositories have marked references available : [fa514361-79f5-42f4-af22-d68efb15bfdf]" means this external file datastore is being shared by multiple repositories. When each repository registers with the datastore, it places a file at the root of the datastore.  You should check on the shared datastore root for the repository id files, such as “repository-930f74d7-3d53-4b13-bb0e-c327dd2be7b9’

When you attempt to run DSGC, a check is made to ensure all repositories registered with the datastore have run the mark phase, this phase is used to determine which files in the datastore are being used. If all the repositories do not run this check then you could end up deleting files being used by other repositories.

If you do not have multiple repositories connected to the datastore, then it could be that you had a previous instance using the datastore, which was destroyed and a new instance created to use the datastore. Check the repository id to see which is the current id for your repo and delete the id's that do not exist.



Configuring node stores and data stores in AEM 6