Errors occur when you run a consistenty check and fix on your PersistenceManager.
When you run a consistency check and fix on your PersistenceManager, you get one or more of the following errors in the log. (It's likely that your uuids differ from these errors.)
- ChildNode has invalid parent id: 651da1a9-fdbb-49ca-b908-8939d0fb7976 (instead of d3fb8c83-5453-421b-a862-245a4b243af2)
- NodeState 4ee97820-2137-48e0-b664-f804c34eb24f references inexistent child {}node3_etc_workflow_instances_2009-09-22_delete_asset_497741622317431 with id dd7e1f37-9480-4c40-af45-218db4c48190
- NodeState '80b19738-b62b-4a6a-af9b-70f245d2a7bc' references inexistent parent uuid '9b353130-29f4-4825-8c20-03f3a8786e5a'
- javax.jcr.ItemNotFoundException: failed to build path of 46bbf932-3bd1-466d-bf93-7e0c99dc5707: ad09118a-45cb-422d-b201-e0cbc938ade7 has no child entry for 46bbf932-3bd1-466d-bf93-7e0c99dc5707
- ConsistencyCheck: Not repairable: Node 918fea28-f6ab-42bc-aff4-008d073632db has unknown parent: 42d4bb3e-2107-4560-ad54-f309b0db02dc (ConsistencyCheck.java, line 116)
Or, when you are reindexing the search index, it fails with this error (with the same uuid displayed):
NoSuchItemStateException: deadbeef-cafe-babe-cafe-babecafebabe.
Solution
If your problem matches one those listed above, then the following process will help you fix the corruption.
Until CRX 2.2 , use the old CRX Console :
- Stop your CRX instance (CRX Console does not work while CRX is running)
- You may need to correct the startup script for the Console. To do that, edit server/console.sh, and replace the variable REPOSITORY_HOME="$CONTEXT/crx" with REPOSITORY_HOME="$CONTEXT/../repository". (Please note you can't just add the line to the top of the script, because the CONTEXT may not be set before that which would cause the console use a different repository).
- For CQ 5.3/CRX 2.x : copy server/lib/common/cq-shared-libs-5.3.4.jar to server/lib/container
- To start the CRX Console, in a terminal window, type:
crx-quickstart/server./console.sh - After the console prompt is displayed then type the following command to login as admin:
login crx.default admin <pwd>
Fix "ChildNode has invalid parent id"
From the CRX Console, follow these steps:
- For example, if you had this error:
ChildNode has invalid parent id: INVALID_PARENT_UUID (instead of EXPECTED_PARENT_UUID)
Run this command to get a low level view of the "correct" parent node:
stat EXPECTED_PARENT_UUID
Then run a stat for each of the child nodes and verify that the parentId is EXPECTED_PARENT_UUID.
- fix the ones that have the wrong id using the patch command like this:
patch -p EXPECTED_PARENT_UUID CHILD_UUID
How to Fix "NodeState references inexistent child"
From the CRX Console, follow these steps:
- For example, if you had this error:
NodeState 4ee97820-2137-48e0-b664-f804c34eb24f references inexistent child {}node3_etc_workflow_instances_2009-09-22_delete_asset_497741622317431 with id dd7e1f37-9480-4c40-af45-218db4c48190
- Run this command to get the path of the NodeState item
stat 4ee97820-2137-48e0-b664-f804c34eb24f
- Use the path that it output by the above command as the [path] argument for this command:
cd [path]
- Run these commands to remove the missing child node reference, save and exit:
rm -c dd7e1f37-9480-4c40-af45-218db4c48190
save
exit - If you can afford the downtime, then run a full search index consistency check and fix to remove the orphan node from your search index. See this article for how this is done. Otherwise continue with the following steps.
- Make sure CRX is stopped at that point. Create a file named redo_X.log under crx-quickstart/repository/workspaces/<workspace>/index/ where the X in the file name matches what is in the end of the filename for the crx-quickstart/repository/workspaces/<workspace>/index/indexes_X file. In the file enter the following:
1 DEL dd7e1f37-9480-4c40-af45-218db4c48190
1 COM - Start CRX
- If everything was done properly then you should see log messages like these in your logs/crx/error.log upon startup of CRX:
*INFO * Recovery: Found uncommitted redo log. Applying changes now... (Recovery.java, line 82)
*INFO * Recovery: Redo changes applied. (Recovery.java, line 85)
Fix "references inexistent parent uuid" and "ConsistencyCheck: Not repairable: Node ... has unknown parent: ..."
From the CRX Console, follow these steps:
- For example, if you had this error:
NodeState '80b19738-b62b-4a6a-af9b-70f245d2a7bc' references inexistent parent uuid '9b353130-29f4-4825-8c20-03f3a8786e5a' - Run these commands to remove the orphan child node save and exit:
rm [80b19738-b62b-4a6a-af9b-70f245d2a7bc]
save
exit - If you can afford the downtime, then run a full search index consistency check and fix to remove the orphan node from your search index. See this article for how this is done. Otherwise continue with the following steps.
- Make sure CRX is stopped at that point. Create a file named redo_X.log under crx-quickstart/repository/workspaces/<workspace>/index/ where the X in the file name matches what is in the end of the filename for the crx-quickstart/repository/workspaces/<workspace>/index/indexes_X file. In the file enter the following:
1 DEL 80b19738-b62b-4a6a-af9b-70f245d2a7bc
1 COM - Start CRX
- If everything was done properly then you should see log messages like these in your logs/crx/error.log upon startup of CRX:
*INFO * Recovery: Found uncommitted redo log. Applying changes now... (Recovery.java, line 82)
*INFO * Recovery: Redo changes applied. (Recovery.java, line 85)
Note: If you have many errors to fix then you can prepare multiple items in these steps:
In step 4, open a text file and prepare multiple rm commands then paste the whole file's contents into the CRX console, for example:
rm [<child uuid 1>]
rm [<child uuid 2>]
save
exit
In step 6, you would have multiple items in the redo_X.log enter as below:
1 DEL <child uuid 1>
1 DEL <child uuid 2>
1 COM
You would replace the <child uuid 1> with the actual uuids of the child node in the error message, like in the example given above this would be 80b19738-b62b-4a6a-af9b-70f245d2a7bc
Fix "javax.jcr.ItemNotFoundException: failed to build path of ... has no child entry for ..."
From the CRX Console, follow these steps:
- For example, if you had this error:
javax.jcr.ItemNotFoundException: failed to build path of 46bbf932-3bd1-466d-bf93-7e0c99dc5707: ad09118a-45cb-422d-b201-e0cbc938ade7 has no child entry for 46bbf932-3bd1-466d-bf93-7e0c99dc5707
- Run these commands to delete the orphan child node, save and exit the crx console
rm [46bbf932-3bd1-466d-bf93-7e0c99dc5707]
save
exit
- If you can afford the downtime, then run a full search index consistency check and fix to remove the orphan node from your search index. See this article for how this is done. Otherwise continue with the following steps.
- Make sure CRX is stopped at that point .Create a file named redo_X.log under crx-quickstart/repository/workspaces/<workspace>/index/ where the X in the file name matches what is in the end of the filename for the crx-quickstart/repository/workspaces/<workspace>/index/indexes_X file. In the file enter the following:
1 DEL 46bbf932-3bd1-466d-bf93-7e0c99dc5707
1 COM - Start CRX
- If everything was done properly then you should see log messages like these in your logs/crx/error.log upon startup of CRX:
*INFO * Recovery: Found uncommitted redo log. Applying changes now... (Recovery.java, line 82)
*INFO * Recovery: Redo changes applied. (Recovery.java, line 85)
Note: If you have many errors to fix then you can prepare multiple items in these steps:
In step 4, open a text file and prepare multiple rm commands then paste the whole file's contents into the CRX console, for example:
rm [<child uuid 1>]
rm [<child uuid 2>]
save
exit
In step 6, you would have multiple items in the redo_X.log enter as below:
1 DEL <child uuid 1>
1 DEL <child uuid 2>
1 COM
You would replace the <child uuid 1> with the actual uuids of the child node in the error message, like in the example given above this would be 46bbf932-3bd1-466d-bf93-7e0c99dc5707
How to Fix "NoSuchItemStateException: deadbeef-cafe-babe-cafe-babecafebabe"
See this article
Applies to
CRX 1.4.x, CRX 2.x